CIMObject Class Reference

#include <CIMObject.h>

List of all members.

Public Member Functions

 CIMObject ()
 CIMObject (const CIMObject &x)
 CIMObject (const CIMClass &x)
 CIMObject (const CIMInstance &x)
CIMObjectoperator= (const CIMObject &x)
 ~CIMObject ()
const CIMNamegetClassName () const
const CIMObjectPathgetPath () const
void setPath (const CIMObjectPath &path)
CIMObjectaddQualifier (const CIMQualifier &qualifier)
Uint32 findQualifier (const CIMName &name) const
CIMQualifier getQualifier (Uint32 index)
CIMConstQualifier getQualifier (Uint32 index) const
void removeQualifier (Uint32 index)
Uint32 getQualifierCount () const
CIMObjectaddProperty (const CIMProperty &x)
Uint32 findProperty (const CIMName &name) const
CIMProperty getProperty (Uint32 index)
CIMConstProperty getProperty (Uint32 index) const
void removeProperty (Uint32 index)
Uint32 getPropertyCount () const
CIMObject clone () const
Boolean identical (const CIMConstObject &x) const
Boolean isUninitialized () const
String toString () const
Boolean isClass () const
Boolean isInstance () const


Detailed Description

The CIMObject class represents the DMTF standard CIM object definition, which may represent a CIMClass or a CIMInstance.

The CIMObject class uses a shared representation model, such that multiple CIMObject objects may refer to the same data copy. Assignment and copy operators create new references to the same data, not distinct copies. An update to a CIMObject object affects all the CIMObject objects that refer to the same data copy. The data remains valid until all the CIMObject objects that refer to it are destructed. A separate copy of the data may be created using the clone method.


Constructor & Destructor Documentation

CIMObject::CIMObject (  ) 

Constructs an uninitialized CIMObject 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.

CIMObject::CIMObject ( const CIMObject x  ) 

Constructs a CIMObject 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 a new CIMObject object.

CIMObject::CIMObject ( const CIMClass x  ) 

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

Parameters:
x The CIMClass object from which to construct the CIMObject object.

CIMObject::CIMObject ( const CIMInstance x  ) 

Constructs a CIMObject 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 the CIMObject object.

CIMObject::~CIMObject (  ) 

Destructs the CIMObject object.


Member Function Documentation

CIMObject& CIMObject::addProperty ( const CIMProperty x  ) 

Adds a property to the object.

Parameters:
x The CIMProperty to be added.
Returns:
A reference to this CIMObject object.
Exceptions:
AlreadyExistsException If a property with the same name already exists in the CIMObject.
UninitializedObjectException If the object is not initialized.

CIMObject& CIMObject::addQualifier ( const CIMQualifier qualifier  ) 

Adds a qualifier to the object.

Parameters:
qualifier The CIMQualifier to be added.
Returns:
A reference to this CIMObject object.
Exceptions:
AlreadyExistsException If a qualifier with the same name already exists in the CIMObject.
UninitializedObjectException If the object is not initialized.

CIMObject CIMObject::clone (  )  const

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

Returns:
A new copy of the CIMObject object.
Exceptions:
UninitializedObjectException If the object is not initialized.

Uint32 CIMObject::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 CIMObject::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& CIMObject::getClassName (  )  const

Gets the class name of the object.

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

const CIMObjectPath& CIMObject::getPath (  )  const

Gets the object path for the object.

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

CIMConstProperty CIMObject::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 CIMObject.
UninitializedObjectException If the object is not initialized.

CIMProperty CIMObject::getProperty ( Uint32  index  ) 

Gets the property at the specified index.

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

Uint32 CIMObject::getPropertyCount (  )  const

Gets the number of properties in the object.

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

CIMConstQualifier CIMObject::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 CIMObject.
UninitializedObjectException If the object is not initialized.

CIMQualifier CIMObject::getQualifier ( Uint32  index  ) 

Gets the qualifier at the specified index.

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

Uint32 CIMObject::getQualifierCount (  )  const

Gets the number of qualifiers in the object.

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

Boolean CIMObject::identical ( const CIMConstObject x  )  const

Compares the CIMObject with a specified CIMConstObject.

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

Boolean CIMObject::isClass (  )  const

Indicates whether the object represents a CIMClass.

Returns:
True if the object represents a CIMClass; false otherwise.

Boolean CIMObject::isInstance (  )  const

Indicates whether the object represents a CIMInstance.

Returns:
True if the object represents a CIMInstance; false otherwise.

Boolean CIMObject::isUninitialized (  )  const

Determines whether the object has been initialized.

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

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

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

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

void CIMObject::removeProperty ( Uint32  index  ) 

Removes a property from the object.

Parameters:
index The index of the property to remove.
Exceptions:
IndexOutOfBoundsException If the index is outside the range of properties available for the CIMObject.
UninitializedObjectException If the object is not initialized.

void CIMObject::removeQualifier ( Uint32  index  ) 

Removes a qualifier from the object.

Parameters:
index The index of the qualifier to remove.
Exceptions:
IndexOutOfBoundsException If the index is outside the range of qualifiers available for the CIMObject.
UninitializedObjectException If the object is not initialized.

void CIMObject::setPath ( const CIMObjectPath path  ) 

Sets the object path for the object.

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

String CIMObject::toString (  )  const

Generates a human-readable String representing the value of the CIMObject. The String may be in MOF format, but the format is not guaranteed and may change without notice.

Returns:
A human-readable String representing the CIMObject value.
Exceptions:
UninitializedObjectException If the object is not initialized.


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