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

class PEGASUS_COMMON_LINKAGE CIMClass

The CIMClass class is used to represent CIM classes in Pegasus.

Documentation

The CIMClass class is used to represent CIM classes in Pegasus.

Inheritance:


Public Methods

[more] CIMClass ()
Creates an uninitialized new CIM object representing a CIM class.
[more] CIMClass (const CIMClass& x)
Creates a new CIM object representing a CIMClass from the given CIMClass object.
[more]PEGASUS_EXPLICIT CIMClass (const CIMObject& x)
Creates a new CIMClass object representing a CIMClass from the given CIMObject Object.
[more] CIMClass ( const CIMName& className, const CIMName& superClassName = CIMName())
Creates a new CIM object representing a CIMClass from inputs of a classname and SuperClassName.
[more]CIMClass& operator= (const CIMClass& x)
[more] ~CIMClass ()
Destructor
[more]Boolean isAssociation () const
Identifies whether or not this CIM class is an association.
[more]Boolean isAbstract () const
Tests if the CIMClass is abstract.
[more]const CIMName& getClassName () const
Gets the name of the class represented by this CIM object.
[more]const CIMObjectPath& getPath () const
[more]void setPath (const CIMObjectPath & path)
Sets the object path for the class.
[more]const CIMName& getSuperClassName () const
Gets the name of the Parent class of this CIM Object.
[more]void setSuperClassName (const CIMName& superClassName)
Sets the name of the parent class from the input parameter.
[more]CIMClass& addQualifier (const CIMQualifier& qualifier)
Adds the specified qualifier to the class and increments the qualifier count.
[more]Uint32 findQualifier (const CIMName& name) const
Searches for a qualifier with the specified input name if it exists in the class.
[more]CIMQualifier getQualifier (Uint32 index)
Gets the CIMQualifier object defined by the input parameter.
[more]CIMConstQualifier getQualifier (Uint32 index) const
Gets the qualifier defined by the input parameter from the qualifier list for this CIMClass.
[more]void removeQualifier (Uint32 index)
Removes the qualifier defined by the index parameter.
[more]Uint32 getQualifierCount () const
Gets the count of the number of qualifiers defined in the class.
[more]CIMClass& addProperty (const CIMProperty& x)
Adds the specified property object to the properties in the CIM class
[more]Uint32 findProperty (const CIMName& name) const
Finds the property object with the name defined by the input parameter in the class.
[more]CIMProperty getProperty (Uint32 index)
Gets a property object from the CIMClass.
[more]CIMConstProperty getProperty (Uint32 index) const
Gets a property object from the CIMClass.
[more]void removeProperty (Uint32 index)
Removes the specified property from the class.
[more]Uint32 getPropertyCount () const
Gets the count of the number of properties defined in the class.
[more]CIMClass& addMethod (const CIMMethod& x)
Adds the method object defined by the input parameter to the class and increments the count of the number of methods in the class.
[more]Uint32 findMethod (const CIMName& name) const
Locate the method object defined by the input parameter.
[more]CIMMethod getMethod (Uint32 index)
Gets the method object defined by the input parameter.
[more]CIMConstMethod getMethod (Uint32 index) const
Gets the method object defined by the input parameter.
[more]void removeMethod (Uint32 index)
Removes the method defined by the index parameter.
[more]Uint32 getMethodCount () const
Gets the count of the number of methods in the class.
[more]void getKeyNames (Array<CIMName>& keyNames) const
Get names of all keys of this class
[more]Boolean hasKeys () const
Determines if the object has keys.
[more]CIMClass clone () const
Makes a deep copy (clone) of the given object.
[more]Boolean identical (const CIMConstClass& x) const
Compares with another CIM class.
[more]Boolean isUninitialized () const
Determines if the object has not been initialized.
[more]CIMInstance buildInstance (Boolean includeQualifiers, Boolean includeClassOrigin, const CIMPropertyList & propertyList) const
Experimental Interface
Build a CIMInstance based on this CIM Class.

