CIMConstInstance Class Reference

#include <CIMInstance.h>

List of all members.

Public Member Functions

 CIMConstInstance ()
 CIMConstInstance (const CIMConstInstance &x)
 CIMConstInstance (const CIMInstance &x)
 CIMConstInstance (const CIMObject &x)
 CIMConstInstance (const CIMConstObject &x)
 CIMConstInstance (const CIMName &className)
CIMConstInstanceoperator= (const CIMConstInstance &x)
CIMConstInstanceoperator= (const CIMInstance &x)
 ~CIMConstInstance ()
const CIMNamegetClassName () const
const CIMObjectPathgetPath () const
Uint32 findQualifier (const CIMName &name) const
CIMConstQualifier getQualifier (Uint32 index) const
Uint32 getQualifierCount () const
Uint32 findProperty (const CIMName &name) const
CIMConstProperty getProperty (Uint32 index) const
Uint32 getPropertyCount () const
CIMObjectPath buildPath (const CIMConstClass &cimClass) const
CIMInstance clone () const
Boolean identical (const CIMConstInstance &x) const
Boolean isUninitialized () const


Detailed Description

The CIMConstInstance class provides a const interface to a CIMInstance object. This class is needed because the shared representation model used by CIMInstance does not prevent modification to a const CIMInstance object. Note that the value of a CIMConstInstance object could still be modified by a CIMInstance object that refers to the same data copy.


Constructor & Destructor Documentation

CIMConstInstance::CIMConstInstance (  ) 

Constructs an uninitialized CIMConstInstance object. A method invocation on an uninitialized object will result in the throwing of an UninitializedObjectException. An uninitialized object may be converted into an initialized object only by using the assignment operator with an initialized object.

CIMConstInstance::CIMConstInstance ( const CIMConstInstance x  ) 

Constructs a CIMConstInstance object from the value of a specified CIMConstInstance object, so that both objects refer to the same data copy.

Parameters:
x The CIMConstInstance object from which to construct a new CIMConstInstance object.

CIMConstInstance::CIMConstInstance ( const CIMInstance x  ) 

Constructs a CIMConstInstance object from the value of a specified CIMInstance object, so that both objects refer to the same data copy.

Parameters:
x The CIMInstance object from which to construct a new CIMConstInstance object.

CIMConstInstance::CIMConstInstance ( const CIMObject x  )  [explicit]

Constructs a CIMConstInstance object from the value of a specified CIMObject object, so that both objects refer to the same data copy.

Parameters:
x The CIMObject object from which to construct the CIMConstInstance object.
Exceptions:
DynamicCastFailedException If a CIMConstInstance can not be created from the given CIMObject.

CIMConstInstance::CIMConstInstance ( const CIMConstObject x  )  [explicit]

Constructs a CIMConstInstance object from the value of a specified CIMConstObject object, so that both objects refer to the same data copy.

Parameters:
x The CIMConstObject object from which to construct the CIMConstInstance object.
Exceptions:
DynamicCastFailedException If a CIMConstInstance can not be created from the given CIMConstObject.

CIMConstInstance::CIMConstInstance ( const CIMName className  ) 

Constructs a CIMConstInstance object with the specified class name.

Parameters:
className A CIMName specifying the class name of the instance.

CIMConstInstance::~CIMConstInstance (  ) 

Destructs the CIMConstInstance object.


Member Function Documentation

CIMObjectPath CIMConstInstance::buildPath ( const CIMConstClass cimClass  )  const

Builds the object path for this instance, based on the class name and property values in the instance and the Key qualifiers on the properties in the class definition. The returned object path does not include hostname and namespace attributes. Note that this method does not update the path attribute of the CIMInstance.

Returns:
A CIMObjectPath containing the object path for the instance.
Exceptions:
UninitializedObjectException If the object is not initialized.

CIMInstance CIMConstInstance::clone (  )  const

Makes a deep copy of the instance. This creates a new copy of all the instance attributes including qualifiers and properties.

Returns:
A CIMInstance object with a separate copy of the CIMConstInstance object.
Exceptions:
UninitializedObjectException If the object is not initialized.

Uint32 CIMConstInstance::findProperty ( const CIMName name  )  const

Finds a property by name.

Parameters:
name A CIMName specifying the name of the property to be found.
Returns:
Index of the property if found or PEG_NOT_FOUND if not found.
Exceptions:
UninitializedObjectException If the object is not initialized.

Uint32 CIMConstInstance::findQualifier ( const CIMName name  )  const

Finds a qualifier by name.

Parameters:
name A CIMName specifying the name of the qualifier to be found.
Returns:
Index of the qualifier if found or PEG_NOT_FOUND if not found.
Exceptions:
UninitializedObjectException If the object is not initialized.

const CIMName& CIMConstInstance::getClassName (  )  const

Gets the class name of the instance.

Returns:
A CIMName containing the class name.
Exceptions:
UninitializedObjectException If the object is not initialized.

const CIMObjectPath& CIMConstInstance::getPath (  )  const

Gets the object path for the instance.

Returns:
A CIMObjectPath containing the object path.
Exceptions:
UninitializedObjectException If the object is not initialized.

CIMConstProperty CIMConstInstance::getProperty ( Uint32  index  )  const

Gets the property at the specified index.

Parameters:
index The index of the property to be retrieved.
Returns:
The CIMConstProperty at the specified index.
Exceptions:
IndexOutOfBoundsException If the index is outside the range of properties available for the CIMConstInstance.
UninitializedObjectException If the object is not initialized.

Uint32 CIMConstInstance::getPropertyCount (  )  const

Gets the number of properties in the instance.

Returns:
An integer count of the properties in the CIMConstInstance.
Exceptions:
UninitializedObjectException If the object is not initialized.

CIMConstQualifier CIMConstInstance::getQualifier ( Uint32  index  )  const

Gets the qualifier at the specified index.

Parameters:
index The index of the qualifier to be retrieved.
Returns:
The CIMConstQualifier at the specified index.
Exceptions:
IndexOutOfBoundsException If the index is outside the range of qualifiers available for the CIMConstInstance.
UninitializedObjectException If the object is not initialized.

Uint32 CIMConstInstance::getQualifierCount (  )  const

Gets the number of qualifiers in the instance.

Returns:
An integer count of the qualifiers in the CIMInstance.
Exceptions:
UninitializedObjectException If the object is not initialized.

Boolean CIMConstInstance::identical ( const CIMConstInstance x  )  const

Compares the CIMConstInstance with a specified CIMConstInstance.

Parameters:
x The CIMConstInstance to be compared.
Returns:
True if this instance is identical to the one specified, false otherwise.
Exceptions:
UninitializedObjectException If the object is not initialized.

Boolean CIMConstInstance::isUninitialized (  )  const

Determines whether the object has been initialized.

Returns:
True if the object has not been initialized, false otherwise.

CIMConstInstance& CIMConstInstance::operator= ( const CIMInstance x  ) 

Assigns the value of the specified CIMInstance object to this object, so that both objects refer to the same data copy.

Parameters:
x The CIMInstance object from which to assign this CIMConstInstance object.
Returns:
A reference to this CIMConstInstance object.

CIMConstInstance& CIMConstInstance::operator= ( const CIMConstInstance x  ) 

Assigns the value of the specified CIMConstInstance object to this object, so that both objects refer to the same data copy.

Parameters:
x The CIMConstInstance object from which to assign this CIMConstInstance object.
Returns:
A reference to this CIMConstInstance object.


The documentation for this class was generated from the following file:
  • /scratch/rpmbuild.22230.L22270/pegasus/src/Pegasus/Common/CIMInstance.h