[an error occurred while processing this directive]
[an error occurred while processing this directive] [an error occurred while processing this directive]

Pegasus CIM Object Broker Documentation

[an error occurred while processing this directive]


[an error occurred while processing this directive]

 

Contents

o Introduction
o Objectives
o Overview
o Credits
o Pegasus Architecture
   o Design Goals
   o The Broker
   o Pegasus Providers.
   o Extension Services
   o Pegasus Clients.
   o Functional Flow
o Pegasus Components
   o Component Descriptions
   o Pegasus Directory Structure
o Pegasus Utilization
   o Pegasus Availability
   o Pegasus Installation
   o Pegasus Operation
   o Pegasus CIM Clients
   o Pegasus Providers
   o Pegasus MOF Compiler
o Programming Pegasus
   o CIM Objects in Pegasus
   o CIM Object Table
   o Class Definitions
o Pegasus Interfaces
   o CIM Operations over HTTP
   o Pegasus Client Interfaces
   o Pegasus Provider Interfaces
   o Pegasus Service Extension Interfaces
   o Repository Interfaces
o Writing Providers.
o Glossary
o Pegasus Code Examples
   o Client Examples
   o Client Coding Examples
   o Provider Coding Examples
o Document References
o Pegausus FAQ
o
In file ../../src/Pegasus/Common/CIMClass.h:

class PEGASUS_COMMON_LINKAGE CIMClass

The CIMClass class represents the DMTF standard CIM class definition.

Documentation

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.


Inheritance:


Public Methods

