[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/CIMMethod.h:

class PEGASUS_COMMON_LINKAGE CIMMethod

The CIMMethod class represents the DMTF standard CIM method definition.

Documentation

The CIMMethod class represents the DMTF standard CIM method definition. A CIMMethod is generally defined in the context of a CIMClass. A CIMMethod consists of:
  • A CIMName containing the name of the method
  • A CIMType defining the method return type
  • Zero or more CIMQualifier objects
  • Zero or more CIMParameter objects defining the method parameters
In addition, a CIMMethod has these internal attributes:
  • propagated - An attribute defining whether this CIMMethod is propagated from a superclass. Note that this is normally set as part of completing the definition of objects (resolving) when they are created as part of a CIM schema and is NOT automatically set when creating a method object. It can only be logically set in context of the schema in which the CIMMethod is defined.
  • classOrigin - An attribute defining the class in which this CIMMethod was originally defined. This is normally set within the context of the schema in which the CIMMethod is defined. This attribute is available from objects retrieved from the CIM Server, for example, and provides information on the defintion of this method in the class hierarchy. The propagated and ClassOrigin attributes can be used together to determine if methods originated with this object or were inherited from higher levels of the hiearchy.

The CIMMethod class uses a shared representation model, such that multiple CIMMethod 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 CIMMethod object affects all the CIMMethod objects that refer to the same data copy. The data remains valid until all the CIMMethod objects that refer to it are destructed. A separate copy of the data may be created using the clone method.


Inheritance:


Public Methods

[more] CIMMethod ()
Constructs an uninitialized CIMMethod object.
[more] CIMMethod (const CIMMethod& x)
Constructs a CIMMethod object from the value of a specified CIMMethod object, so that both objects refer to the same data copy.
[more] CIMMethod ( const CIMName& name, CIMType type, const CIMName& classOrigin = CIMName(), Boolean propagated = false)
Constructs a CIMMethod object with the specified attributes.
[more] ~CIMMethod ()
Destructs the CIMMethod object
[more]CIMMethod& operator= (const CIMMethod& x)
Assigns the value of the specified CIMMethod object to this object, so that both objects refer to the same data copy.
[more]const CIMName& getName () const
Gets the name of the method.
[more]void setName (const CIMName& name)
Sets the method name.
[more]CIMType getType () const
Gets the method return type.
[more]void setType (CIMType type)
Sets the method return type to the specified CIMType.
[more]const CIMName& getClassOrigin () const
Gets the class in which this method is locally defined.
[more]void setClassOrigin (const CIMName& classOrigin)
Sets the classOrigin attribute with the specified class name.
[more]Boolean getPropagated () const
Tests the propagated attribute of the object.
[more]void setPropagated (Boolean propagated)
Sets the propagated attribute.
[more]CIMMethod& addQualifier (const CIMQualifier& x)
Adds a qualifier to the method.
[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 method.
[more]Uint32 getQualifierCount () const
Gets the number of qualifiers in the method.
[more]CIMMethod& addParameter (const CIMParameter& x)
Adds a parameter to the method.
[more]Uint32 findParameter (const CIMName& name) const
Finds a parameter by name.
[more]CIMParameter getParameter (Uint32 index)
Gets the parameter at the specified index.
[more]CIMConstParameter getParameter (Uint32 index) const
Gets the parameter at the specified index.
[more]void removeParameter (Uint32 index)
Removes a parameter from the method.
[more]Uint32 getParameterCount () const
Gets the number of parameters in the method.
[more]Boolean isUninitialized () const
Determines whether the object has been initialized.
[more]Boolean identical (const CIMConstMethod& x) const
Compares the method with another method.
[more]CIMMethod clone () const
Makes a deep copy of the method.

o CIMMethod()
Constructs an uninitialized CIMMethod 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 CIMMethod(const CIMMethod& x)
Constructs a CIMMethod object from the value of a specified CIMMethod object, so that both objects refer to the same data copy.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
            const CIMMethod cm1(m1);
        

Parameters:
x - The CIMMethod object from which to construct a new CIMMethod object.

o CIMMethod( const CIMName& name, CIMType type, const CIMName& classOrigin = CIMName(), Boolean propagated = false)
Constructs a CIMMethod object with the specified attributes.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
        

Throws:
UninitializedObjectException If the method name is null.
Parameters:
name - A CIMName specifying the name of the method.
type - A CIMType defining the method return type.
classOrigin - A CIMName indicating the class in which the method is locally defined (optional).
propagated - A Boolean indicating whether the method definition is local to the CIMClass in which it appears or was propagated (without modification) from a superclass.

o ~CIMMethod()
Destructs the CIMMethod object

oCIMMethod& operator=(const CIMMethod& x)
Assigns the value of the specified CIMMethod object to this object, so that both objects refer to the same data copy.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
            CIMMethod m2;
            m2 = m1;
        

Parameters:
x - The CIMMethod object from which to assign this CIMMethod object.
Returns:
A reference to this CIMMethod object.

oconst CIMName& getName() const
Gets the name of the method.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
            assert(m1.getName() == CIMName ("getHostName"));
        
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
A CIMName containing the name of the method.

ovoid setName(const CIMName& name)
Sets the method name.

Example:

            CIMMethod m2(CIMName ("test"), CIMTYPE_STRING);
            m2.setName(CIMName ("getVersion"));
        
Throws:
UninitializedObjectException If the object is not initialized.
Exception If the object is already contained by CIMClass
Returns:
A CIMName containing the new name of the method.

oCIMType getType() const
Gets the method return type.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
            assert(m1.getType() == CIMTYPE_STRING);
        
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
A CIMType containing the method return type.

ovoid setType(CIMType type)
Sets the method return type to the specified CIMType. This is the type of the CIMValue that is returned on a CIM method invocation.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
            m1.setName(CIMName ("getVersion"));
            assert(m1.getName() == CIMName ("getVersion"));
        
Throws:
UninitializedObjectException If the object is not initialized.
Parameters:
type - CIMType to be set into the CIMMethod object.

oconst CIMName& getClassOrigin() const
Gets the class in which this method is locally defined. This information is normally available with methods that are part of schema returned from a CIM Server.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
CIMName containing the classOrigin attribute.

ovoid setClassOrigin(const CIMName& classOrigin)
Sets the classOrigin attribute with the specified class name. Normally this method is used internally by a CIM Server when defining methods in the context of a schema.
Throws:
UninitializedObjectException If the object is not initialized.
Parameters:
classOrigin - A CIMName specifying the name of the class of origin for the method.

oBoolean getPropagated() const
Tests the propagated attribute of the object. The propagated attribute indicates whether this method was propagated from a higher-level class. Normally this attribute is set as part of defining a method in the context of a schema. It is set in methods retrieved from a CIM Server.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
True if method is propagated; otherwise, false.

ovoid setPropagated(Boolean propagated)
Sets the propagated attribute. Normally this is used by a CIM Server when defining a method in the context of a schema.
Throws:
UninitializedObjectException If the object is not initialized.
Parameters:
propagated - A Boolean indicating whether the method is propagated from a superclass.

oCIMMethod& addQualifier(const CIMQualifier& x)
Adds a qualifier to the method.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
            m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
        
Throws:
AlreadyExistsException If a qualifier with the same name already exists in the CIMMethod.
UninitializedObjectException If the object is not initialized.
Parameters:
x - The CIMQualifier to be added.
Returns:
A reference to this CIMMethod object.

oUint32 findQualifier(const CIMName& name) const
Finds a qualifier by name.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
            m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
            assert(m1.findQualifier(CIMName ("stuff")) != PEG_NOT_FOUND);
        
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.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
            m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
            Uint32 posQualifier = m1.findQualifier(CIMName ("stuff"));
            if (posQualifier != PEG_NOT_FOUND)
            {
                CIMQualifier q = m1.getQualifier(posQualifier);
            }
        
Throws:
IndexOutOfBoundsException If the index is outside the range of qualifiers available for the CIMMethod.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the qualifier to be retrieved.
Returns:
The CIMQualifier object at the specified index.

oCIMConstQualifier getQualifier(Uint32 index) const
Gets the qualifier at the specified index.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
            m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
            const CIMMethod m2 = m1;
            Uint32 posQualifier = m2.findQualifier(CIMName ("stuff"));
            if (posQualifier != PEG_NOT_FOUND)
            {
                CIMConstQualifier q = m2.getQualifier(posQualifier);
            }
        
Throws:
IndexOutOfBoundsException If the index is outside the range of qualifiers available for the CIMMethod.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the qualifier to be retrieved.
Returns:
The CIMConstQualifier object at the specified index.

ovoid removeQualifier(Uint32 index)
Removes a qualifier from the method.

Example:

             remove all qualifiers from a class
            Uint32 count = 0;
            while ((count = cimClass.getQualifierCount()) > 0)
                cimClass.removeQualifier(count - 1);
        
Throws:
IndexOutOfBoundsException If the index is outside the range of qualifiers available for the CIMMethod.
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 method.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
            m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
            m1.addQualifier(CIMQualifier(CIMName ("stuff2"), true));
            assert(m1.getQualifierCount() == 2);
        
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
An integer count of the qualifiers in the CIMMethod.

oCIMMethod& addParameter(const CIMParameter& x)
Adds a parameter to the method.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
            m1.addParameter(CIMParameter(CIMName("ipaddress"), CIMTYPE_STRING));
        
Throws:
AlreadyExistsException If a parameter with the same name already exists in the CIMMethod.
UninitializedObjectException If the object is not initialized.
Parameters:
x - The CIMParameter to be added.
Returns:
A reference to this CIMMethod object.

oUint32 findParameter(const CIMName& name) const
Finds a parameter by name.

Example:

            Uint32 posParameter;
            posParameter = m1.findParameter(CIMName ("ipaddress"));
            if (posParameter != PEG_NOT_FOUND)
                ...
        
Throws:
UninitializedObjectException If the object is not initialized.
Parameters:
name - A CIMName specifying the name of the parameter to be found.
Returns:
Index of the parameter if found or PEG_NOT_FOUND if not found.

oCIMParameter getParameter(Uint32 index)
Gets the parameter at the specified index.

Example:

            CIMParameter cp;
            Uint32 parameterIndex = m1.findParameter(CIMName ("ipaddress"));
            if (parameterIndex != PEG_NOT_FOUND)
            {
                cp = m1.getParameter(parameterIndex);
            }
        
Throws:
IndexOutOfBoundsException If the index is outside the range of parameters available for the CIMMethod.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the parameter to be retrieved.
Returns:
The CIMParameter at the specified index.

oCIMConstParameter getParameter(Uint32 index) const
Gets the parameter at the specified index.

Example:

            CIMConstParameter cp;
            Uint32 parameterIndex = m1.findParameter(CIMName ("ipaddress"));
            if (parameterIndex != PEG_NOT_FOUND)
            {
                cp = m1.getParameter(parameterIndex);
            }
        
Throws:
IndexOutOfBoundsException If the index is outside the range of parameters available for the CIMMethod.
UninitializedObjectException If the object is not initialized.
Parameters:
index - The index of the parameter to be retrieved.
Returns:
The CIMConstParameter at the specified index.

ovoid removeParameter(Uint32 index)
Removes a parameter from the method.
Throws:
IndexOutOfBoundsException If the index is outside the range of parameters available from the CIMMethod.
UninitializedObjectException If the object is not initialized.
Parameters:
index - Index of the parameter to be removed.

oUint32 getParameterCount() const
Gets the number of parameters in the method.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
An integer count of the CIMParameters in the CIMMethod.

oBoolean isUninitialized() const
Determines whether the object has been initialized.

Example:

            CIMMethod m1;
            assert(m1.isUninitialized());
        
Returns:
True if the object has not been initialized, false otherwise.

oBoolean identical(const CIMConstMethod& x) const
Compares the method with another method.

Example:

            CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
            CIMConstMethod m2(CIMName ("test"), CIMTYPE_STRING);
            assert(!m1.identical(m2));
        
Throws:
UninitializedObjectException If either of the objects is not initialized.
Parameters:
x - The CIMConstMethod to be compared.
Returns:
True if this method is identical to the one specified, false otherwise.

oCIMMethod clone() const
Makes a deep copy of the method. This creates a new copy of all the method attributes including parameters and qualifiers.
Throws:
UninitializedObjectException If the object is not initialized.
Returns:
A new copy of the CIMMethod object.


This class has no child classes.
Friends:
class CIMConstMethod
class Resolver
class XmlWriter
class MofWriter
class BinaryStreamer

Alphabetic index HTML hierarchy of classes or Java


[an error occurred while processing this directive]