OWBI1::BI1InstanceProviderIFC Class Reference

Classes wishing to implement an instance provider must derive from this class. More...

#include <OWBI1_InstanceProviderIFC.hpp>

Inheritance diagram for OWBI1::BI1InstanceProviderIFC:

Inheritance graph
[legend]
Collaboration diagram for OWBI1::BI1InstanceProviderIFC:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BI1InstanceProviderIFC ()
virtual ~BI1InstanceProviderIFC ()
virtual void getInstanceProviderInfo (InstanceProviderInfo &info)
 A provider should override this method to report which classes in which namespaces it instruments.
virtual void enumInstanceNames (const ProviderEnvironmentIFCRef &env, const String &ns, const CIMName &className, CIMObjectPathResultHandlerIFC &result, const CIMClass &cimClass)=0
 This method enumerates all names of instances of the class which is specified in cop.
virtual void enumInstances (const ProviderEnvironmentIFCRef &env, const String &ns, const CIMName &className, CIMInstanceResultHandlerIFC &result, const CIMPropertyList &propertyList, const CIMClass &requestedClass, const CIMClass &cimClass)
 This method enumerates all instances of the class which is specified in className.
virtual CIMInstance getInstance (const ProviderEnvironmentIFCRef &env, const String &ns, const CIMObjectPath &instanceName, const CIMPropertyList &propertyList, const CIMClass &cimClass)=0
 This method retrieves the instance specified in the object path.
virtual CIMObjectPath createInstance (const ProviderEnvironmentIFCRef &env, const String &ns, const CIMInstance &cimInstance)=0
 This method creates the instance specified in the object path.
virtual void modifyInstance (const ProviderEnvironmentIFCRef &env, const String &ns, const CIMInstance &modifiedInstance, const CIMInstance &previousInstance, const CIMPropertyList &propertyList, const CIMClass &theClass)=0
 This method sets the instance specified in the object path.
virtual void deleteInstance (const ProviderEnvironmentIFCRef &env, const String &ns, const CIMObjectPath &cop)=0
 This method deletes the instance specified in the object path.
virtual BI1InstanceProviderIFCgetInstanceProvider ()
 We do the following because gcc seems to have a problem with dynamic_cast.

Detailed Description

Classes wishing to implement an instance provider must derive from this class.

Definition at line 50 of file OWBI1_InstanceProviderIFC.hpp.


Constructor & Destructor Documentation

OWBI1::BI1InstanceProviderIFC::BI1InstanceProviderIFC  ) 
 

Definition at line 104 of file OWBI1_InstanceProviderIFC.cpp.

OWBI1::BI1InstanceProviderIFC::~BI1InstanceProviderIFC  )  [virtual]
 

Definition at line 109 of file OWBI1_InstanceProviderIFC.cpp.


Member Function Documentation

virtual CIMObjectPath OWBI1::BI1InstanceProviderIFC::createInstance const ProviderEnvironmentIFCRef env,
const String ns,
const CIMInstance cimInstance
[pure virtual]
 

This method creates the instance specified in the object path.

If the instance does exist an CIMException with ID CIM_ERR_ALREADY_EXISTS must be thrown. The parameter should be the instance name.

Parameters:
cop The path to the instance to be set. The import part in this parameter is the namespace component.
cimInstance The instance to be set
Returns:
A CIM ObjectPath of the instance that was created.
Exceptions:
CIMException 

Implemented in OWBI1::BI1ReadOnlyInstanceProviderIFC.

virtual void OWBI1::BI1InstanceProviderIFC::deleteInstance const ProviderEnvironmentIFCRef env,
const String ns,
const CIMObjectPath cop
[pure virtual]
 

This method deletes the instance specified in the object path.

Parameters:
cop The instance to be deleted
Exceptions:
CIMException 

Implemented in OWBI1::BI1ReadOnlyInstanceProviderIFC.

virtual void OWBI1::BI1InstanceProviderIFC::enumInstanceNames const ProviderEnvironmentIFCRef env,
const String ns,
const CIMName className,
CIMObjectPathResultHandlerIFC result,
const CIMClass cimClass
[pure virtual]
 

This method enumerates all names of instances of the class which is specified in cop.

