lm::LoadMonitor::ProcessorEnumCache Class Reference

Cache for data related to processor usage. More...

Inheritance diagram for lm::LoadMonitor::ProcessorEnumCache:

lm::LoadMonitor::PerformanceCounterEnumCache

Public Member Functions

 ProcessorEnumCache (void)
 Create new cache object.
virtual ~ProcessorEnumCache (void)
 Destory cache object.
virtual bool AddToRefresher (IWbemConfigureRefresher *configure, IWbemServices *services)
 Add object to the refresher.
virtual void Release (void)
 Free resources.
virtual bool QueryData (LoadSample &target)
 Query data.
size_t GetCount ()
 Get number of processors.

Protected Member Functions

virtual bool CacheImpl (IWbemObjectAccess *access_object)
 Cache property handles.

Private Attributes

IWbemHiPerfEnum * enum_processor_usage
 Enumerator for Win32_PerfRawData_PerfOS_Processor or Win32_PerfFormattedData_PerfOS_Processor classes.
long enum_processor_usage_id
 ID of the CPU usage enumeration.
long id_processor_time
 ID of the "PercentProcessorTime" property.
long id_processor_name
 ID of the "Name" property.

Detailed Description

Cache for data related to processor usage.


Constructor & Destructor Documentation

lm::LoadMonitor::ProcessorEnumCache::ProcessorEnumCache ( void   ) 

Create new cache object.

lm::LoadMonitor::ProcessorEnumCache::~ProcessorEnumCache ( void   )  [virtual]

Destory cache object.


Member Function Documentation

bool lm::LoadMonitor::ProcessorEnumCache::AddToRefresher ( IWbemConfigureRefresher *  configure,
IWbemServices *  services 
) [virtual]

Add object to the refresher.

Parameters:
configure Configure refresher which will be used to add required objects to the refresher.
services WMI service provider.
Returns:
true on success, false otherwise.

Implements lm::LoadMonitor::PerformanceCounterEnumCache.

bool lm::LoadMonitor::ProcessorEnumCache::CacheImpl ( IWbemObjectAccess *  access_object  )  [protected, virtual]

Cache property handles.

Parameters:
access_object Object which contains all properties that need to be cached.
Returns:
true on success, false otherwise.

Implements lm::LoadMonitor::PerformanceCounterEnumCache.

size_t lm::LoadMonitor::ProcessorEnumCache::GetCount (  ) 

Get number of processors.

Returns:
Number of processors installed on the computer.

bool lm::LoadMonitor::ProcessorEnumCache::QueryData ( LoadSample target  )  [virtual]

Query data.

Query data after it has been refreshed. This will collect all data from enumerators previously registered with refresher via AddToRefresher method and store resulting data in provided load sample. If data are stored in array (e.g. CPU usage on multi-processor machines), arrays will be automatically allocated. If query fails, sample will remain unmodified.

Parameters:
target Reference to the load sample which will receive data.
Returns:
true on success, false otherwise.

Implements lm::LoadMonitor::PerformanceCounterEnumCache.

void lm::LoadMonitor::ProcessorEnumCache::Release ( void   )  [virtual]

Free resources.

Implements lm::LoadMonitor::PerformanceCounterEnumCache.


Field Documentation

IWbemHiPerfEnum* lm::LoadMonitor::ProcessorEnumCache::enum_processor_usage [private]

Enumerator for Win32_PerfRawData_PerfOS_Processor or Win32_PerfFormattedData_PerfOS_Processor classes.

long lm::LoadMonitor::ProcessorEnumCache::enum_processor_usage_id [private]

ID of the CPU usage enumeration.

long lm::LoadMonitor::ProcessorEnumCache::id_processor_name [private]

ID of the "Name" property.

long lm::LoadMonitor::ProcessorEnumCache::id_processor_time [private]

ID of the "PercentProcessorTime" property.


The documentation for this class was generated from the following files:
Generated on Tue Dec 19 17:43:49 2006 for Load Monitor for Windows by  doxygen 1.4.7