o CIMClass()
Creates an uninitialized new CIM object representing a CIM class. The class object created by this constructor can only be used in an operation such as the copy constructor. It cannot be used to create a class by appending names, properties, etc. since it is uninitialized.

Use one of the other constructors to create an initialized new CIM class object.

Throws:
UninitializedObjectException if an attempt is made to use the unitialized object.

o CIMClass(const CIMClass& x)
Creates a new CIM object representing a CIMClass from the given CIMClass object.
Parameters:
x - CIMClass Object from which to create the CIMClass

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

o CIMClass( const CIMName& className, const CIMName& superClassName = CIMName())
Creates a new CIM object representing a CIMClass from inputs of a classname and SuperClassName.
Parameters:
className - CIMName representing name of the class being created.
superClassName - CIMName representing name of the SuperClass.
CIMClass NewClass("MyClass", "YourClass");

oCIMClass& operator=(const CIMClass& x)

o ~CIMClass()
Destructor

oBoolean isAssociation() const
Identifies whether or not this CIM class is an association. An association is a relationship between two (or more) classes or instances of two classes. The properties of an association class include pointers, or references, to the two (or more) instances. All CIM classes can be included in one or more associations.
Returns:
true if this CIM class is an association, false otherwise.

oBoolean isAbstract() const
Tests if the CIMClass is abstract.
Returns:
true if the CIMClass Object is abstract, false otherwise.

oconst CIMName& getClassName() const
Gets the name of the class represented by this CIM object.
Returns:
CIMName with the class name.

oconst CIMObjectPath& getPath() const

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

oconst CIMName& getSuperClassName() const
Gets the name of the Parent class of this CIM Object.
Returns:
CIMName with parent class name.

ovoid setSuperClassName(const CIMName& superClassName)
Sets the name of the parent class from the input parameter.
Parameters:
superClassName - - CIMName defining parent class name.

oCIMClass& addQualifier(const CIMQualifier& qualifier)
Adds the specified qualifier to the class and increments the qualifier count. It is illegal to add the same qualifier more than one time.
Throws:
AlreadyExistsException if the qualifier already exists.
Parameters:
qualifier - CIMQualifier object representing the qualifier to be added.
Returns:
the CIMClass object.

oUint32 findQualifier(const CIMName& name) const
Searches for a qualifier with the specified input name if it exists in the class.
Parameters:
name - CIMName of the qualifier to be found
Returns:
Index of the qualifier found or PEG_NOT_FOUND if not found.

oCIMQualifier getQualifier(Uint32 index)
Gets the CIMQualifier object defined by the input parameter.
Throws:
IndexOutOfBoundsException exception if the index is outside the range of parameters available from the CIMClass.
Parameters:
index - Index of the qualifier in the class from the findQualifier method.
Returns:
CIMQualifier object representing the qualifier found. On error, CIMQualifier object will be null.

oCIMConstQualifier getQualifier(Uint32 index) const
Gets the qualifier defined by the input parameter from the qualifier list for this CIMClass.
Throws:
IndexOutOfBoundsException exception if the index is outside the range of parameters available from the CIMClass.
Parameters:
index - Index of the qualifier in the CIM class.
Returns:
CIMConstQualifier object representing the qualifier found. On error, CIMConstQualifier object will be null.

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 class.
Parameters:
index - Defines the index of the qualifier to be removed.

oUint32 getQualifierCount() const
Gets the count of the number of qualifiers defined in the class.
Returns:
the number of qualifiers in the class definition (not those on properties or methods)

oCIMClass& addProperty(const CIMProperty& x)
Adds the specified property object to the properties in the CIM class
Parameters:
x - CIMProperty to be added to the CIM Class.
Returns:
CIMClass object after the specified property is added.

oUint32 findProperty(const CIMName& name) const
Finds the property object with the name defined by the input parameter in the class.
Parameters:
name - CIMName with the property name to be found.
Returns:
Index of the property object found or PEG_NOT_FOUND if the property is not found.

oCIMProperty getProperty(Uint32 index)
Gets a property object from the CIMClass.
Throws:
IndexOutOfBoundsException if the index is outside the range of properties in this class.
Parameters:
index - Index for the property object to get.
Returns:
CIMProperty object requested.

