version 1.35.2.1, 2002/10/28 15:43:21
|
version 1.36, 2003/03/12 21:02:53
|
|
|
#define Pegasus_Method_h | #define Pegasus_Method_h |
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
|
#include <Pegasus/Common/Linkage.h> |
#include <Pegasus/Common/String.h> | #include <Pegasus/Common/String.h> |
|
#include <Pegasus/Common/CIMName.h> |
#include <Pegasus/Common/CIMParameter.h> | #include <Pegasus/Common/CIMParameter.h> |
#include <Pegasus/Common/CIMQualifier.h> | #include <Pegasus/Common/CIMQualifier.h> |
#include <Pegasus/Common/CIMType.h> | #include <Pegasus/Common/CIMType.h> |
#include <Pegasus/Common/Linkage.h> |
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
class CIMConstMethod; | class CIMConstMethod; |
class CIMMethodRep; | class CIMMethodRep; |
| |
// ATTN: remove the classOrigin and propagated parameters. |
/** The CIMMethod class is used to represent CIM methods in Pegasus. |
/** Class CIMMethod - This class defines the operations associated with |
|
manipulation of the Pegasus implementation of the CIM CIMMethod. Within |
|
this class, methods are provides for creation, deletion, and manipulation |
|
of method declarations. |
|
*/ | */ |
class PEGASUS_COMMON_LINKAGE CIMMethod | class PEGASUS_COMMON_LINKAGE CIMMethod |
{ | { |
public: | public: |
| |
/** Creates and instantiates a CIM method. */ |
/** Creates a new CIMMethod object. */ |
CIMMethod(); | CIMMethod(); |
| |
/** Creates and instantiates a CIM method from another method instance |
/** Creates a new CIMMethod object from another method instance. |
@return pointer to the new method instance |
@param x - CIMMethod instance from which to create CIMMethod object. |
*/ | */ |
CIMMethod(const CIMMethod& x); | CIMMethod(const CIMMethod& x); |
| |
/** Creates a CIM method with the specified name, type, and classOrigin |
/** Creates a CIMMethod with the specified name, type, and classOrigin. |
@param name for the method |
@param name - CIMName representing the name for the method. |
@param type CIM data type of method to create |
@param type - CIMType representing data type of method to create. |
@param classOrigin |
@param classOrigin - CIMName representing the class origin. |
@param propagated |
@param propagated - Flag indicating whether the definition of the |
@return Throws IllegalName if name argument not legal CIM identifier. |
CIM Method is local to the CIM Class (respectively, Instance) in which |
|
it appears, or was propagated without modification from the underlying |
|
Subclass (respectively, Class). |
*/ | */ |
CIMMethod( | CIMMethod( |
const String& name, |
const CIMName& name, |
CIMType type, | CIMType type, |
const String& classOrigin = String::EMPTY, |
const CIMName& classOrigin = CIMName(), |
Boolean propagated = false); | Boolean propagated = false); |
| |
/** Desctructor. */ | /** Desctructor. */ |
|
|
/** Assignment operator */ | /** Assignment operator */ |
CIMMethod& operator=(const CIMMethod& x); | CIMMethod& operator=(const CIMMethod& x); |
| |
/** getName - Gets the name of the method |
/** Gets the name of the method. |
@return String with the name of the method |
@return CIMName with the name of the method. |
*/ | */ |
const String& getName() const; |
const CIMName& getName() const; |
| |
/** setName - Set the method name |
/** Sets the method name. |
@param name |
@param name - CIMName with method name. |
@exception IllegalName if name argument not legal CIM identifier. |
|
*/ | */ |
void setName(const String& name); |
void setName(const CIMName& name); |
| |
/** getType - gets the method type |
/** Gets the method type. |
@return The CIM method type for this method. |
@return The CIMType containing the method type for this method. |
*/ | */ |
CIMType getType() const; | CIMType getType() const; |
| |
/** setType - Sets the method type to the specified CIM method |
/** Sets the method type to the specified CIM method type |
type as defined in CIMType /Ref{TYPE} |
as defined in CIMType. |
*/ | */ |
void setType(CIMType type); | void setType(CIMType type); |
| |
/** getClassOrigin - Returns the class in which this method |
/** Gets the class in which this method was defined. |
was defined. |
@return CIMName containing the classOrigin field. |
@return String containing the classOrigin field. |
|
*/ | */ |
const String& getClassOrigin() const; |
const CIMName& getClassOrigin() const; |
| |
/** setClassOrigin - Set the ClassOrigin attribute with |
/** Sets the ClassOrigin attribute with the classname defined on |
the classname defined on input |
the input parameter. |
@param classOrigin - String parameter defining the name |
@param classOrigin - CIMName parameter defining the name |
of the class origin |
of the class origin. |
*/ | */ |
void setClassOrigin(const String& classOrigin); |
void setClassOrigin(const CIMName& classOrigin); |
| |
/** getPropagated - Tests the propogated qualifier |
/** Tests the propagated qualifier. |
@return - returns True if method is propogated |
@return true if method is propagated, false otherwise. |
*/ | */ |
Boolean getPropagated() const; | Boolean getPropagated() const; |
| |
/** setPropagated - Sets the Propagaged Qualifier */ |
/** Sets the Propagaged Qualifier |
|
@param propagated - Flag indicating propagation. |
|
*/ |
void setPropagated(Boolean propagated); | void setPropagated(Boolean propagated); |
| |
/** addQualifier - Adds a Qualifier to the method object. |
/** Adds the specified qualifier to the method and increments the |
@param CIMQualifier to be added |
qualifier count. |
@return Throws AlreadyExists excetpion if the qualifier already exists |
@param x - CIMQualifier object representing the qualifier |
in the method |
to be added. |
@exception AlreadyExists exception |
@return the CIMMethod object after adding the specified qualifier. |
|
@exception AlreadyExistsException if the qualifier already exists. |
*/ | */ |
CIMMethod& addQualifier(const CIMQualifier& x); | CIMMethod& addQualifier(const CIMQualifier& x); |
| |
/** findQualifier - returns the position of the qualifier with |
/** Searches for a qualifier with the specified input name. |
the given name. |
@param name - CIMName of the qualifier to be found. |
@param name Name of qualifier to be found. |
@return Index of the qualifier found or PEG_NOT_FOUND |
@return index of the parameter if found; otherwise PEG_NOT_FOUND. |
if not found. |
*/ |
*/ |
Uint32 findQualifier(const String& name) const; |
Uint32 findQualifier(const CIMName& name) const; |
|
|
/** getQualifier - Gets the CIMQualifier defined by the index |
/** Gets the CIMQualifier defined by the input parameter. |
input as a parameter. |
@param index - Index of the qualifier requested. |
@param Index of the qualifier requested. |
@return CIMQualifier object representing the qualifier found. |
@return CIMQualifier object or exception |
@exception IndexOutOfBoundsException exception if the index is |
@exception OutOfBounds exception if the index is outside the range of |
outside the range of parameters available from the CIMMethod. |
parameters available from the CIMMethod. |
*/ |
*/ |
CIMQualifier getQualifier(Uint32 index); |
CIMQualifier getQualifier(Uint32 pos); |
|
|
/** Gets the CIMQualifier defined by the input parameter. |
CIMConstQualifier getQualifier(Uint32 pos) const; |
@param index - Index of the qualifier requested. |
|
@return CIMConstQualifier object representing the qualifier found. |
/** removeQualifier - Removes the CIMQualifier defined by the |
@exception IndexOutOfBoundsException exception if the index is |
position input as a parameter. |
outside the range of parameters available from the CIMMethod. |
@param Position of the qualifier requested. |
*/ |
@return CIMQualifier object or exception |
CIMConstQualifier getQualifier(Uint32 index) const; |
@exception OutOfBounds exception if the index is outside the range of |
|
parameters available from the CIMMethod. |
/** Removes the specified CIMQualifier from this method. |
*/ |
@param index - Index of the qualifier to remove. |
void removeQualifier(Uint32 pos); |
@exception IndexOutOfBoundsException exception if the index is |
|
outside the range of parameters available from the CIMMethod. |
/** getQualifierCount - Returns the number of Qualifiers attached |
*/ |
to this CIMMethod object. |
void removeQualifier(Uint32 index); |
@return integer representing number of Qualifiers. |
|
|
/** Returns the number of Qualifiers attached to this CIMMethod object. |
|
@return the number of qualifiers in the CIM Method. |
*/ | */ |
Uint32 getQualifierCount() const; | Uint32 getQualifierCount() const; |
| |
/** addParameter - Adds the parameter defined by the input |
/** Adds the parameter defined by the input to the CIMMethod. |
to the CIMMethod |
@param x - CIMParameter to be added to the CIM Method. |
|
@return CIMMethod object after the specified parameter is added. |
*/ | */ |
CIMMethod& addParameter(const CIMParameter& x); | CIMMethod& addParameter(const CIMParameter& x); |
| |
/** findParameter - Finds the parameter whose name is given |
/** Finds the parameter with the specified name. |
by the name parameter. |
@param name - Name of parameter to be found. |
@param name Name of parameter to be found. |
@return Index of the parameter object found or PEG_NOT_FOUND |
@return index of the parameter if found; otherwise PEG_NOT_FOUND. |
if the property is not found. |
*/ |
*/ |
Uint32 findParameter(const String& name) const; |
Uint32 findParameter(const CIMName& name) const; |
|
|
/** getParameter - Gets the parameter defined by the index |
/** Gets the parameter defined by the specified index. |
input as a parameter. |
@param index - Index for the parameter to be returned. |
@param index for the parameter to be returned. |
@return CIMParameter object requested. |
@return CIMParameter requested. |
@exception IndexOutOfBoundsException if the index is outside |
@Exception OutOfBounds exception is thrown if the index is outside the |
the range of available parameters |
range of available parameters |
*/ |
*/ |
CIMParameter getParameter(Uint32 index); |
CIMParameter getParameter(Uint32 pos); |
|
|
/** Gets the parameter defined for the specified index. |
/** getParameter - const form */ |
@param index - Index for the parameter to be returned. |
CIMConstParameter getParameter(Uint32 pos) const; |
@return CIMConstParameter object requested. |
|
@exception IndexOutOfBoundsException if the index is outside |
/** getParameterCount - Gets the count of the numbeer of |
the range of available parameters |
Parameters attached to the CIMMethod. |
*/ |
@retrun - count of the number of parameters attached to the CIMMethod. |
CIMConstParameter getParameter(Uint32 index) const; |
|
|
|
/** Removes the CIMParameter defined by the specified index. |
|
@param index - Index of the parameter to be removed. |
|
@exception IndexOutOfBoundsException if the index is outside the |
|
range of parameters available from the CIMMethod. |
*/ | */ |
Uint32 getParameterCount() const; |
void removeParameter (Uint32 index); |
| |
#ifdef PEGASUS_INTERNALONLY |
/** Gets the count of Parameters defined in the CIMMethod. |
/** Returns true if CIMMethod refers to a null pointer */ |
@return - count of the number of parameters attached to the CIMMethod. |
Boolean isNull() const; |
*/ |
#endif |
Uint32 getParameterCount() const; |
| |
/** identical - Returns true if this method is identical to the |
/** Determines if the object has not been initialized. |
one given by the argument x. |
@return true if the object has not been initialized, |
|
false otherwise |
|
*/ |
|
Boolean isUninitialized() const; |
|
|
|
/** Compares with another CIMConstMethod. |
|
@param x - CIMConstMethod object for the method to be compared. |
|
@return true if this method is identical to the one specified. |
*/ | */ |
Boolean identical(const CIMConstMethod& x) const; | Boolean identical(const CIMConstMethod& x) const; |
| |
/** CIMMethod clone - makes a distinct replica of this method */ |
/** Makes a deep copy (clone) of this method. |
|
@return copy of the CIMMethod object. |
|
*/ |
CIMMethod clone() const; | CIMMethod clone() const; |
| |
private: | private: |
|
|
friend class MofWriter; | friend class MofWriter; |
}; | }; |
| |
|
/// |
class PEGASUS_COMMON_LINKAGE CIMConstMethod | class PEGASUS_COMMON_LINKAGE CIMConstMethod |
{ | { |
public: | public: |
| |
|
/// |
CIMConstMethod(); | CIMConstMethod(); |
| |
|
/// |
CIMConstMethod(const CIMConstMethod& x); | CIMConstMethod(const CIMConstMethod& x); |
| |
|
/// |
CIMConstMethod(const CIMMethod& x); | CIMConstMethod(const CIMMethod& x); |
| |
// Throws IllegalName if name argument not legal CIM identifier. |
/// |
CIMConstMethod( | CIMConstMethod( |
const String& name, |
const CIMName& name, |
CIMType type, | CIMType type, |
const String& classOrigin = String::EMPTY, |
const CIMName& classOrigin = CIMName(), |
Boolean propagated = false); | Boolean propagated = false); |
| |
|
/// |
~CIMConstMethod(); | ~CIMConstMethod(); |
| |
|
/// |
CIMConstMethod& operator=(const CIMConstMethod& x); | CIMConstMethod& operator=(const CIMConstMethod& x); |
| |
|
/// |
CIMConstMethod& operator=(const CIMMethod& x); | CIMConstMethod& operator=(const CIMMethod& x); |
| |
const String& getName() const; |
/// |
|
const CIMName& getName() const; |
| |
|
/// |
CIMType getType() const; | CIMType getType() const; |
| |
const String& getClassOrigin() const; |
/// |
|
const CIMName& getClassOrigin() const; |
| |
|
/// |
Boolean getPropagated() const; | Boolean getPropagated() const; |
| |
Uint32 findQualifier(const String& name) const; |
/// |
|
Uint32 findQualifier(const CIMName& name) const; |
| |
CIMConstQualifier getQualifier(Uint32 pos) const; |
/// |
|
CIMConstQualifier getQualifier(Uint32 index) const; |
| |
|
/// |
Uint32 getQualifierCount() const; | Uint32 getQualifierCount() const; |
| |
Uint32 findParameter(const String& name) const; |
/// |
|
Uint32 findParameter(const CIMName& name) const; |
| |
CIMConstParameter getParameter(Uint32 pos) const; |
/// |
|
CIMConstParameter getParameter(Uint32 index) const; |
| |
|
/// |
Uint32 getParameterCount() const; | Uint32 getParameterCount() const; |
| |
#ifdef PEGASUS_INTERNALONLY |
/// |
Boolean isNull() const; |
Boolean isUninitialized() const; |
#endif |
|
| |
|
/// |
Boolean identical(const CIMConstMethod& x) const; | Boolean identical(const CIMConstMethod& x) const; |
| |
|
/// |
CIMMethod clone() const; | CIMMethod clone() const; |
| |
private: | private: |