version 1.71, 2005/02/05 22:59:23
|
version 1.71.18.2, 2006/03/07 18:45:45
|
|
|
//%2005//////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development | // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. | // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. | // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; | // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
// EMC Corporation; VERITAS Software Corporation; The Open Group. | // EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
class Resolver; | class Resolver; |
| |
| |
/** The CIMClass class is used to represent CIM classes in Pegasus. |
/** |
|
The CIMClass class represents the DMTF standard CIM class definition. |
|
|
|
<p>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. |
*/ | */ |
class PEGASUS_COMMON_LINKAGE CIMClass | class PEGASUS_COMMON_LINKAGE CIMClass |
{ | { |
public: | public: |
| |
/** Creates an uninitialized new CIM object representing a CIM class. |
/** |
The class object created by this constructor can only be used |
Constructs an uninitialized CIMClass object. A method |
in an operation such as the copy constructor. It cannot be used |
invocation on an uninitialized object will result in the throwing |
to create a class by appending names, properties, etc. since it |
of an UninitializedObjectException. An uninitialized object may |
is uninitialized. |
be converted into an initialized object only by using the assignment |
|
operator with an initialized object. |
Use one of the other constructors to create an initialized new |
|
CIM class object. |
|
@exception UninitializedObjectException if an attempt is made to |
|
use the unitialized object. |
|
*/ | */ |
CIMClass(); | CIMClass(); |
| |
/** Creates a new CIM object representing a CIMClass from the given |
/** |
|
Constructs a CIMClass object from the value of a specified |
|
CIMClass object, so that both objects refer to the same data copy. |
|
@param x The CIMClass object from which to construct a new |
CIMClass object. | CIMClass object. |
@param x CIMClass Object from which to create the CIMClass |
|
*/ | */ |
CIMClass(const CIMClass& x); | CIMClass(const CIMClass& x); |
| |
/** Creates a new CIMClass object representing a CIMClass from the given |
/** |
CIMObject Object. |
Constructs a CIMClass object from the value of a specified |
@param x CIMObject object from which to create the CIMClass object. |
CIMObject object, so that both objects refer to the same data copy. |
|
@param x The CIMObject object from which to construct 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); |
| |
/** Creates a new CIM object representing a CIMClass from inputs |
/** |
of a classname and SuperClassName. |
Constructs a CIMClass object with the specified attributes. |
@param className CIMName representing name of the class being created. |
<p><b>Example:</b> |
@param superClassName CIMName representing name of the SuperClass. |
|
<pre> | <pre> |
CIMClass NewClass("MyClass", "YourClass"); | CIMClass NewClass("MyClass", "YourClass"); |
</pre> | </pre> |
|
|
|
@param className A CIMName specifying the name of the class. |
|
@param superClassName A CIMName specifying name of the parent class. |
|
(A null value indicates no superclass.) |
*/ | */ |
CIMClass( | CIMClass( |
const CIMName& className, | const CIMName& className, |
const CIMName& superClassName = CIMName()); | const CIMName& superClassName = CIMName()); |
| |
/// |
/** |
|
Assigns the value of the specified CIMClass object to this object, |
|
so that both objects refer to the same data copy. |
|
@param x The CIMClass object from which to assign this CIMClass |
|
object. |
|
@return A reference to this CIMClass object. |
|
*/ |
CIMClass& operator=(const CIMClass& x); | CIMClass& operator=(const CIMClass& x); |
| |
/// Destructor |
/** |
|
Destructs the CIMClass object. |
|
*/ |
~CIMClass(); | ~CIMClass(); |
| |
/** Identifies whether or not this CIM class is an association. An |
/** |
|
Indicates whether this class is an association class. An |
association is a relationship between two (or more) classes or | association is a relationship between two (or more) classes or |
instances of two classes. The properties of an association class |
instances. The Association qualifier is used to make this |
include pointers, or references, to the two (or more) instances. |
determination. |
All CIM classes can be included in one or more associations. |
@return True if this class is an association class, false otherwise. |
@return true if this CIM class is an association, false |
@exception UninitializedObjectException If the object is not |
otherwise. |
initialized. |
*/ | */ |
Boolean isAssociation() const; | Boolean isAssociation() const; |
| |
/** Tests if the CIMClass is abstract. |
/** |
@return true if the CIMClass Object is abstract, false otherwise. |
Indicates whether this class is an abstract class. |
|
The Abstract qualifier is used to make this determination. |
|
@return True if this class is an abstract class, false otherwise. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
Boolean isAbstract() const; | Boolean isAbstract() const; |
| |
|
/** |
/** Gets the name of the class represented by this CIM object. |
Gets the name of the class. |
@return CIMName with the class name. |
@return A CIMName containing the class name. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
const CIMName& getClassName() const; | const CIMName& getClassName() const; |
| |
/// |
/** |
|
Gets the object path for the class. |
|
@return A CIMObjectPath containing the object path. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
const CIMObjectPath& getPath() const; | const CIMObjectPath& getPath() const; |
| |
/** Sets the object path for the class. |
/** |
@param path CIMObjectPath containing the object path. |
Sets the object path for the class. |
|
@param path A CIMObjectPath containing the object path. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
void setPath (const CIMObjectPath & path); | void setPath (const CIMObjectPath & path); |
| |
/** Gets the name of the Parent class of this CIM Object. |
/** |
@return CIMName with parent class name. |
Gets the name of the parent class of this class. |
|
@return A CIMName containing parent class name. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
const CIMName& getSuperClassName() const; | const CIMName& getSuperClassName() const; |
| |
/** Sets the name of the parent class from the input |
/** |
parameter. |
Sets the name of the parent class. |
@param superClassName - CIMName defining parent class name. |
@param superClassName A CIMName specifying the parent class name. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
void setSuperClassName(const CIMName& superClassName); | void setSuperClassName(const CIMName& superClassName); |
| |
/** Adds the specified qualifier to the class and increments the |
/** |
qualifier count. It is illegal to add the same qualifier more |
Adds a qualifier to the class. |
than one time. |
@param qualifier The CIMQualifier to be added. |
@param qualifier CIMQualifier object representing the qualifier |
@return A reference to this CIMClass object. |
to be added. |
@exception AlreadyExistsException If a qualifier with the |
@return the CIMClass object. |
same name already exists in the CIMClass. |
@exception AlreadyExistsException if the qualifier already exists. |
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
CIMClass& addQualifier(const CIMQualifier& qualifier); | CIMClass& addQualifier(const CIMQualifier& qualifier); |
| |
/** Searches for a qualifier with the specified input name if it |
/** |
exists in the class. |
Finds a qualifier by name. |
@param name CIMName of the qualifier to be found |
@param name A CIMName specifying the name of the qualifier to be found. |
@return Index of the qualifier found or PEG_NOT_FOUND |
@return Index of the qualifier if found or PEG_NOT_FOUND if not found. |
if not found. |
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
Uint32 findQualifier(const CIMName& name) const; | Uint32 findQualifier(const CIMName& name) const; |
| |
/** Gets the CIMQualifier object defined by the input parameter. |
/** |
@param index Index of the qualifier in the class from the |
Gets the qualifier at the specified index. |
findQualifier method. |
@param index The index of the qualifier to be retrieved. |
@return CIMQualifier object representing the qualifier found. |
@return The CIMQualifier at the specified index. |
On error, CIMQualifier object will be null. |
@exception IndexOutOfBoundsException If the index is outside |
@exception IndexOutOfBoundsException exception if the index is |
the range of qualifiers available for the CIMClass. |
outside the range of parameters available from the CIMClass. |
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
CIMQualifier getQualifier(Uint32 index); | CIMQualifier getQualifier(Uint32 index); |
| |
/** Gets the qualifier defined by the input parameter from the |
/** |
qualifier list for this CIMClass. |
Gets the qualifier at the specified index. |
@param index Index of the qualifier in the CIM class. |
@param index The index of the qualifier to be retrieved. |
@return CIMConstQualifier object representing the qualifier |
@return The CIMConstQualifier at the specified index. |
found. On error, CIMConstQualifier object will be null. |
@exception IndexOutOfBoundsException If the index is outside |
@exception IndexOutOfBoundsException exception if the index is |
the range of qualifiers available for the CIMClass. |
outside the range of parameters available from the CIMClass. |
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
CIMConstQualifier getQualifier(Uint32 index) const; | CIMConstQualifier getQualifier(Uint32 index) const; |
| |
/** Removes the qualifier defined by the index parameter. |
/** |
@param index Defines the index of the qualifier to be removed. |
Removes a qualifier from the class. |
@exception IndexOutOfBoundsException if the index is outside |
@param index The index of the qualifier to remove. |
the range of existing qualifier objects for this class. |
@exception IndexOutOfBoundsException If the index is |
|
outside the range of qualifiers available for the CIMClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
void removeQualifier(Uint32 index); | void removeQualifier(Uint32 index); |
| |
/** Gets the count of the number of qualifiers defined in the class. |
/** |
@return the number of qualifiers in the class definition (not |
Gets the number of qualifiers in the class. |
those on properties or methods) |
@return An integer count of the qualifiers in the CIMClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
Uint32 getQualifierCount() const; | Uint32 getQualifierCount() const; |
| |
/** Adds the specified property object to the properties in |
/** |
the CIM class |
Adds a property to the class. |
@param x CIMProperty to be added to the CIM Class. |
@param x The CIMProperty to be added. |
@return CIMClass object after the specified property is added. |
@return A reference to this CIMClass object. |
|
@exception AlreadyExistsException If a property with the |
|
same name already exists in the CIMClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
CIMClass& addProperty(const CIMProperty& x); | CIMClass& addProperty(const CIMProperty& x); |
| |
/** Finds the property object with the name defined by the |
/** |
input parameter in the class. |
Finds a property by name. |
@param name CIMName with the property name to be found. |
@param name A CIMName specifying the name of the property to be found. |
@return Index of the property object found or |
@return Index of the property if found or PEG_NOT_FOUND if not found. |
PEG_NOT_FOUND if the property is not found. |
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
Uint32 findProperty(const CIMName& name) const; | Uint32 findProperty(const CIMName& name) const; |
| |
/** Gets a property object from the CIMClass. |
/** |
@param index Index for the property object to get. |
Gets the property at the specified index. |
@return CIMProperty object requested. |
@param index The index of the property to be retrieved. |
@exception IndexOutOfBoundsException if the index is outside |
@return The CIMProperty at the specified index. |
the range of properties in this class. |
@exception IndexOutOfBoundsException If the index is outside |
|
the range of properties available for the CIMClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
CIMProperty getProperty(Uint32 index); | CIMProperty getProperty(Uint32 index); |
| |
/** Gets a property object from the CIMClass. |
/** |
@param index Index for the property object to get. |
Gets the property at the specified index. |
@return CIMProperty object requested. |
@param index The index of the property to be retrieved. |
@exception IndexOutOfBoundsException if the index is outside |
@return The CIMConstProperty at the specified index. |
the range of properties in this class. |
@exception IndexOutOfBoundsException If the index is outside |
|
the range of properties available for the CIMClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
CIMConstProperty getProperty(Uint32 index) const; | CIMConstProperty getProperty(Uint32 index) const; |
| |
/** Removes the specified property from the class. |
/** |
@param index Index of the property to be removed. |
Removes a property from the class. |
@exception IndexOutOfBoundsException if the index is outside |
@param index The index of the property to remove. |
the range of properties in this class. |
@exception IndexOutOfBoundsException If the index is |
|
outside the range of properties available for the CIMClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
void removeProperty(Uint32 index); | void removeProperty(Uint32 index); |
| |
/** Gets the count of the number of properties defined in the class. |
/** |
@return count of number of properties in the class. |
Gets the number of properties in the class. |
|
@return An integer count of the properties in the CIMClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
Uint32 getPropertyCount() const; | Uint32 getPropertyCount() const; |
| |
/** Adds the method object defined by the input parameter to the |
/** |
class and increments the count of the number of methods in the class. |
Adds a method to the class. |
@param name CIMMethod object representing the method to be added. |
@param x The CIMMethod to be added. |
@return the CIMClass object to which the method was added. |
@return A reference to this CIMClass object. |
@exception AlreadyExistsException if the method already exists. |
@exception AlreadyExistsException If a method with the |
@exception UninitializedObjectException if the object is not initialized. |
same name already exists in the CIMClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
CIMClass& addMethod(const CIMMethod& x); | CIMClass& addMethod(const CIMMethod& x); |
| |
/** Locate the method object defined by the input parameter. |
/** |
@param name CIMName representing the name of the method to be found. |
Finds a method by name. |
@return Position of the method object in the class. |
@param name A CIMName specifying the name of the method to be found. |
|
@return Index of the method if found or PEG_NOT_FOUND if not found. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
Uint32 findMethod(const CIMName& name) const; | Uint32 findMethod(const CIMName& name) const; |
| |
/** Gets the method object defined by the input parameter. |
/** |
@param index Index to the method object to get. |
Gets the method at the specified index. |
@return CIMMethod object of the method requested. |
@param index The index of the method to be retrieved. |
@exception IndexOutOfBoundsException if the index is outside |
@return The CIMMethod at the specified index. |
the range of methods in this class. |
@exception IndexOutOfBoundsException If the index is outside |
|
the range of methods available for the CIMClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
CIMMethod getMethod(Uint32 index); | CIMMethod getMethod(Uint32 index); |
| |
/** Gets the method object defined by the input parameter. |
/** |
@param index Index to the method object to get. |
Gets the method at the specified index. |
@return CIMConstMethod object of the method requested. |
@param index The index of the method to be retrieved. |
@exception IndexOutOfBoundsException if the index is outside |
@return The CIMConstMethod at the specified index. |
the range of methods in this class. |
@exception IndexOutOfBoundsException If the index is outside |
|
the range of methods available for the CIMClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
CIMConstMethod getMethod(Uint32 index) const; | CIMConstMethod getMethod(Uint32 index) const; |
| |
/** Removes the method defined by the index parameter. |
/** |
@param index Defines the index of the method to be removed. |
Removes a method from the class. |
@exception IndexOutOfBoundsException if the index is outside |
@param index The index of the method to remove. |
the range of methods in this class. |
@exception IndexOutOfBoundsException If the index is |
|
outside the range of methods available for the CIMClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
void removeMethod(Uint32 index); | void removeMethod(Uint32 index); |
| |
/** Gets the count of the number of methods in the class. |
/** |
@return the count of the number of methods in the class object. |
Gets the number of methods in the class. |
|
@return An integer count of the methods in the CIMClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
Uint32 getMethodCount() const; | Uint32 getMethodCount() const; |
| |
/// Get names of all keys of this class. |
/** |
|
Gets the list of key properties in this class. The Key qualifier |
|
on CIMProperty objects is used to locate key properties. |
|
@return An Array of CIMName objects containing the names of the key |
|
properties. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
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. |
Indicates whether this class contains key properties. The Key |
|
qualifier on CIMProperty objects is used to make this determination. |
|
@return True if this class contains key properties, false otherwise. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
Boolean hasKeys() const; | Boolean hasKeys() const; |
| |
/** Makes a deep copy (clone) of the given object. |
/** |
@return copy of the CIMClass object. |
Makes a deep copy of the class. This creates a new copy of all |
|
the class attributes including qualifiers, properties, and methods. |
|
@return A new copy of the CIMClass object. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
CIMClass clone() const; | CIMClass clone() const; |
| |
/** Compares with another CIM class. |
/** |
@param x Class object for the class to be compared. |
Compares the CIMClass with a specified CIMConstClass. |
@return true if the classes are identical, false otherwise. |
@param x The CIMConstClass to be compared. |
|
@return True if this class is identical to the one specified, |
|
false otherwise. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
Boolean identical(const CIMConstClass& x) const; | Boolean identical(const CIMConstClass& x) const; |
| |
/** Determines if the object has not been initialized. |
/** |
@return true if the object has not been initialized, |
Determines whether the object has been initialized. |
false otherwise. |
@return True if the object has not been initialized, false otherwise. |
*/ | */ |
Boolean isUninitialized() const; | Boolean isUninitialized() const; |
| |
#ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES | #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES |
/** <I><B>Experimental Interface</B></I><BR> |
/** |
Build a CIMInstance based on this CIM Class. Properties in the instance |
<I><B>Experimental Interface</B></I><BR> |
are initialized to the default values (if any) specified in the class |
Builds a CIMInstance based on this CIMClass. Properties in the |
definition. The parameters of the call determine whether qualifiers are |
instance are initialized to the default values (if any) specified |
included, the class origin attributes are included and which properties |
in the class definition. The method arguments determine whether |
are included in the new instance. This method is designed specifically |
qualifiers are included, the class origin attributes are included, |
for providers to allow them to easily build instance objects using the |
and which properties are included in the new instance. This method |
parameters provided with the CIM instance operations such as getInstance, |
is designed specifically for providers to allow them to easily build |
enumerateInstances. |
instance objects using the parameters provided with the CIM instance |
|
operations such as getInstance and enumerateInstances. |
@param 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. |
|
|
|
@param 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. |
|
|
|
@param 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. |
|
| |
@return CIMInstance of this class appropriately initialized. |
|
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMClass myClass .. a defined and complete CIMClass. | CIMClass myClass .. a defined and complete CIMClass. |
|
|
CIMInstance myInstance = | CIMInstance myInstance = |
myClass.buildInstance(true, true, CIMPropertyList()); | myClass.buildInstance(true, true, CIMPropertyList()); |
</pre> | </pre> |
|
|
|
@param includeQualifiers A Boolean indicating whether qualifiers in |
|
the class definition (and its properties) are to be added to the |
|
instance. If false, no qualifiers are added to the instance or its |
|
properties. The TOINSTANCE flavor is ignored. Because the CIM |
|
specification is unclear on the meaning of this parameter and its |
|
relationship to instance operations, the behavior when this parameter |
|
is true MAY change in the future based on clarifications of the |
|
CIM specification. |
|
|
|
@param includeClassOrigin A Boolean indicating whether ClassOrigin |
|
attributes are to be transferred from the class object to the |
|
instance. |
|
|
|
@param propertyList A CIMPropertyList defining the properties that |
|
are to be added to the created instance. If the propertyList is not |
|
NULL, properties defined in the class and in this propertyList are |
|
added to the new instance. If the propertyList is NULL, all |
|
properties are added to the instance. If the propertyList is empty, |
|
no 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. |
|
|
|
@return CIMInstance of this class appropriately initialized. |
|
|
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
*/ | */ |
CIMInstance buildInstance(Boolean includeQualifiers, | CIMInstance buildInstance(Boolean includeQualifiers, |
Boolean includeClassOrigin, | Boolean includeClassOrigin, |
|
|
#include <Pegasus/Common/ArrayInter.h> | #include <Pegasus/Common/ArrayInter.h> |
#undef PEGASUS_ARRAY_T | #undef PEGASUS_ARRAY_T |
| |
/// CIMConstClass |
|
|
/** |
|
The CIMConstClass class provides a const interface to a CIMClass |
|
object. This class is needed because the shared representation model |
|
used by CIMClass does not prevent modification to a const CIMClass |
|
object. Note that the value of a CIMConstClass object could still be |
|
modified by a CIMClass object that refers to the same data copy. |
|
*/ |
class PEGASUS_COMMON_LINKAGE CIMConstClass | class PEGASUS_COMMON_LINKAGE CIMConstClass |
{ | { |
public: | public: |
| |
/// |
/** |
|
Constructs an uninitialized CIMConstClass 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. |
|
*/ |
CIMConstClass(); | CIMConstClass(); |
| |
/// |
/** |
|
Constructs a CIMConstClass object from the value of a specified |
|
CIMConstClass object, so that both objects refer to the same data copy. |
|
@param x The CIMConstClass object from which to construct a new |
|
CIMConstClass object. |
|
*/ |
CIMConstClass(const CIMConstClass& x); | CIMConstClass(const CIMConstClass& x); |
| |
/// |
/** |
|
Constructs a CIMConstClass object from the value of a specified |
|
CIMClass object, so that both objects refer to the same data copy. |
|
@param x The CIMClass object from which to construct a new |
|
CIMConstClass object. |
|
*/ |
CIMConstClass(const CIMClass& x); | CIMConstClass(const CIMClass& x); |
| |
/// |
/** |
|
Constructs a CIMConstClass object from the value of a specified |
|
CIMObject object, so that both objects refer to the same data copy. |
|
@param x The CIMObject object from which to construct the |
|
CIMConstClass object. |
|
@exception DynamicCastFailedException If a CIMConstClass can not be |
|
created from the given CIMObject. |
|
*/ |
PEGASUS_EXPLICIT CIMConstClass(const CIMObject& x); | PEGASUS_EXPLICIT CIMConstClass(const CIMObject& x); |
| |
/// |
/** |
|
Constructs a CIMConstClass object from the value of a specified |
|
CIMConstObject object, so that both objects refer to the same data |
|
copy. |
|
@param x The CIMConstObject object from which to construct the |
|
CIMConstClass object. |
|
@exception DynamicCastFailedException If a CIMConstClass can not be |
|
created from the given CIMConstObject. |
|
*/ |
PEGASUS_EXPLICIT CIMConstClass(const CIMConstObject& x); | PEGASUS_EXPLICIT CIMConstClass(const CIMConstObject& x); |
| |
/// |
/** |
|
Constructs a CIMConstClass object with the specified attributes. |
|
@param className A CIMName specifying the name of the class. |
|
@param superClassName A CIMName specifying name of the parent class. |
|
(A null value indicates no superclass.) |
|
*/ |
CIMConstClass( | CIMConstClass( |
const CIMName& className, | const CIMName& className, |
const CIMName& superClassName = CIMName()); | const CIMName& superClassName = CIMName()); |
| |
/// |
/** |
|
Assigns the value of the specified CIMConstClass object to this |
|
object, so that both objects refer to the same data copy. |
|
@param x The CIMConstClass object from which to assign this |
|
CIMConstClass object. |
|
@return A reference to this CIMConstClass object. |
|
*/ |
CIMConstClass& operator=(const CIMConstClass& x); | CIMConstClass& operator=(const CIMConstClass& x); |
| |
/// |
/** |
|
Assigns the value of the specified CIMClass object to this |
|
object, so that both objects refer to the same data copy. |
|
@param x The CIMClass object from which to assign this |
|
CIMConstClass object. |
|
@return A reference to this CIMConstClass object. |
|
*/ |
CIMConstClass& operator=(const CIMClass& x); | CIMConstClass& operator=(const CIMClass& x); |
| |
/// |
/** |
|
Destructs the CIMConstClass object. |
|
*/ |
~CIMConstClass(); | ~CIMConstClass(); |
| |
/// |
/** |
|
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. |
|
@return True if this class is an association class, false otherwise. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
Boolean isAssociation() const; | Boolean isAssociation() const; |
| |
/// |
/** |
|
Indicates whether this class is an abstract class. |
|
The Abstract qualifier is used to make this determination. |
|
@return True if this class is an abstract class, false otherwise. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
Boolean isAbstract() const; | Boolean isAbstract() const; |
| |
/// |
/** |
|
Gets the name of the class. |
|
@return A CIMName containing the class name. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
const CIMName& getClassName() const; | const CIMName& getClassName() const; |
| |
/// |
/** |
|
Gets the object path for the class. |
|
@return A CIMObjectPath containing the object path. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
const CIMObjectPath& getPath() const; | const CIMObjectPath& getPath() const; |
| |
/// |
/** |
|
Gets the name of the parent class of this class. |
|
@return A CIMName containing parent class name. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
const CIMName& getSuperClassName() const; | const CIMName& getSuperClassName() const; |
| |
/// |
/** |
|
Finds a qualifier by name. |
|
@param name A CIMName specifying the name of the qualifier to be found. |
|
@return Index of the qualifier if found or PEG_NOT_FOUND if not found. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
Uint32 findQualifier(const CIMName& name) const; | Uint32 findQualifier(const CIMName& name) const; |
| |
/// |
/** |
|
Gets the qualifier at the specified index. |
|
@param index The index of the qualifier to be retrieved. |
|
@return The CIMConstQualifier at the specified index. |
|
@exception IndexOutOfBoundsException If the index is outside |
|
the range of qualifiers available for the CIMConstClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
CIMConstQualifier getQualifier(Uint32 index) const; | CIMConstQualifier getQualifier(Uint32 index) const; |
| |
/// |
/** |
|
Gets the number of qualifiers in the class. |
|
@return An integer count of the qualifiers in the CIMConstClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
Uint32 getQualifierCount() const; | Uint32 getQualifierCount() const; |
| |
/// |
/** |
|
Finds a property by name. |
|
@param name A CIMName specifying the name of the property to be found. |
|
@return Index of the property if found or PEG_NOT_FOUND if not found. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
Uint32 findProperty(const CIMName& name) const; | Uint32 findProperty(const CIMName& name) const; |
| |
/// |
/** |
|
Gets the property at the specified index. |
|
@param index The index of the property to be retrieved. |
|
@return The CIMConstProperty at the specified index. |
|
@exception IndexOutOfBoundsException If the index is outside |
|
the range of properties available for the CIMConstClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
CIMConstProperty getProperty(Uint32 index) const; | CIMConstProperty getProperty(Uint32 index) const; |
| |
/// |
/** |
|
Gets the number of properties in the class. |
|
@return An integer count of the properties in the CIMConstClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
Uint32 getPropertyCount() const; | Uint32 getPropertyCount() const; |
| |
/// |
/** |
|
Finds a method by name. |
|
@param name A CIMName specifying the name of the method to be found. |
|
@return Index of the method if found or PEG_NOT_FOUND if not found. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
Uint32 findMethod(const CIMName& name) const; | Uint32 findMethod(const CIMName& name) const; |
| |
/// |
/** |
|
Gets the method at the specified index. |
|
@param index The index of the method to be retrieved. |
|
@return The CIMConstMethod at the specified index. |
|
@exception IndexOutOfBoundsException If the index is outside |
|
the range of methods available for the CIMConstClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
CIMConstMethod getMethod(Uint32 index) const; | CIMConstMethod getMethod(Uint32 index) const; |
| |
/// |
/** |
|
Gets the number of methods in the class. |
|
@return An integer count of the methods in the CIMConstClass. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
Uint32 getMethodCount() const; | Uint32 getMethodCount() const; |
| |
/// |
/** |
|
Gets the list of key properties in this class. The Key qualifier |
|
on CIMConstProperty objects is used to locate key properties. |
|
@return An Array of CIMName objects containing the names of the key |
|
properties. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
void getKeyNames(Array<CIMName>& keyNames) const; | void getKeyNames(Array<CIMName>& keyNames) const; |
| |
/// |
/** |
|
Indicates whether this class contains key properties. The Key |
|
qualifier on CIMConstProperty objects is used to make this |
|
determination. |
|
@return True if this class contains key properties, false otherwise. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
Boolean hasKeys() const; | Boolean hasKeys() const; |
| |
/// |
/** |
|
Makes a deep copy of the class. This creates a new copy of all |
|
the class attributes including qualifiers, properties, and methods. |
|
@return A CIMClass object with a separate copy of the |
|
CIMConstClass object. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
CIMClass clone() const; | CIMClass clone() const; |
| |
/// |
/** |
|
Compares the CIMConstClass with a specified CIMConstClass. |
|
@param x The CIMConstClass to be compared. |
|
@return True if this class is identical to the one specified, |
|
false otherwise. |
|
@exception UninitializedObjectException If the object is not |
|
initialized. |
|
*/ |
Boolean identical(const CIMConstClass& x) const; | Boolean identical(const CIMConstClass& x) const; |
| |
/// |
/** |
|
Determines whether the object has been initialized. |
|
@return True if the object has not been initialized, false otherwise. |
|
*/ |
Boolean isUninitialized() const; | Boolean isUninitialized() const; |
| |
private: | private: |