[more] CIMClass ()
Constructs an uninitialized CIMClass object.
[more] 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.
[more]explicit CIMClass (const CIMObject& x)
Constructs a CIMClass object from the value of a specified CIMObject object, so that both objects refer to the same data copy.
[more] CIMClass ( const CIMName& className, const CIMName& superClassName = CIMName())
Constructs a CIMClass object with the specified attributes.
[more]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.
[more] ~CIMClass ()
Destructs the CIMClass object
[more]Boolean isAssociation () const
Indicates whether this class is an association class.
[more]Boolean isAbstract () const
Indicates whether this class is an abstract class.
[more]const CIMName& getClassName () const
Gets the name of the class.
[more]const CIMObjectPath& getPath () const
Gets the object path for the class.
[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 class.
[more]void setSuperClassName (const CIMName& superClassName)
Sets the name of the parent class.
[more]CIMClass& addQualifier (const CIMQualifier& qualifier)
Adds a qualifier to the class.
[more]Uint32 findQualifier (const CIMName& name) const
Finds a qualifier by name.
[more]CIMQualifier getQualifier (Uint32 index)
Gets the qualifier at the specified index.
[more]CIMConstQualifier getQualifier (Uint32 index) const
Gets the qualifier at the specified index.
[more]void removeQualifier (Uint32 index)
Removes a qualifier from the class.
[more]Uint32 getQualifierCount () const
Gets the number of qualifiers in the class.
[more]CIMClass& addProperty (const CIMProperty& x)
Adds a property to the class.
[more]Uint32 findProperty (const CIMName& name) const
Finds a property by name.
[more]CIMProperty getProperty (Uint32 index)
Gets the property at the specified index.
[more]CIMConstProperty getProperty (Uint32 index) const
Gets the property at the specified index.
[more]void removeProperty (Uint32 index)
Removes a property from the class.
[more]Uint32 getPropertyCount () const
Gets the number of properties in the class.
[more]CIMClass& addMethod (const CIMMethod& x)
Adds a method to the class.
[more]Uint32 findMethod (const CIMName& name) const
Finds a method by name.
[more]CIMMethod getMethod (Uint32 index)
Gets the method at the specified index.
[more]CIMConstMethod getMethod (Uint32 index) const
Gets the method at the specified index.
[more]void removeMethod (Uint32 index)
Removes a method from the class.
[more]Uint32 getMethodCount () const
Gets the number of methods in the class.
[more]void getKeyNames (Array<CIMName>& keyNames) const
Gets the list of key properties in this class.
[more]Boolean hasKeys () const
Indicates whether this class contains key properties.
[more]CIMClass clone () const
Makes a deep copy of the class.
[more]Boolean identical (const CIMConstClass& x) const
Compares the CIMClass with a specified CIMConstClass.
[more]Boolean isUninitialized () const
Determines whether the object has been initialized.
[more]CIMInstance buildInstance (Boolean includeQualifiers, Boolean includeClassOrigin, const CIMPropertyList & propertyList) const
Builds a CIMInstance based on this CIMClass.

o CIMClass()
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.

o 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:
x - The CIMClass object from which to construct a new CIMClass object.

oexplicit CIMClass(const CIMObject& x)
Constructs a CIMClass object from the value of a specified CIMObject object, so that both objects refer to the same data copy.
Throws:
DynamicCastFailedException If a CIMClass can not be created from the given CIMObject.
Parameters:
x - The CIMObject object from which to construct the CIMClass object.

o CIMClass( const CIMName& className, const CIMName& superClassName = CIMName())
Constructs a CIMClass object with the specified attributes.

Example:

            CIMClass NewClass("MyClass", "YourClass");
        

Parameters:
className - A CIMName specifying the name of the class.
superClassName - A CIMName specifying name of the parent class. (A null value indicates no superclass.)

oCIMClass& 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:
x - The CIMClass object from which to assign this CIMClass object.
Returns:
A reference to this CIMClass object.

o ~CIMClass()
Destructs the CIMClass object

oBoolean 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.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
True if this class is an association class, false otherwise.

oBoolean isAbstract() const
Indicates whether this class is an abstract class. The Abstract qualifier is used to make this determination.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
True if this class is an abstract class, false otherwise.

oconst CIMName& getClassName() const
Gets the name of the class.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
A CIMName containing the class name.

oconst CIMObjectPath& getPath() const
Gets the object path for the class.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
A CIMObjectPath containing the object path.

ovoid setPath(const CIMObjectPath & path)
Sets the object path for the class.
Throws:
UninitializedObjectException If the object is not initialized.
Parameters:
path - A CIMObjectPath containing the object path.

oconst CIMName& getSuperClassName() const
Gets the name of the parent class of this class.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
A CIMName containing parent class name.

ovoid setSuperClassName(const CIMName& superClassName)
Sets the name of the parent class.
Throws:
UninitializedObjectException If the object is not initialized.
Parameters:
superClassName - A CIMName specifying the parent class name.

oCIMClass& addQualifier(const CIMQualifier& qualifier)
Adds a qualifier to the class.
Throws:
AlreadyExistsException If a qualifier with the same name already exists in the CIMClass.
UninitializedObjectException If the object is not initialized.
Parameters:
qualifier - The CIMQualifier to be added.
Returns:
A reference to this CIMClass object.

oUint32 findQualifier(const CIMName& name) const
Finds a qualifier by name.
Throws:
UninitializedObjectException If the object is not initialized.
Parameters:
name - A CIMName specifying the name of the qualifier to be found.
Returns:
Index of the qualifier if found or PEG_NOT_FOUND if not found.

oCIMQualifier getQualifier(Uint32 index)
Gets the qualifier at the specified index.
Throws:
IndexOutOfBoundsException If the index is outside the range of qualifiers available for the CIMClass.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the qualifier to be retrieved.
Returns:
The CIMQualifier at the specified index.

oCIMConstQualifier getQualifier(Uint32 index) const
Gets the qualifier at the specified index.
Throws:
IndexOutOfBoundsException If the index is outside the range of qualifiers available for the CIMClass.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the qualifier to be retrieved.
Returns:
The CIMConstQualifier at the specified index.

ovoid removeQualifier(Uint32 index)
Removes a qualifier from the class.
Throws:
IndexOutOfBoundsException If the index is outside the range of qualifiers available for the CIMClass.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the qualifier to remove.

oUint32 getQualifierCount() const
Gets the number of qualifiers in the class.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
An integer count of the qualifiers in the CIMClass.

oCIMClass& addProperty(const CIMProperty& x)
Adds a property to the class.
Throws:
AlreadyExistsException If a property with the same name already exists in the CIMClass.
UninitializedObjectException If the object is not initialized.
Parameters:
x - The CIMProperty to be added.
Returns:
A reference to this CIMClass object.

oUint32 findProperty(const CIMName& name) const
Finds a property by name.
Throws:
UninitializedObjectException If the object is not initialized.
Parameters:
name - A CIMName specifying the name of the property to be found.
Returns:
Index of the property if found or PEG_NOT_FOUND if not found.

oCIMProperty getProperty(Uint32 index)
Gets the property at the specified index.
Throws:
IndexOutOfBoundsException If the index is outside the range of properties available for the CIMClass.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the property to be retrieved.
Returns:
The CIMProperty at the specified index.

oCIMConstProperty getProperty(Uint32 index) const
Gets the property at the specified index.
Throws:
IndexOutOfBoundsException If the index is outside the range of properties available for the CIMClass.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the property to be retrieved.
Returns:
The CIMConstProperty at the specified index.

ovoid removeProperty(Uint32 index)
Removes a property from the class.
Throws:
IndexOutOfBoundsException If the index is outside the range of properties available for the CIMClass.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the property to remove.

oUint32 getPropertyCount() const
Gets the number of properties in the class.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
An integer count of the properties in the CIMClass.

oCIMClass& addMethod(const CIMMethod& x)
Adds a method to the class.
Throws:
AlreadyExistsException If a method with the same name already exists in the CIMClass.
UninitializedObjectException If the object is not initialized.
Parameters:
x - The CIMMethod to be added.
Returns:
A reference to this CIMClass object.

oUint32 findMethod(const CIMName& name) const
Finds a method by name.
Throws:
UninitializedObjectException If the object is not initialized.
Parameters:
name - A CIMName specifying the name of the method to be found.
Returns:
Index of the method if found or PEG_NOT_FOUND if not found.

oCIMMethod getMethod(Uint32 index)
Gets the method at the specified index.
Throws:
IndexOutOfBoundsException If the index is outside the range of methods available for the CIMClass.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the method to be retrieved.
Returns:
The CIMMethod at the specified index.

oCIMConstMethod getMethod(Uint32 index) const
Gets the method at the specified index.
Throws:
IndexOutOfBoundsException If the index is outside the range of methods available for the CIMClass.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the method to be retrieved.
Returns:
The CIMConstMethod at the specified index.

ovoid removeMethod(Uint32 index)
Removes a method from the class.
Throws:
IndexOutOfBoundsException If the index is outside the range of methods available for the CIMClass.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the method to remove.

oUint32 getMethodCount() const
Gets the number of methods in the class.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
An integer count of the methods in the CIMClass.

ovoid 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.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
An Array of CIMName objects containing the names of the key properties.

oBoolean hasKeys() const
Indicates whether this class contains key properties. The Key qualifier on CIMProperty objects is used to make this determination.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
True if this class contains key properties, false otherwise.

oCIMClass clone() const
Makes a deep copy of the class. This creates a new copy of all the class attributes including qualifiers, properties, and methods.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
A new copy of the CIMClass object.

oBoolean identical(const CIMConstClass& x) const
Compares the CIMClass with a specified CIMConstClass.
Throws:
UninitializedObjectException If the object is not initialized.
Parameters:
x - The CIMConstClass to be compared.
Returns:
True if this class is identical to the one specified, false otherwise.

oBoolean isUninitialized() const
Determines whether the object has been initialized.
Returns:
True if the object has not been initialized, false otherwise.

oCIMInstance buildInstance(Boolean includeQualifiers, Boolean includeClassOrigin, const CIMPropertyList & propertyList) const
Builds a CIMInstance based on this CIMClass. Properties in the instance are initialized to the default values (if any) specified in the class definition. The method arguments 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 and enumerateInstances.

Example:

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

Throws:
UninitializedObjectException If the object is not initialized.
Parameters:
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.
includeClassOrigin - A Boolean indicating whether ClassOrigin attributes are to be transferred from the class object to the instance.
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.
Returns:
CIMInstance of this class appropriately initialized.


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

Alphabetic index HTML hierarchy of classes or Java


[an error occurred while processing this directive]