CIMClass Class Reference

#include <CIMClass.h>

List of all members.

Public Member Functions

 CIMClass ()
 CIMClass (const CIMClass &x)
 CIMClass (const CIMObject &x)
 CIMClass (const CIMName &className, const CIMName &superClassName=CIMName())
CIMClassoperator= (const CIMClass &x)
 ~CIMClass ()
Boolean isAssociation () const
Boolean isAbstract () const
const CIMNamegetClassName () const
const CIMObjectPathgetPath () const
void setPath (const CIMObjectPath &path)
const CIMNamegetSuperClassName () const
void setSuperClassName (const CIMName &superClassName)
CIMClassaddQualifier (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
CIMClassaddProperty (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
CIMClassaddMethod (const CIMMethod &x)
Uint32 findMethod (const CIMName &name) const
CIMMethod getMethod (Uint32 index)
CIMConstMethod getMethod (Uint32 index) const
void removeMethod (Uint32 index)
Uint32 getMethodCount () const
void getKeyNames (Array< CIMName > &keyNames) const
Boolean hasKeys () const
CIMClass clone () const
Boolean identical (const CIMConstClass &x) const
Boolean isUninitialized () const

Detailed Description

The CIMClass class represents the DMTF standard CIM class definition.

The CIMClass class uses a shared representation model, such that multiple CIMClass 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 CIMClass object affects all the CIMClass objects that refer to the same data copy. The data remains valid until all the CIMClass objects that refer to it are destructed. A separate copy of the data may be created using the clone method.


Constructor & Destructor Documentation

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

CIMClass::CIMClass ( const CIMClass x)

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

Parameters:
xThe CIMClass object from which to construct a new CIMClass object.
CIMClass::CIMClass ( const CIMObject x) [explicit]

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

Parameters:
xThe CIMObject object from which to construct the CIMClass object.
Exceptions:
DynamicCastFailedExceptionIf a CIMClass can not be created from the given CIMObject.
CIMClass::CIMClass ( const CIMName className,
const CIMName superClassName = CIMName() 
)

Constructs a CIMClass object with the specified attributes.

Example:

            CIMClass NewClass("MyClass", "YourClass");
        
Parameters:
classNameA CIMName specifying the name of the class.
superClassNameA CIMName specifying name of the parent class. (A null value indicates no superclass.)

Destructs the CIMClass object.


Member Function Documentation

Adds a method to the class.

Parameters:
xThe CIMMethod to be added.
Returns:
A reference to this CIMClass object.
Exceptions:
AlreadyExistsExceptionIf a method with the same name already exists in the CIMClass.
UninitializedObjectExceptionIf the object is not initialized.

Adds a property to the class.

Parameters:
xThe CIMProperty to be added.
Returns:
A reference to this CIMClass object.
Exceptions:
AlreadyExistsExceptionIf a property with the same name already exists in the CIMClass.
UninitializedObjectExceptionIf the object is not initialized.
CIMClass& CIMClass::addQualifier ( const CIMQualifier qualifier)

Adds a qualifier to the class.

Parameters:
qualifierThe CIMQualifier to be added.
Returns:
A reference to this CIMClass object.
Exceptions:
AlreadyExistsExceptionIf a qualifier with the same name already exists in the CIMClass.
UninitializedObjectExceptionIf the object is not initialized.

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

Returns:
A new copy of the CIMClass object.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.
Uint32 CIMClass::findMethod ( const CIMName name) const

Finds a method by name.

Parameters:
nameA CIMName specifying the name of the method to be found.
Returns:
Index of the method if found or PEG_NOT_FOUND if not found.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.
Uint32 CIMClass::findProperty ( const CIMName name) const

Finds a property by name.

Parameters:
nameA 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:
UninitializedObjectExceptionIf the object is not initialized.
Uint32 CIMClass::findQualifier ( const CIMName name) const

Finds a qualifier by name.

Parameters:
nameA 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:
UninitializedObjectExceptionIf the object is not initialized.
const CIMName& CIMClass::getClassName ( ) const

Gets the name of the class.

Returns:
A CIMName containing the class name.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.
void CIMClass::getKeyNames ( Array< CIMName > &  keyNames) const

Gets the list of key properties in this class. The Key qualifier on CIMProperty objects is used to locate key properties.

Returns:
An Array of CIMName objects containing the names of the key properties.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.
CIMMethod CIMClass::getMethod ( Uint32  index)

Gets the method at the specified index.

Parameters:
indexThe index of the method to be retrieved.
Returns:
The CIMMethod at the specified index.
Exceptions:
IndexOutOfBoundsExceptionIf the index is outside the range of methods available for the CIMClass.
UninitializedObjectExceptionIf the object is not initialized.
CIMConstMethod CIMClass::getMethod ( Uint32  index) const

Gets the method at the specified index.

Parameters:
indexThe index of the method to be retrieved.
Returns:
The CIMConstMethod at the specified index.
Exceptions:
IndexOutOfBoundsExceptionIf the index is outside the range of methods available for the CIMClass.
UninitializedObjectExceptionIf the object is not initialized.
Uint32 CIMClass::getMethodCount ( ) const

Gets the number of methods in the class.

Returns:
An integer count of the methods in the CIMClass.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.
const CIMObjectPath& CIMClass::getPath ( ) const

Gets the object path for the class.

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

Gets the property at the specified index.

Parameters:
indexThe index of the property to be retrieved.
Returns:
The CIMProperty at the specified index.
Exceptions:
IndexOutOfBoundsExceptionIf the index is outside the range of properties available for the CIMClass.
UninitializedObjectExceptionIf the object is not initialized.
CIMConstProperty CIMClass::getProperty ( Uint32  index) const

Gets the property at the specified index.

Parameters:
indexThe index of the property to be retrieved.
Returns:
The CIMConstProperty at the specified index.
Exceptions:
IndexOutOfBoundsExceptionIf the index is outside the range of properties available for the CIMClass.
UninitializedObjectExceptionIf the object is not initialized.
Uint32 CIMClass::getPropertyCount ( ) const

Gets the number of properties in the class.

Returns:
An integer count of the properties in the CIMClass.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.

Gets the qualifier at the specified index.

Parameters:
indexThe index of the qualifier to be retrieved.
Returns:
The CIMQualifier at the specified index.
Exceptions:
IndexOutOfBoundsExceptionIf the index is outside the range of qualifiers available for the CIMClass.
UninitializedObjectExceptionIf the object is not initialized.
CIMConstQualifier CIMClass::getQualifier ( Uint32  index) const

Gets the qualifier at the specified index.

Parameters:
indexThe index of the qualifier to be retrieved.
Returns:
The CIMConstQualifier at the specified index.
Exceptions:
IndexOutOfBoundsExceptionIf the index is outside the range of qualifiers available for the CIMClass.
UninitializedObjectExceptionIf the object is not initialized.
Uint32 CIMClass::getQualifierCount ( ) const

Gets the number of qualifiers in the class.

Returns:
An integer count of the qualifiers in the CIMClass.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.

Gets the name of the parent class of this class.

Returns:
A CIMName containing parent class name.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.
Boolean CIMClass::hasKeys ( ) const

Indicates whether this class contains key properties. The Key qualifier on CIMProperty objects is used to make this determination.

Returns:
True if this class contains key properties, false otherwise.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.
Boolean CIMClass::identical ( const CIMConstClass x) const

Compares the CIMClass with a specified CIMConstClass.

Parameters:
xThe CIMConstClass to be compared.
Returns:
True if this class is identical to the one specified, false otherwise.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.
Boolean CIMClass::isAbstract ( ) const

Indicates whether this class is an abstract class. The Abstract qualifier is used to make this determination.

Returns:
True if this class is an abstract class, false otherwise.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.
Boolean CIMClass::isAssociation ( ) const

Indicates whether this class is an association class. An association is a relationship between two (or more) classes or instances. The Association qualifier is used to make this determination.

Returns:
True if this class is an association class, false otherwise.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.
Boolean CIMClass::isUninitialized ( ) const

Determines whether the object has been initialized.

Returns:
True if the object has not been initialized, false otherwise.
CIMClass& CIMClass::operator= ( const CIMClass x)

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

Parameters:
xThe CIMClass object from which to assign this CIMClass object.
Returns:
A reference to this CIMClass object.
void CIMClass::removeMethod ( Uint32  index)

Removes a method from the class.

Parameters:
indexThe index of the method to remove.
Exceptions:
IndexOutOfBoundsExceptionIf the index is outside the range of methods available for the CIMClass.
UninitializedObjectExceptionIf the object is not initialized.
void CIMClass::removeProperty ( Uint32  index)

Removes a property from the class.

Parameters:
indexThe index of the property to remove.
Exceptions:
IndexOutOfBoundsExceptionIf the index is outside the range of properties available for the CIMClass.
UninitializedObjectExceptionIf the object is not initialized.
void CIMClass::removeQualifier ( Uint32  index)

Removes a qualifier from the class.

Parameters:
indexThe index of the qualifier to remove.
Exceptions:
IndexOutOfBoundsExceptionIf the index is outside the range of qualifiers available for the CIMClass.
UninitializedObjectExceptionIf the object is not initialized.
void CIMClass::setPath ( const CIMObjectPath path)

Sets the object path for the class.

Parameters:
pathA CIMObjectPath containing the object path.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.
void CIMClass::setSuperClassName ( const CIMName superClassName)

Sets the name of the parent class.

Parameters:
superClassNameA CIMName specifying the parent class name.
Exceptions:
UninitializedObjectExceptionIf the object is not initialized.

The documentation for this class was generated from the following file:
  • /srv/build/STABLE_8/pkgs/tog-pegasus/BUILD/pegasus/src/Pegasus/Common/CIMClass.h