本文整理汇总了C++中scxcorelib::SCXHandle::GetVirtualText方法的典型用法代码示例。如果您正苦于以下问题:C++ SCXHandle::GetVirtualText方法的具体用法?C++ SCXHandle::GetVirtualText怎么用?C++ SCXHandle::GetVirtualText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类scxcorelib::SCXHandle
的用法示例。
在下文中一共展示了SCXHandle::GetVirtualText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddProperties
/**
Set all properties from the ProcessInstance in the SCXInstance
\param[in] processinst - Process instance to get data from
\param[in] inst - Instance to populate
\param[in] cimtype - Type of CIM Class to return
\throws SCXInvalidArgumentException - If the instance can not be converted to a ProcessInstance
This method knows how to map the values of the Process PAL to the CMPI class
definition.
*/
void ProcessProvider::AddProperties(SCXCoreLib::SCXHandle<SCXSystemLib::ProcessInstance> processinst, SCXInstance &inst, SupportedCimClasses cimtype) // private
{
if (processinst == NULL)
{
throw SCXInvalidArgumentException(L"einst", L"Not a ProcessInstance", SCXSRCLOCATION);
}
SCX_LOGTRACE(m_log, L"ProcessProvider AddPropeties()");
if (eSCX_UnixProcessStatisticalInformation == cimtype)
{
unsigned int uint = 0;
scxulong ulong = 0;
if (processinst->GetRealData(ulong))
{
SCXProperty prop(L"RealData", ulong);
inst.AddProperty(prop);
}
if (processinst->GetRealStack(ulong))
{
SCXProperty prop(L"RealStack", ulong);
inst.AddProperty(prop);
}
if (processinst->GetVirtualText(ulong))
{
SCXProperty prop(L"VirtualText", ulong);
inst.AddProperty(prop);
}
if (processinst->GetVirtualData(ulong))
{
SCXProperty prop(L"VirtualData", ulong);
inst.AddProperty(prop);
}
if (processinst->GetVirtualStack(ulong))
{
SCXProperty prop(L"VirtualStack", ulong);
inst.AddProperty(prop);
}
if (processinst->GetVirtualMemoryMappedFileSize(ulong))
{
SCXProperty prop(L"VirtualMemoryMappedFileSize", ulong);
inst.AddProperty(prop);
}
if (processinst->GetVirtualSharedMemory(ulong))
{
SCXProperty prop(L"VirtualSharedMemory", ulong);
inst.AddProperty(prop);
}
if (processinst->GetCpuTimeDeadChildren(ulong))
{
SCXProperty prop(L"CpuTimeDeadChildren", ulong);
inst.AddProperty(prop);
}
if (processinst->GetSystemTimeDeadChildren(ulong))
{
SCXProperty prop(L"SystemTimeDeadChildren", ulong);
inst.AddProperty(prop);
}
if (processinst->GetRealText(ulong))
{
SCXProperty prop(L"RealText", ulong);
inst.AddProperty(prop);
}
if (processinst->GetCPUTime(uint))
{
SCXProperty prop(L"CPUTime", uint);
inst.AddProperty(prop);
}
if (processinst->GetBlockWritesPerSecond(ulong))
{
SCXProperty prop(L"BlockWritesPerSecond", ulong);
inst.AddProperty(prop);
}
if (processinst->GetBlockReadsPerSecond(ulong))
//.........这里部分代码省略.........
示例2: EnumerateOneInstance
MI_BEGIN_NAMESPACE
static void EnumerateOneInstance(Context& context,
SCX_UnixProcessStatisticalInformation_Class& inst, bool keysOnly,
SCXCoreLib::SCXHandle<SCXSystemLib::ProcessInstance> processinst)
{
SCXLogHandle& log = SCXCore::g_ProcessProvider.GetLogHandle();
// Add the key properties first.
scxulong pid;
if (processinst->GetPID(pid))
{
inst.Handle_value(StrToUTF8(StrFrom(pid)).c_str());
}
// Add keys of scoping operating system
try {
SCXCoreLib::NameResolver mi;
inst.CSName_value(StrToMultibyte(mi.GetHostDomainname()).c_str());
} catch (SCXException& e){
SCX_LOGWARNING(log, StrAppend(
StrAppend(L"Can't read host/domainname because ", e.What()),
e.Where()));
}
try {
SCXSystemLib::SCXOSTypeInfo osinfo;
inst.OSName_value(StrToMultibyte(osinfo.GetOSName(true)).c_str());
} catch (SCXException& e){
SCX_LOGWARNING(log, StrAppend(
StrAppend(L"Can't read OS name because ", e.What()),
e.Where()));
}
inst.CSCreationClassName_value("SCX_ComputerSystem");
inst.OSCreationClassName_value("SCX_OperatingSystem");
inst.ProcessCreationClassName_value("SCX_UnixProcessStatisticalInformation");
std::string name;
if (processinst->GetName(name))
{
inst.Name_value(name.c_str());
}
if (!keysOnly)
{
unsigned int uint = 0;
scxulong ulong = 0;
inst.Description_value("A snapshot of a current process");
inst.Caption_value("Unix process information");
if (processinst->GetRealData(ulong))
{
inst.RealData_value(ulong);
}
if (processinst->GetRealStack(ulong))
{
inst.RealStack_value(ulong);
}
if (processinst->GetVirtualText(ulong))
{
inst.VirtualText_value(ulong);
}
if (processinst->GetVirtualData(ulong))
{
inst.VirtualData_value(ulong);
}
if (processinst->GetVirtualStack(ulong))
{
inst.VirtualStack_value(ulong);
}
if (processinst->GetVirtualMemoryMappedFileSize(ulong))
{
inst.VirtualMemoryMappedFileSize_value(ulong);
}
if (processinst->GetVirtualSharedMemory(ulong))
{
inst.VirtualSharedMemory_value(ulong);
}
if (processinst->GetCpuTimeDeadChildren(ulong))
{
inst.CpuTimeDeadChildren_value(ulong);
}
if (processinst->GetSystemTimeDeadChildren(ulong))
{
inst.SystemTimeDeadChildren_value(ulong);
}
if (processinst->GetRealText(ulong))
{
inst.RealText_value(ulong);
//.........这里部分代码省略.........