lm::LoadMonitor::DriveEnumCache Class Reference

Cache for drive releated data. More...

Inheritance diagram for lm::LoadMonitor::DriveEnumCache:

lm::LoadMonitor::PerformanceCounterEnumCache

Public Member Functions

 DriveEnumCache (void)
 Create new cache object.
virtual ~DriveEnumCache (void)
 Free used resources.
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.
bool QueryNames (HardwareDescription &target)
 Query names of all drives.

Protected Member Functions

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

Private Attributes

IWbemHiPerfEnum * enum_drives
 Enumerator for Win32_PerfRawData_PerfDisk_PhysicalDisk or Win32_PerfFormattedData_PerfDisk_PhysicalDisk.
long enum_drives_id
 ID of the drive enumerator.
long id_disk_write_bytes
 ID of the "DiskWriteBytesPerSec" property.
long id_disk_read_bytes
 ID of the "DiskReadBytesPerSec" property.
long id_disk_name
 ID of the "Name" property.

Detailed Description

Cache for drive releated data.


Constructor & Destructor Documentation

lm::LoadMonitor::DriveEnumCache::DriveEnumCache ( void   ) 

Create new cache object.

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

Free used resources.


Member Function Documentation

bool lm::LoadMonitor::DriveEnumCache::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::DriveEnumCache::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.

bool lm::LoadMonitor::DriveEnumCache::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.

bool lm::LoadMonitor::DriveEnumCache::QueryNames ( HardwareDescription target  ) 

Query names of all drives.

Query names of all disk drives that are being monitored by the Load Monitor.

Parameters:
target HardwareDescription object that will receive names.
Returns:
true on success, false otherwise.

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

Free resources.

Implements lm::LoadMonitor::PerformanceCounterEnumCache.


Field Documentation

IWbemHiPerfEnum* lm::LoadMonitor::DriveEnumCache::enum_drives [private]

Enumerator for Win32_PerfRawData_PerfDisk_PhysicalDisk or Win32_PerfFormattedData_PerfDisk_PhysicalDisk.

long lm::LoadMonitor::DriveEnumCache::enum_drives_id [private]

ID of the drive enumerator.

long lm::LoadMonitor::DriveEnumCache::id_disk_name [private]

ID of the "Name" property.

long lm::LoadMonitor::DriveEnumCache::id_disk_read_bytes [private]

ID of the "DiskReadBytesPerSec" property.

long lm::LoadMonitor::DriveEnumCache::id_disk_write_bytes [private]

ID of the "DiskWriteBytesPerSec" 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