WMI Library
|
An instance of a WMI Class. More...
#include <Object.hpp>
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 > | |
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 |
An instance of a WMI Class.
typedef WCL::ComPtr<IWbemClassObject> WMI::Object::IWbemClassObjectPtr |
The underlying COM type.
typedef std::set<tstring> WMI::Object::PropertyNames |
A set of property names.
Default constructor.
WMI::Object::Object | ( | IWbemClassObjectPtr | object | ) |
Construction from the underlying COM object.
WMI::Object::~Object | ( | ) | [virtual] |
Destructor.
size_t WMI::Object::getPropertyNames | ( | PropertyNames & | names, |
PropertyTypes | types = NONSYSTEM_PROPERTIES |
||
) | const |
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.
T WMI::Object::getProperty | ( | const tstring & | name | ) | const [inline] |
Get the property value for an object as a typed value.
Object::IWbemClassObjectPtr WMI::Object::get | ( | ) | const [inline] |
Get the underlying COM object.
IWbemClassObjectPtr WMI::Object::m_object [mutable, private] |