oCIMConstProperty getProperty(Uint32 index) const
Gets a property object from the CIMClass.
Throws:
IndexOutOfBoundsException if the index is outside the range of properties in this class.
Parameters:
index - Index for the property object to get.
Returns:
CIMProperty object requested.

ovoid removeProperty(Uint32 index)
Removes the specified property from the class.
Throws:
IndexOutOfBoundsException if the index is outside the range of properties in this class.
Parameters:
index - Index of the property to be removed.

oUint32 getPropertyCount() const
Gets the count of the number of properties defined in the class.
Returns:
count of number of properties in the class.

oCIMClass& addMethod(const CIMMethod& x)
Adds the method object defined by the input parameter to the class and increments the count of the number of methods in the class.
Throws:
AlreadyExistsException if the method already exists.
UninitializedObjectException if the object is not initialized.
Parameters:
name - CIMMethod object representing the method to be added.
Returns:
the CIMClass object to which the method was added.

oUint32 findMethod(const CIMName& name) const
Locate the method object defined by the input parameter.
Parameters:
name - CIMName representing the name of the method to be found.
Returns:
Position of the method object in the class.

oCIMMethod getMethod(Uint32 index)
Gets the method object defined by the input parameter.
Throws:
IndexOutOfBoundsException if the index is outside the range of methods in this class.
Parameters:
index - Index to the method object to get.
Returns:
CIMMethod object of the method requested.

oCIMConstMethod getMethod(Uint32 index) const
Gets the method object defined by the input parameter.
Throws:
IndexOutOfBoundsException if the index is outside the range of methods in this class.
Parameters:
index - Index to the method object to get.
Returns:
CIMConstMethod object of the method requested.

ovoid removeMethod(Uint32 index)
Removes the method defined by the index parameter.
Throws:
IndexOutOfBoundsException if the index is outside the range of methods in this class.
Parameters:
index - Defines the index of the method to be removed.

oUint32 getMethodCount() const
Gets the count of the number of methods in the class.
Returns:
the count of the number of methods in the class object.

ovoid getKeyNames(Array<CIMName>& keyNames) const
Get names of all keys of this class

oBoolean hasKeys() const
Determines if the object has keys.
Returns:
true if the object has keys, false otherwise.

oCIMClass clone() const
Makes a deep copy (clone) of the given object.
Returns:
copy of the CIMClass object.

oBoolean identical(const CIMConstClass& x) const
Compares with another CIM class.
Parameters:
x - Class object for the class to be compared.
Returns:
true if the classes 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.

oCIMInstance buildInstance(Boolean includeQualifiers, Boolean includeClassOrigin, const CIMPropertyList & propertyList) const
Experimental Interface
Build a CIMInstance based on this CIM Class. Properties in the instance are initialized to the default values (if any) specified in the class definition. The parameters of the call determine whether qualifiers are included, the class origin attributes are included and which properties are included in the new instance. This method is designed specifically for providers to allow them to easily build instance objects using the parameters provided with the CIM instance operations such as getInstance, enumerateInstances.

Parameters:
includeQualifiers - If true attaches the class level qualifiers from this class to the instance and all properties inserted in the instance. If false, no qualifiers are attached to the instance or to any properties included in the instance. The TOINSTANCE flavor is ignored. 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 true ClassOrigin attributes attached to properties inthe class object are transferred to the properties attached to the instance object. If false, any ClassOrigin attributes are ignored.
propertyList - A CIMPropertyList defining the properties that are to be added to the created instance. If propertyList is not NULL properties defined in the class and in this propertyList are added to the new instance. If the propertyLlist is NULL, all properties are added to the instance. If the propertyList exists but is empty, not properties are added. Note that this function does NOT generate an error if a property name is supplied that is NOT in the class; it simply does not add that property to the instance.
Returns:
CIMInstance of this class appropriately initialized.

Example:

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


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

Alphabetic index HTML hierarchy of classes or Java