Parameters:
cop The object path specifies the class that must be enumerated.
cimClass The class reference
Returns:
An array of CIMObjectPath containing names of the enumerated instances.
Exceptions:
CIMException - throws if the CIMObjectPath is incorrect or does not exist.

Implemented in OWBI1::BI1SimpleInstanceProviderIFC.

Referenced by enumInstances().

void OWBI1::BI1InstanceProviderIFC::enumInstances const ProviderEnvironmentIFCRef env,
const String ns,
const CIMName className,
CIMInstanceResultHandlerIFC result,
const CIMPropertyList propertyList,
const CIMClass requestedClass,
const CIMClass cimClass
[virtual]
 

This method enumerates all instances of the class which is specified in className.

The entire instances and not just the names are returned. If you don't override this method, the default implementation will be used which utilizes enumInstanceNames() and getInstance()

Parameters:
cop The object path specifies the class that must be enumerated.
cimClass The class reference.
localOnly If true, only the non-inherited properties are to be returned, otherwise all properties are required.
Returns:
An array of CIMInstance containing names of the enumerated instances.
Exceptions:
CIMException - thrown if cop is incorrect or does not exist.

Reimplemented in OWBI1::BI1SimpleInstanceProviderIFC.

Definition at line 77 of file OWBI1_InstanceProviderIFC.cpp.

References cimClass, className, enumInstanceNames(), env, ns, propertyList, and result.

virtual CIMInstance OWBI1::BI1InstanceProviderIFC::getInstance const ProviderEnvironmentIFCRef env,
const String ns,
const CIMObjectPath instanceName,
const CIMPropertyList propertyList,
const CIMClass cimClass
[pure virtual]
 

This method retrieves the instance specified in the object path.

Parameters:
cop The name of the instance to be retrieved.
cimClass The class to which the instance belongs. This is useful for providers which do not want to create instances from scratch. They can call the class newInstance() routine to create a template for the new instance.
localOnly If true, only the non-inherited properties are to be returned, otherwise all properties are required.
Returns:
The retrieved instance
Exceptions:
CIMException - thrown if cop is incorrect or does not exist

Implemented in OWBI1::BI1SimpleInstanceProviderIFC.

Referenced by OWBI1::_RHEnumInstances::doHandle().

BI1InstanceProviderIFC * OWBI1::BI1InstanceProviderIFC::getInstanceProvider  )  [virtual]
 

We do the following because gcc seems to have a problem with dynamic_cast.

If often fails, especially when compiling with optimizations. It will return a (supposedly) valid pointer, when it should return NULL.

Reimplemented from OWBI1::BI1ProviderBaseIFC.

Definition at line 98 of file OWBI1_InstanceProviderIFC.cpp.

void OWBI1::BI1InstanceProviderIFC::getInstanceProviderInfo InstanceProviderInfo info  )  [virtual]
 

A provider should override this method to report which classes in which namespaces it instruments.

It should insert an entry for each class it is responsible for. The entry consists of the class name and an optional list of namespaces. If the namespace list is empty, all namespaces are implied. If the method does nothing, then the provider's class must have a provider qualifier that identifies the provider. This old behavior is deprecated and will be removed sometime in the future. This method has a default implementation that does nothing, to allow old providers to be migrated forward with little or no change, but once the old provider location method is removed, this member function will be pure virtual.

Definition at line 92 of file OWBI1_InstanceProviderIFC.cpp.

Referenced by OWBI1::BI1ProviderIFC::loadProviders().

virtual void OWBI1::BI1InstanceProviderIFC::modifyInstance const ProviderEnvironmentIFCRef env,
const String ns,
const CIMInstance modifiedInstance,
const CIMInstance previousInstance,
const CIMPropertyList propertyList,
const CIMClass theClass
[pure virtual]
 

This method sets the instance specified in the object path.

If the instance does not exist an CIMException with ID CIM_ERR_NOT_FOUND must be thrown. The parameter should be the instance name.

Parameters:
cop The path of the instance to be set. The important part in this parameter is the namespace component.
cimInstance The instance to be set.
Exceptions:
CIMException 

Implemented in OWBI1::BI1ReadOnlyInstanceProviderIFC.


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:18:51 2006 for openwbem by  doxygen 1.4.6