In file ..\..\src\Pegasus\Common\CIMClass.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. In CIM, a class object may be a class or an associator. A CIM class must contain a name and may contain methods, properties, and qualifiers. It is a template for creating a CIM instance. A CIM class represents a collection of CIM instances, all of which support a common type (for example, a set of properties, methods, and associations).

Inheritance:


Public Methods

[more] CIMClass ()
Constructor - Creates an uninitiated a new CIM object reprenting a CIM class.
[more] CIMClass (const CIMClass& x)
Constructor - Creates a class from a previous class
[more]CIMClass& operator= (const CIMClass& x)
Operator = Assigns the CIM Class constructor
[more] CIMClass ( const String& className, const String& superClassName = String())
Constructor - Creates a Class from inputs of a classname and SuperClassName
[more] ~CIMClass ()
Destructor
[more]Boolean isAssociation () const
isAssociation - Identifies whether or not this CIM class is an association.
[more]Boolean isAbstract () const
isAbstract Test if the CIMClass is abstract.
[more]const String& getClassName () const
getClassName Gets the name of the class ATTN: COMMENT.
[more]const String& getSuperClassName () const
getSuperClassName - Gets the name of the Parent
[more]void setSuperClassName (const String& superClassName)
setSuperClassName - Sets the name of the parent class from the input parameter.
[more]CIMClass& addQualifier (const CIMQualifier& qualifier)
addQualifier - Adds the specified qualifier to the class and increments the qualifier count.
[more]Uint32 findQualifier (const String& name) const
findQualifier - Searches for a qualifier with the specified ` input name if it exists in the class
[more]Boolean existsQualifier (const String& name) const
existsQualifier - Returns true if the qualifier with the specified name exists in the class
[more]CIMQualifier getQualifier (Uint32 pos)
getQualifier - Gets the CIMQualifier object defined by the input parameter
[more]CIMConstQualifier getQualifier (Uint32 pos) const
getQualifier - ATTN:
[more]void removeQualifier (Uint32 pos) const
removeQualifier - Removes the qualifier defined by the index parameter.
[more]Uint32 getQualifierCount () const
getQualifierCount - Returns the number of qualifiers in the class.
[more]CIMClass& addProperty (const CIMProperty& x)
addProperty - Adds the specified property object to the properties in the CIM class
[more]Uint32 findProperty (const String& name)
findProperty - Finds the property object with the name defined by the input parameter in the class.
[more]Boolean existsProperty (const String& name)
existsPropery - Determines if a property object with the name defined by the input parameter exists in the class.
[more]CIMProperty getProperty (Uint32 pos)
getProperty - Returns a property representing the property defined by the input parameter
[more]CIMConstProperty getProperty (Uint32 pos) const
getProperty Gets a property object from the CIMClass
[more]void removeProperty (Uint32 pos)
removeProperty - Removes the property represented by the position input parameter from the class
[more]Uint32 getPropertyCount () const
getPropertyCount - Gets the count of the number of properties defined in the class.
[more]CIMClass& addMethod (const CIMMethod& x)
addMethod - 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 String& name)
findMethod - Locate the method object defined by the name input
[more]Boolean existsMethod (const String& name)
existsMethod - Determine if the method object defined by the name input exists
[more]CIMMethod getMethod (Uint32 pos)
getMethod - Gets the method object defined by the input parameter.
[more]CIMConstMethod getMethod (Uint32 pos) const
getMethod Gets the method object defined by the input parameter.
[more]void removeMethod (Uint32 pos) const
removeMethod - Removes the method defined by the index parameter.
[more]Uint32 getMethodCount () const
getMethodCount - Count of the number of methods in the class
[more]void resolve ( DeclContext* declContext, const String& nameSpace)
Resolve - Resolve the class: inherit any properties and qualifiers.
[more] operator int () const
operator - ATTN:
[more]void toXml (Array<Sint8>& out) const
toXML - prepares an XML representation of the CIMClass object in the provided Sint8 variable.
[more]void print (PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const
print - Prints the toXML output to cout
[more]void toMof (Array<Sint8>& out) const
toMof - prepares a MOF representation of the CIMClass object in the provided Sint8 variable.
[more]void printMof (PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const
printMof - Prints the toMof output to cout
[more]Boolean identical (const CIMConstClass& x) const
identical - Compares with another class ATTN: Clarify exactly what identical means
[more]CIMClass clone () const
Makes a deep copy (clone) of the given object.
[more]void getKeyNames (Array<String>& keyNames) const
Get names of all keys of this class.

o CIMClass()
Constructor - Creates an uninitiated a new CIM object reprenting 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 unitiated.

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

Throws:
Throws an exception "unitialized handle" if this unitialized handle is used /REF(HPEGASUS_HANDLES)

o CIMClass(const CIMClass& x)
Constructor - Creates a class from a previous class

oCIMClass& operator=(const CIMClass& x)
Operator = Assigns the CIM Class constructor

o CIMClass( const String& className, const String& superClassName = String())
Constructor - Creates a Class from inputs of a classname and SuperClassName
Parameters:
className - String representing name of the class being created
superClassName - String representing name of the SuperClass ATTN: Define what makes up legal name.
Returns:
Throws IllegalName if className argument illegal CIM identifier.
CIMClass NewCass("MyClass", "YourClass");

o ~CIMClass()
Destructor

oBoolean isAssociation() const
isAssociation - 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:
Boolean True if this CIM class belongs to an association; otherwise, false.

oBoolean isAbstract() const
isAbstract Test if the CIMClass is abstract.
Returns:
- True if the CIMClass Object is abstract SeeAlso: Abstract

oconst String& getClassName() const
getClassName Gets the name of the class ATTN: COMMENT. Why not just get name so we have common method for all.
Returns:
Returns string with the class name.

oconst String& getSuperClassName() const
getSuperClassName - Gets the name of the Parent
Returns:
String with parent class name.

ovoid setSuperClassName(const String& superClassName)
setSuperClassName - Sets the name of the parent class from the input parameter. \REF{CLASSNAME}. ATTN: Define legal classnames
Throws:
throws IllegalName if the name is not correct. See ClassNames
Parameters:
- String defining parent name.
Returns:
Throws IllegalName if superClassName argument not legal CIM identifier

oCIMClass& addQualifier(const CIMQualifier& qualifier)
addQualifier - 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:
Throws AlreadyExists.
Parameters:
qualifier - CIMQualifier object representing the qualifier to be added
Returns:
Returns handle of the class object

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

oBoolean existsQualifier(const String& name) const
existsQualifier - Returns true if the qualifier with the specified name exists in the class
Parameters:
name - String name of the qualifier object being tested.
Returns:
True if the qualifier exits. Otherwise false is returned.

oCIMQualifier getQualifier(Uint32 pos)
getQualifier - Gets the CIMQualifier object defined by the input parameter
Parameters:
pos - defines the position of the qualifier in the class from the findQualifier method
Returns:
CIMQualifier object representing the qualifier found. ATTN: what is error return here?

oCIMConstQualifier getQualifier(Uint32 pos) const
getQualifier - ATTN:

ovoid removeQualifier(Uint32 pos) const
removeQualifier - Removes the qualifier defined by the index parameter.
Throws:
Throw OutOfBound exception if the index is outside the range of existing qualifier objects for this class
Parameters:
Defines - the index of the qualifier to be removed.
Returns:
There is no return.

oUint32 getQualifierCount() const
getQualifierCount - Returns the number of qualifiers in the class.
Returns:
ATTN:

oCIMClass& addProperty(const CIMProperty& x)
addProperty - Adds the specified property object to the properties in the CIM class

oUint32 findProperty(const String& name)
findProperty - Finds the property object with the name defined by the input parameter in the class.
Parameters:
- String parameter with the property name.
Returns:
position representing the property object found or PEG_NOT_FOUND if the property is not found.

oBoolean existsProperty(const String& name)
existsPropery - Determines if a property object with the name defined by the input parameter exists in the class. @parm String parameter with the property name.
Returns:
True if the property object exists.

oCIMProperty getProperty(Uint32 pos)
getProperty - Returns a property representing the property defined by the input parameter
Parameters:
position - for this property ATTN: Should we not use something like handle for position???
Returns:
CIMProperty object ATTN: what is error return?

oCIMConstProperty getProperty(Uint32 pos) const
getProperty Gets a property object from the CIMClass
Throws:
Throws OutofBounds if the size field is greather than the bunber of properties in the class.
Parameters:
pos - The index of the property object to get.
Returns:
Returns handle of the property object requested

ovoid removeProperty(Uint32 pos)
removeProperty - Removes the property represented by the position input parameter from the class
Throws:
Throws OutofBounds if index is not a property object
Parameters:
pos - Index to the property to be removed from the findPropety method

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

oCIMClass& addMethod(const CIMMethod& x)
addMethod - 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:
Throws AlreadyExists if the method already exists and throws UnitializedHandle if the handle is not initialized
Parameters:
method - object representing the method to be added
Returns:
Returns the CIMClass object to which the method was added.

oUint32 findMethod(const String& name)
findMethod - Locate the method object defined by the name input
Parameters:
- String representing the name of the method to be found
Returns:
Position of the method object in the class to be used in subsequent getmethod, etc. operations

oBoolean existsMethod(const String& name)
existsMethod - Determine if the method object defined by the name input exists
Parameters:
- String representing the name of the method to be found
Returns:
True if the method exists

oCIMMethod getMethod(Uint32 pos)
getMethod - Gets the method object defined by the input parameter.
Throws:
Throws OutofBounds if the index represented by pos is greater than the number of methods defined in the class object
Parameters:
pos - Index to the method object to get
Returns:
Returns handle of the method requested

oCIMConstMethod getMethod(Uint32 pos) const
getMethod Gets the method object defined by the input parameter. This is the const version.

ovoid removeMethod(Uint32 pos) const
removeMethod - Removes the method defined by the index parameter.
Throws:
Throw OutOfBound exception if the index is outside the range of existing method objects for this class
Parameters:
Defines - the index of the method to be removed.
Returns:
There is no return.

oUint32 getMethodCount() const
getMethodCount - Count of the number of methods in the class
Returns:
integer representing the number of methods in the class object.

ovoid resolve( DeclContext* declContext, const String& nameSpace)
Resolve - Resolve the class: inherit any properties and qualifiers. Make sure the superClass really exists and is consistent with this class. Also set the propagated flag class-origin for each class feature. ATTN: explain why this here

o operator int() const
operator - ATTN:

ovoid toXml(Array<Sint8>& out) const
toXML - prepares an XML representation of the CIMClass object in the provided Sint8 variable.
Parameters:
out - Sint8 array for the XML representation

ovoid print(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const
print - Prints the toXML output to cout

ovoid toMof(Array<Sint8>& out) const
toMof - prepares a MOF representation of the CIMClass object in the provided Sint8 variable.
Parameters:
out - Sint8 array for the XML representation

ovoid printMof(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const
printMof - Prints the toMof output to cout

oBoolean identical(const CIMConstClass& x) const
identical - Compares with another class ATTN: Clarify exactly what identical means
Parameters:
Class - object for the class to be compared
Returns:
True if the classes are identical

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

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


This class has no child classes.
Friends:
class CIMConstClass
class CIMObject

Alphabetic index HTML hierarchy of classes or Java