In file ../../src/Pegasus/Common/CIMInstance.h:

class PEGASUS_COMMON_LINKAGE CIMInstance

This class represents the instance of a CIM class.

Documentation

This class represents the instance of a CIM class. It is used manipulate instances and their members.

Inheritance:


Public Methods

[more] CIMInstance ()
Creates a CIMInstance object
[more] CIMInstance (const CIMInstance& x)
Creates a CIMInstance object from another CIMInstance object.
[more]PEGASUS_EXPLICIT CIMInstance (const CIMObject& x)
Creates a CIMInstance object from the given CIMObject.
[more] CIMInstance (const CIMName& className)
Creates a CIMInstance object of the class specified by the input parameter.
[more]CIMInstance& operator= (const CIMInstance& x)
Copy Constructor.
[more] ~CIMInstance ()
Destructor.
[more]const CIMName& getClassName () const
Gets the class name of the instance.
[more]const CIMObjectPath& getPath () const
[more]void setPath (const CIMObjectPath & path)
Sets the object path for the instance.
[more]CIMInstance& addQualifier (const CIMQualifier& qualifier)
Adds the CIMQualifier object to the instance.
[more]Uint32 findQualifier (const CIMName& name) const
Searches the instance for the qualifier object defined by the input parameter.
[more]CIMQualifier getQualifier (Uint32 index)
Retrieves the qualifier object defined by the input parameter.
[more]CIMConstQualifier getQualifier (Uint32 index) const
Retrieves the qualifier object defined by the input parameter.
[more]void removeQualifier (Uint32 index)
Removes the qualifier defined by the index parameter.
[more]Uint32 getQualifierCount () const
Gets the count of the CIMQualifier objects defined for this CIMInstance.
[more]CIMInstance& addProperty (const CIMProperty& x)
Adds a property object defined by the input parameter to the CIMInstance.
[more]Uint32 findProperty (const CIMName& name) const
Searches the CIMProperty objects in the CIMInstance for property object with the name defined by the input parameter.
[more]CIMProperty getProperty (Uint32 index)
Gets the CIMProperty object in the CIMInstance defined by the input parameter.
[more]CIMConstProperty getProperty (Uint32 index) const
Gets the CIMproperty object in the CIMInstance defined by the input parameter.
[more]void removeProperty (Uint32 index)
Removes the property defined by the input parameter from the instance.
[more]Uint32 getPropertyCount () const
Gets the count of CIMProperty objects defined for this CIMInstance.
[more]CIMObjectPath buildPath (const CIMConstClass& cimClass) const
Builds the CIM object path for this instance.
[more]CIMInstance clone () const
Makes a deep copy (clone) of the CIMInstance object.
[more]Boolean identical (const CIMConstInstance& x) const
Compares the CIMInstance with another CIMInstance defined by the input parameter for equality of all components.
[more]Boolean isUninitialized () const
Determines if the object has not been initialized.
[more]void filter (Boolean includeQualifiers, Boolean includeClassOrigin, const CIMPropertyList & propertyList)
Experimental Interface
Filter the properties, qualifiers and class origin attributes from this instance based on filtering criteria defined in the input parameters.

o CIMInstance()
Creates a CIMInstance object

o CIMInstance(const CIMInstance& x)
Creates a CIMInstance object from another CIMInstance object.
Parameters:
x - - CIMInstance object from which the new instance is created.

oPEGASUS_EXPLICIT CIMInstance(const CIMObject& x)
Creates a CIMInstance object from the given CIMObject.
Throws:
DynamicCastFailedException If a CIMInstance can not be created from the given CIMObject.
Parameters:
x - - CIMObject from which to create the CIMInstance.

o CIMInstance(const CIMName& className)
Creates a CIMInstance object of the class specified by the input parameter.
Parameters:
className - - CIMName to be used with new instance object.

oCIMInstance& operator=(const CIMInstance& x)
Copy Constructor.

o ~CIMInstance()
Destructor.

oconst CIMName& getClassName() const
Gets the class name of the instance.
Returns:
CIMName with the class name.

oconst CIMObjectPath& getPath() const

ovoid setPath(const CIMObjectPath & path)
Sets the object path for the instance.
Parameters:
path - - CIMObjectPath containing the object path.

oCIMInstance& addQualifier(const CIMQualifier& qualifier)
Adds the CIMQualifier object to the instance.
Throws:
AlreadyExistsException if the CIMQualifier already exists in the instance.
Parameters:
qualifier - - CIMQualifier object to add to instance.
Returns:
the resulting CIMInstance.

oUint32 findQualifier(const CIMName& name) const
Searches the instance for the qualifier object defined by the input parameter.
Parameters:
name - - CIMName defining the qualifier object to be found.
Returns:
Position of the qualifier to be used in subsequent operations or PEG_NOT_FOUND if the qualifier is not found.

oCIMQualifier getQualifier(Uint32 index)
Retrieves the qualifier object defined by the input parameter. The index to qualifier objects is zero-origin and continuous so that incrementing loops can be used to get all qualifier objects in a CIMInstance.
Throws:
IndexOutOfBoundsException exception if the index is out of bounds.
Parameters:
index - - Index for the qualifier object.
Returns:
Qualifier object defined by index.

