WMI Library
Public Types | Public Member Functions | Private Attributes
WMI::Object Class Reference

An instance of a WMI Class. More...

#include <Object.hpp>

Inheritance diagram for WMI::Object:
WMI::TypedObject< Win32_OperatingSystem > WMI::TypedObject< T > WMI::Win32_OperatingSystem

List of all members.

Public Types

enum  PropertyTypes {
  ALL_PROPERTIES = 0, NONSYSTEM_PROPERTIES = WBEM_FLAG_NONSYSTEM_ONLY, LOCAL_PROPERTIES = WBEM_FLAG_LOCAL_ONLY, PROPAGATED_PROPERTIES = WBEM_FLAG_PROPAGATED_ONLY,
  SYSTEM_PROPERTIES = WBEM_FLAG_SYSTEM_ONLY
}
 The property type query flags. More...
typedef WCL::ComPtr
< IWbemClassObject > 
IWbemClassObjectPtr
 The underlying COM type.
typedef std::set< tstring > PropertyNames
 A set of property names.

Public Member Functions

 Object ()
 Default constructor.
 Object (IWbemClassObjectPtr object)
 Construction from the underlying COM object.
virtual ~Object ()
 Destructor.
size_t getPropertyNames (PropertyNames &names, PropertyTypes types=NONSYSTEM_PROPERTIES) const
 Get the names of the supported properties.
void getProperty (const tstring &name, WCL::Variant &value) const
 Get the value for a property.
template<typename T >
getProperty (const tstring &name) const
 Get the property value for an object as a typed value.
IWbemClassObjectPtr get () const
 Get the underlying COM object.

Private Attributes

IWbemClassObjectPtr m_object

Detailed Description

An instance of a WMI Class.


Member Typedef Documentation

typedef WCL::ComPtr<IWbemClassObject> WMI::Object::IWbemClassObjectPtr

The underlying COM type.

typedef std::set<tstring> WMI::Object::PropertyNames

A set of property names.


Member Enumeration Documentation

The property type query flags.

Enumerator:
ALL_PROPERTIES 
NONSYSTEM_PROPERTIES 
LOCAL_PROPERTIES 
PROPAGATED_PROPERTIES 
SYSTEM_PROPERTIES 

Constructor & Destructor Documentation

Default constructor.

Construction from the underlying COM object.

WMI::Object::~Object ( ) [virtual]

Destructor.


Member Function Documentation

Get the names of the supported properties.

void WMI::Object::getProperty ( const tstring &  name,
WCL::Variant &  value 
) const

Get the value for a property.

This is the generic method used to access a property when the return value type is unknown.

template<typename T >
T WMI::Object::getProperty ( const tstring &  name) const [inline]

Get the property value for an object as a typed value.

Get the underlying COM object.


Member Data Documentation


The documentation for this class was generated from the following files: