version 1.61, 2002/08/28 01:16:48
|
version 1.62, 2003/03/12 21:02:53
|
|
|
class CIMClassRep; | class CIMClassRep; |
class Resolver; | class Resolver; |
| |
// REVIEW: redocument. |
|
| |
/** The CIMClass class is used to represent CIM classes in Pegasus. In CIM, |
/** The CIMClass class is used to represent CIM classes in Pegasus. |
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). |
|
*/ | */ |
class PEGASUS_COMMON_LINKAGE CIMClass | class PEGASUS_COMMON_LINKAGE CIMClass |
{ | { |
public: | public: |
| |
/** Constructor - Creates an uninitiated a new CIM object |
/** Creates an uninitialized new CIM object representing a CIM class. |
reprenting a CIM class. The class object created by this |
The class object created by this constructor can only be used |
constructor can only be used in an operation such as the |
in an operation such as the copy constructor. It cannot be used |
copy constructor. It cannot be used to create a class by |
to create a class by appending names, properties, etc. since it |
appending names, properties, etc. since it is unitiated. |
is uninitialized. |
|
|
Use one of the other constructors to create an initiated new CIM class |
Use one of the other constructors to create an initialized new |
object. |
CIM class object. |
@exception "unitialized handle" if this |
@exception UninitializedObjectException if an attempt is made to |
unitialized handle is used |
use the unitialized object. |
*/ | */ |
CIMClass(); | CIMClass(); |
| |
/** Constructor - Creates a class from a previous class |
/** Creates a new CIM object representing a CIMClass from the given |
|
CIMClass object. |
|
@param x CIMClass Object from which to create the CIMClass |
*/ | */ |
CIMClass(const CIMClass& x); | CIMClass(const CIMClass& x); |
| |
/** Constructor - Creates a Class object from the given CIMObject |
/** Creates a new CIMClass object representing a CIMClass from the given |
@param x CIMObject from which to create the CIMClass |
CIMObject Object. |
|
@param x CIMObject object from which to create the CIMClass object. |
@exception DynamicCastFailedException If a CIMClass can not be | @exception DynamicCastFailedException If a CIMClass can not be |
created from the given CIMObject |
created from the given CIMObject. |
*/ | */ |
PEGASUS_EXPLICIT CIMClass(const CIMObject& x); | PEGASUS_EXPLICIT CIMClass(const CIMObject& x); |
| |
/** Constructor - Creates a Class from inputs of a classname and |
/** Creates a new CIM object representing a CIMClass from inputs |
SuperClassName |
of a classname and SuperClassName. |
@param className CIMName representing name of the class being created |
@param className CIMName representing name of the class being created. |
@param superClassName CIMName representing name of the SuperClass |
@param superClassName CIMName representing name of the SuperClass. |
<pre> | <pre> |
CIMClass NewClass("MyClass", "YourClass"); | CIMClass NewClass("MyClass", "YourClass"); |
</pre> | </pre> |
|
|
*/ | */ |
CIMClass( | CIMClass( |
const CIMName& className, | const CIMName& className, |
const CIMName& superClassName = CIMName()); | const CIMName& superClassName = CIMName()); |
| |
/** Assignment operator. |
/// |
*/ |
|
CIMClass& operator=(const CIMClass& x); | CIMClass& operator=(const CIMClass& x); |
| |
/// Destructor | /// Destructor |
~CIMClass(); | ~CIMClass(); |
| |
/** isAssociation - Identifies whether or not this CIM class |
/** Identifies whether or not this CIM class is an association. An |
is an association. An association is a relationship between two |
association is a relationship between two (or more) classes or |
(or more) classes or instances of two classes. The properties of an |
instances of two classes. The properties of an association class |
association class include pointers, or references, to the two (or |
include pointers, or references, to the two (or more) instances. |
more) instances. All CIM classes can be included in one or more |
All CIM classes can be included in one or more associations. |
associations. |
@return true if this CIM class is an association, false |
@return Boolean True if this CIM class belongs to an association; |
otherwise. |
otherwise, false. |
|
*/ | */ |
Boolean isAssociation() const; | Boolean isAssociation() const; |
| |
/** isAbstract Test if the CIMClass is abstract. |
/** Tests if the CIMClass is abstract. |
@return - True if the CIMClass Object is abstract |
@return true if the CIMClass Object is abstract, false otherwise. |
SeeAlso: Abstract |
|
*/ | */ |
Boolean isAbstract() const; | Boolean isAbstract() const; |
| |
// ATTN: COMMENT. Why not just get name so we have common method for all. |
/** Gets the name of the class represented by this CIM object. |
/** getClassName Gets the name of the class |
@return CIMName with the class name. |
@return Returns CIMName with the class name. |
|
*/ | */ |
const CIMName& getClassName() const; | const CIMName& getClassName() const; |
| |
|
/// |
const CIMObjectPath& getPath() const; | const CIMObjectPath& getPath() const; |
| |
/** |
/** Sets the object path for the class. |
Sets the object path for the class |
@param path CIMObjectPath containing the object path. |
@param path CIMObjectPath containing the object path |
|
*/ | */ |
void setPath (const CIMObjectPath & path); | void setPath (const CIMObjectPath & path); |
| |
/** getSuperClassName - Gets the name of the Parent |
/** Gets the name of the Parent class of this CIM Object. |
@return CIMName with parent class name. | @return CIMName with parent class name. |
*/ | */ |
const CIMName& getSuperClassName() const; | const CIMName& getSuperClassName() const; |
| |
/** setSuperClassName - Sets the name of the parent class from |
/** Sets the name of the parent class from the input |
the input parameter. \REF{CLASSNAME}. |
parameter. |
@param CIMName defining parent name. |
@param superClassName - CIMName defining parent class name. |
*/ | */ |
void setSuperClassName(const CIMName& superClassName); | void setSuperClassName(const CIMName& superClassName); |
| |
/** addQualifier - Adds the specified qualifier to the class |
/** Adds the specified qualifier to the class and increments the |
and increments the qualifier count. It is illegal to add the same |
qualifier count. It is illegal to add the same qualifier more |
qualifier more than one time. |
than one time. |
@param qualifier CIMQualifier object representing the qualifier to be |
@param qualifier CIMQualifier object representing the qualifier |
added |
to be added. |
@return Returns handle of the class object |
@return the CIMClass object. |
@exception AlreadyExistsException. |
@exception AlreadyExistsException if the qualifier already exists. |
*/ | */ |
CIMClass& addQualifier(const CIMQualifier& qualifier); | CIMClass& addQualifier(const CIMQualifier& qualifier); |
| |
/** findQualifier - Searches for a qualifier with the specified ` |
/** Searches for a qualifier with the specified input name if it |
input name if it exists in the class |
exists in the class. |
@param name CIMName of the qualifier |
@param name CIMName of the qualifier to be found |
to be found @return Position of the qualifier in the Class. |
@return Index of the qualifier found or PEG_NOT_FOUND |
@return Returns index of the qualifier found or PEG_NOT_FOUND |
|
if not found. | if not found. |
*/ | */ |
Uint32 findQualifier(const CIMName& name) const; | Uint32 findQualifier(const CIMName& name) const; |
| |
/** getQualifier - Gets the CIMQualifier object defined |
/** Gets the CIMQualifier object defined by the input parameter. |
by the input parameter |
@param index Index of the qualifier in the class from the |
@param index defines the index of the qualifier in the class from the |
findQualifier method. |
findQualifier method |
@return CIMQualifier object representing the qualifier found. |
@return CIMQualifier object representing the qualifier found. On error, |
On error, CIMQualifier object will be null. |
CIMQualifier handle will be null. |
@exception IndexOutOfBoundsException exception if the index is |
|
outside the range of parameters available from the CIMClass. |
*/ | */ |
CIMQualifier getQualifier(Uint32 index); | CIMQualifier getQualifier(Uint32 index); |
| |
/** getQualifier - Gets the qualifier defined by the input parameter |
/** Gets the qualifier defined by the input parameter from the |
from the qualifier list for this CIMClass. |
qualifier list for this CIMClass. |
|
@param index Index of the qualifier in the CIM class. |
|
@return CIMConstQualifier object representing the qualifier |
|
found. On error, CIMConstQualifier object will be null. |
|
@exception IndexOutOfBoundsException exception if the index is |
|
outside the range of parameters available from the CIMClass. |
*/ | */ |
CIMConstQualifier getQualifier(Uint32 index) const; | CIMConstQualifier getQualifier(Uint32 index) const; |
| |
/** removeQualifier - Removes the qualifier defined by the |
/** Removes the qualifier defined by the index parameter. |
index parameter. |
@param index Defines the index of the qualifier to be removed. |
@param Defines the index of the qualifier to be removed. |
|
@return There is no return. |
|
@exception IndexOutOfBoundsException if the index is outside | @exception IndexOutOfBoundsException if the index is outside |
the range of existing qualifier objects for this class |
the range of existing qualifier objects for this class. |
*/ | */ |
void removeQualifier(Uint32 index); | void removeQualifier(Uint32 index); |
| |
/** getQualifierCount - Returns the number of qualifiers |
/** Gets the count of the number of qualifiers defined in the class. |
in the class. |
@return the number of qualifiers in the class definition (not |
@return the number of qualifiers on the class definition (not |
|
those on properties or methods) | those on properties or methods) |
*/ | */ |
Uint32 getQualifierCount() const; | Uint32 getQualifierCount() const; |
| |
/** addProperty - Adds the specified property object to the |
/** Adds the specified property object to the properties in |
properties in the CIM class |
the CIM class |
|
@param x CIMProperty to be added to the CIM Class. |
|
@return CIMClass object after the specified property is added. |
*/ | */ |
CIMClass& addProperty(const CIMProperty& x); | CIMClass& addProperty(const CIMProperty& x); |
| |
/** findProperty - Finds the property object with the |
/** Finds the property object with the name defined by the |
name defined by the input parameter in the class. |
input parameter in the class. |
@param CIMName parameter with the property name. |
@param name CIMName with the property name to be found. |
@return index representing the property object found or |
@return Index of the property object found or |
PEG_NOT_FOUND if the property is not found. | PEG_NOT_FOUND if the property is not found. |
*/ | */ |
Uint32 findProperty(const CIMName& name) const; | Uint32 findProperty(const CIMName& name) const; |
| |
/** getProperty - Returns a property representing the property |
/** Gets a property object from the CIMClass. |
defined by the input parameter |
@param index Index for the property object to get. |
@param index Index for this property |
@return CIMProperty object requested. |
@return CIMProperty object |
|
@exception IndexOutOfBoundsException if the index is outside | @exception IndexOutOfBoundsException if the index is outside |
the range of properties in this class |
the range of properties in this class. |
*/ | */ |
CIMProperty getProperty(Uint32 index); | CIMProperty getProperty(Uint32 index); |
| |
/**getProperty Gets a property object from the CIMClass |
/** Gets a property object from the CIMClass. |
@param index The index of the property object to get. |
@param index Index for the property object to get. |
@return Returns handle of the property object requested |
@return CIMProperty object requested. |
@exception IndexOutOfBoundsException if the index is outside | @exception IndexOutOfBoundsException if the index is outside |
the range of properties in this class |
the range of properties in this class. |
*/ | */ |
CIMConstProperty getProperty(Uint32 index) const; | CIMConstProperty getProperty(Uint32 index) const; |
| |
/** removeProperty - Remove the specified property from the class |
/** Removes the specified property from the class. |
@param index Index of the property to be removed |
@param index Index of the property to be removed. |
@exception IndexOutOfBoundsException if the index is outside | @exception IndexOutOfBoundsException if the index is outside |
the range of properties in this class |
the range of properties in this class. |
*/ | */ |
void removeProperty(Uint32 index); | void removeProperty(Uint32 index); |
| |
/** getPropertyCount - Gets the count of the number of properties |
/** Gets the count of the number of properties defined in the class. |
defined in the class. |
@return count of number of properties in the class. |
@return count of number of properties in the class |
|
*/ | */ |
Uint32 getPropertyCount() const; | Uint32 getPropertyCount() const; |
| |
/** addMethod - Adds the method object defined by the input |
/** Adds the method object defined by the input parameter to the |
parameter to the class and increments the count of the number of |
class and increments the count of the number of methods in the class. |
methods in the class |
@param name CIMMethod object representing the method to be added. |
@param method object representing the method to be added |
@return the CIMClass object to which the method was added. |
@return Returns the CIMClass object to which the method was added. |
@exception AlreadyExistsException if the method already exists. |
@exception AlreadyExistsException if the method already exists |
@exception UninitializedObjectException if the object is not initialized. |
@exception UninitializedObjectException if the object is not initialized |
|
*/ | */ |
CIMClass& addMethod(const CIMMethod& x); | CIMClass& addMethod(const CIMMethod& x); |
| |
/** findMethod - Locate the method object defined by the |
/** Locate the method object defined by the input parameter. |
name input |
@param name CIMName representing the name of the method to be found. |
@param CIMName representing the name of the method to be found |
@return Position of the method object in the class. |
@return Position of the method object in the class to be used in |
|
subsequent getmethod, etc. operations |
|
*/ | */ |
Uint32 findMethod(const CIMName& name) const; | Uint32 findMethod(const CIMName& name) const; |
| |
/** getMethod - Gets the method object defined by the |
/** Gets the method object defined by the input parameter. |
input parameter. |
@param index Index to the method object to get. |
@param index Index to the method object to get |
@return CIMMethod object of the method requested. |
@return Returns handle of the method requested |
|
@exception IndexOutOfBoundsException if the index is outside | @exception IndexOutOfBoundsException if the index is outside |
the range of methods in this class |
the range of methods in this class. |
*/ | */ |
CIMMethod getMethod(Uint32 index); | CIMMethod getMethod(Uint32 index); |
| |
/** getMethod Gets the method object defined by the input |
/** Gets the method object defined by the input parameter. |
parameter. This is the const version. |
@param index Index to the method object to get. |
|
@return CIMConstMethod object of the method requested. |
|
@exception IndexOutOfBoundsException if the index is outside |
|
the range of methods in this class. |
*/ | */ |
|
|
CIMConstMethod getMethod(Uint32 index) const; | CIMConstMethod getMethod(Uint32 index) const; |
| |
/** removeMethod - Removes the method defined by the |
/** Removes the method defined by the index parameter. |
index parameter. |
@param index Defines the index of the method to be removed. |
@param Defines the index of the method to be removed. |
@exception IndexOutOfBoundsException if the index is outside |
@return There is no return. |
the range of methods in this class. |
@exception Throw OutOfBound exception if the index is outside |
|
the range of existing method objects for this class |
|
*/ | */ |
void removeMethod(Uint32 index); | void removeMethod(Uint32 index); |
| |
/** getMethodCount - Count of the number of methods in the class |
/** Gets the count of the number of methods in the class. |
@return integer representing the number of methods in the class object. |
@return the count of the number of methods in the class object. |
*/ | */ |
Uint32 getMethodCount() const; | Uint32 getMethodCount() const; |
| |
/** Get names of all keys of this class. */ |
/// Get names of all keys of this class. |
void getKeyNames(Array<CIMName>& keyNames) const; | void getKeyNames(Array<CIMName>& keyNames) const; |
| |
|
/** Determines if the object has keys. |
|
@return true if the object has keys, false otherwise. |
|
*/ |
Boolean hasKeys() const; | Boolean hasKeys() const; |
| |
/** Makes a deep copy (clone) of the given object. */ |
/** Makes a deep copy (clone) of the given object. |
|
@return copy of the CIMClass object. |
|
*/ |
CIMClass clone() const; | CIMClass clone() const; |
| |
// ATTN: Clarify exactly what identical means |
/** Compares with another CIM class. |
/** identical - Compares with another class |
@param x Class object for the class to be compared. |
@param Class object for the class to be compared |
@return true if the classes are identical, false otherwise. |
@return True if the classes are identical |
|
*/ | */ |
Boolean identical(const CIMConstClass& x) const; | Boolean identical(const CIMConstClass& x) const; |
| |
/** |
/** Determines if the object has not been initialized. |
Determines if the object has not been initialized. |
@return true if the object has not been initialized, |
|
false otherwise. |
@return True if the object has not been initialized, |
|
False otherwise |
|
*/ | */ |
Boolean isUninitialized() const; | Boolean isUninitialized() const; |
| |
|
|
#include <Pegasus/Common/ArrayInter.h> | #include <Pegasus/Common/ArrayInter.h> |
#undef PEGASUS_ARRAY_T | #undef PEGASUS_ARRAY_T |
| |
// ATTN document this |
/// CIMConstClass |
/** CIMConstClass |
|
*/ |
|
class PEGASUS_COMMON_LINKAGE CIMConstClass | class PEGASUS_COMMON_LINKAGE CIMConstClass |
{ | { |
public: | public: |
| |
|
/// |
CIMConstClass(); | CIMConstClass(); |
| |
|
/// |
CIMConstClass(const CIMConstClass& x); | CIMConstClass(const CIMConstClass& x); |
| |
|
/// |
CIMConstClass(const CIMClass& x); | CIMConstClass(const CIMClass& x); |
| |
|
/// |
PEGASUS_EXPLICIT CIMConstClass(const CIMObject& x); | PEGASUS_EXPLICIT CIMConstClass(const CIMObject& x); |
| |
|
/// |
PEGASUS_EXPLICIT CIMConstClass(const CIMConstObject& x); | PEGASUS_EXPLICIT CIMConstClass(const CIMConstObject& x); |
| |
|
/// |
CIMConstClass( | CIMConstClass( |
const CIMName& className, | const CIMName& className, |
const CIMName& superClassName = CIMName()); | const CIMName& superClassName = CIMName()); |
| |
|
/// |
CIMConstClass& operator=(const CIMConstClass& x); | CIMConstClass& operator=(const CIMConstClass& x); |
| |
|
/// |
CIMConstClass& operator=(const CIMClass& x); | CIMConstClass& operator=(const CIMClass& x); |
| |
|
/// |
~CIMConstClass(); | ~CIMConstClass(); |
| |
|
/// |
Boolean isAssociation() const; | Boolean isAssociation() const; |
| |
|
/// |
Boolean isAbstract() const; | Boolean isAbstract() const; |
| |
|
/// |
const CIMName& getClassName() const; | const CIMName& getClassName() const; |
| |
|
/// |
const CIMObjectPath& getPath() const; | const CIMObjectPath& getPath() const; |
| |
|
/// |
const CIMName& getSuperClassName() const; | const CIMName& getSuperClassName() const; |
| |
|
/// |
Uint32 findQualifier(const CIMName& name) const; | Uint32 findQualifier(const CIMName& name) const; |
| |
|
/// |
CIMConstQualifier getQualifier(Uint32 index) const; | CIMConstQualifier getQualifier(Uint32 index) const; |
| |
|
/// |
Uint32 getQualifierCount() const; | Uint32 getQualifierCount() const; |
| |
|
/// |
Uint32 findProperty(const CIMName& name) const; | Uint32 findProperty(const CIMName& name) const; |
| |
|
/// |
CIMConstProperty getProperty(Uint32 index) const; | CIMConstProperty getProperty(Uint32 index) const; |
| |
|
/// |
Uint32 getPropertyCount() const; | Uint32 getPropertyCount() const; |
| |
|
/// |
Uint32 findMethod(const CIMName& name) const; | Uint32 findMethod(const CIMName& name) const; |
| |
|
/// |
CIMConstMethod getMethod(Uint32 index) const; | CIMConstMethod getMethod(Uint32 index) const; |
| |
|
/// |
Uint32 getMethodCount() const; | Uint32 getMethodCount() const; |
| |
|
/// |
void getKeyNames(Array<CIMName>& keyNames) const; | void getKeyNames(Array<CIMName>& keyNames) const; |
| |
|
/// |
Boolean hasKeys() const; | Boolean hasKeys() const; |
| |
|
/// |
CIMClass clone() const; | CIMClass clone() const; |
| |
|
/// |
Boolean identical(const CIMConstClass& x) const; | Boolean identical(const CIMConstClass& x) const; |
| |
|
/// |
Boolean isUninitialized() const; | Boolean isUninitialized() const; |
| |
private: | private: |