oCIMConstQualifier getQualifier(Uint32 index) const
Retrieves the qualifier object defined by the input parameter. The index to qualifier objects is zero-origin and continuous so that incrementing loops can be used to get all qualifier objects in a CIMInstance.
Throws:
IndexOutOfBoundsException exception if the index is out of bounds.
Parameters:
index - - Index for the qualifier object.
Returns:
Qualifier object defined by index.

ovoid removeQualifier(Uint32 index)
Removes the qualifier defined by the index parameter.
Throws:
IndexOutOfBoundsException if the index is outside the range of existing qualifier objects for this instance.
Parameters:
index - Defines the index of the qualifier to be removed.

oUint32 getQualifierCount() const
Gets the count of the CIMQualifier objects defined for this CIMInstance.
Returns:
Count of the number of CIMQalifier objects in the CIMInstance.

oCIMInstance& addProperty(const CIMProperty& x)
Adds a property object defined by the input parameter to the CIMInstance.
Throws:
AlreadyExistsException if the property already exists.
Parameters:
x - - Property Object to be added. See the CIMProperty class for definition of the property object.
Returns:
the resulting CIMInstance.

oUint32 findProperty(const CIMName& name) const
Searches the CIMProperty objects in the CIMInstance for property object with the name defined by the input parameter.
Parameters:
name - - CIMName with the name of the property object to be found.
Returns:
Position in the CIM Instance to the property object if found or PEG_NOT_FOUND if no property object found with the name defined by the input parameter.

oCIMProperty getProperty(Uint32 index)
Gets the CIMProperty object in the CIMInstance defined by the input parameter. The index to qualifier objects is zero-origin and continuous so that incrementing loops can be used to get all qualifier objects in a CIMInstance.
Throws:
IndexOutOfBoundsException if index is outside the range of properties in this instance.
Parameters:
index - - Index to the property object in the CIMInstance.
Returns:
CIMProperty object corresponding to the index.

oCIMConstProperty getProperty(Uint32 index) const
Gets the CIMproperty object in the CIMInstance defined by the input parameter. The index to qualifier objects is zero-origin and continuous so that incrementing loops can be used to get all qualifier objects in a CIMInstance.
Throws:
IndexOutOfBoundsException if index is outside the range of properties in this instance.
Parameters:
index - - Index to the property object in the CIMInstance.
Returns:
CIMProperty object corresponding to the index.

ovoid removeProperty(Uint32 index)
Removes the property defined by the input parameter from the instance.
Throws:
IndexOutOfBoundsException if index is outside the range of properties in this instance.
Parameters:
index - - Index to the property to be removed from the instance. Normally this is obtained by getProperty().

oUint32 getPropertyCount() const
Gets the count of CIMProperty objects defined for this CIMInstance.
Returns:
Count of the number of CIMProperty objects in the CIMInstance. Zero indicates that no CIMProperty objects are contained in the CIMInstance.

oCIMObjectPath buildPath(const CIMConstClass& cimClass) const
Builds the CIM object path for this instance. The class argument is used to determine which fields are keys. The instance name has this form:

	    ClassName.key1=value1,...,keyN=valueN
	

The object path is in standard form (the class name and key name are all lowercase; the key-value pairs appear in sorted order by key name).

Note that the path attribute of the CIMInstanceRep object is not modified.

oCIMInstance clone() const
Makes a deep copy (clone) of the CIMInstance object.

oBoolean identical(const CIMConstInstance& x) const
Compares the CIMInstance with another CIMInstance defined by the input parameter for equality of all components.
Parameters:
x - - CIMInstance to be compared.
Returns:
true if they are identical, false otherwise.

oBoolean isUninitialized() const
Determines if the object has not been initialized.
Returns:
true if the object has not been initialized, false otherwise.

ovoid filter(Boolean includeQualifiers, Boolean includeClassOrigin, const CIMPropertyList & propertyList)
Experimental Interface
Filter the properties, qualifiers and class origin attributes from this instance based on filtering criteria defined in the input parameters. Note that this function does not add anything that was not in the instance at the beginning of the call. This function does NOT clone the instance but modifies the existing instance. The function was defined specifically for providers to allow creating instances for a specific instance operation response corresponding to the parameters provided with the operation call (includeQualifiers, etc.) from a more general instance template.

Parameters:
includeQualifiers - If false, qualifiers are removed from the instance and any properties included in the instance; otherwise no qualifiers are removed. Because there is still confusion over the exact operation of this parameter in the CIM specifications and the concept of instance level qualifiers, the behavior of this function when the parameter is true MAY change in the future to match any future clarifications of interoperable behavior in the CIM specifications.
includeClassOrigin - If false, ClassOrigin attributes are removed from all properties. Otherwise, ClassOrigin attributes are not filtered.
propertyList - This CIMPropertyList defines the list of properties that should be on the instance after completion of the call. If not NULL, properties absent from this list will be removed from the list. If NULL, no properties will be removed from the instance. If empty, all properties will be removed from the instance.
Returns:
The CIMInstance with properties and qualifiers from this instance based on the filtering criteria.

Example:

CIMClass myClass .. a defined and complete CIMClass.
create instance with qualifiers, class origin and all properties
CIMInstance myInstance =
myClass.buildInstance(true, true, CIMPropertyList());
filter qualifiers off of the instance.
myInstance.filterInstance(false, true, CIMPropertyList());


This class has no child classes.
Friends:
class CIMConstInstance
class CIMObject
class CIMConstObject
class Resolver
class XmlWriter
class MofWriter
class BinaryStreamer

Alphabetic index HTML hierarchy of classes or Java