version 1.41, 2003/11/28 18:35:09
|
version 1.42, 2003/12/01 22:20:50
|
|
|
class CIMConstMethod; | class CIMConstMethod; |
class CIMMethodRep; | class CIMMethodRep; |
| |
/** The CIMMethod class is used to represent CIM methods in Pegasus. A Pegasus CIMMethod |
/** The CIMMethod class is used to represent CIM methods in Pegasus. |
consists of the following entities: |
A CIMMethod consists of the following entities: |
<ul> | <ul> |
<li>Name of the method, a CIMName. The name must be a legal name for a |
<li>Name of the method, a \Ref{CIMName}. |
CIMProperty or Method \Ref{CIMName}. |
|
| |
<li>CIM type of the return value of the method, a \Ref{CIMType}. This is any |
<li>CIM type of the method return value, a \Ref{CIMType}. |
of the predefined CIM types (for example: Boolean). |
|
| |
<li>Optional qualifiers (see \Ref{CIMQualifier}) for the method. A method |
<li>Optional qualifiers (see \Ref{CIMQualifier}) for the method. |
can contain zero or more CIMQualifiers and methods are provided to |
A method can contain zero or more CIMQualifiers. |
manipulate the set of qualifiers attached to a CIMMethod object. |
|
|
<li>Optional parameters (see \Ref{CIMParameter}) for the method. |
<li>Optional parameters (see \Ref{CIMParameter} for the method which are |
A CIMMethod may contain zero or more CIMParameters. |
the parameters to be placed on a CIM Method operation. A CIMMethod can |
|
contain zero or more CIMParameters and methods are provided in CIMMethod |
|
to manipulate the set of CIMParameters attached to a CIMMethod object. |
|
</ul> | </ul> |
In addition a CIMMethod contains the following internal attributes: |
In addition, a CIMMethod contains the following internal attributes: |
<ul> | <ul> |
<li><b>propagated</b> - An attribute defining whether this CIMMethod is | <li><b>propagated</b> - An attribute defining whether this CIMMethod is |
propagated from a superclass. Note that this is normally set as part of |
propagated from a superclass. Note that this is normally set as part |
completing the definition of objects (resolving) when they are placed in a |
of completing the definition of objects (resolving) when they are |
repository and is NOT automatically set when creating a local object. It |
created as part of a CIM schema and is NOT automatically set when |
is part of the context of the object within the repository. It can only |
creating a local object. It can only be logically set in context of |
logically be set in context of the superclass of which this CIMMethod is |
the schema in which the CIMMethod is defined. |
defined. |
<li><b>classOrigin</b> - An attribute defining the class in which |
<li><b>ClassOrigin</b> - An attribute defining the superclass in which this |
this CIMMethod was originally defined. This is normally set within the |
CIMMethod was originally defined. This is normally set within the context |
context of the schema in which the CIMMethod is defined. |
of the CIM Server context of other CIM objects (for example, a |
This attribute is available from objects retrieved from the CIM |
repository). This attribute is available from objects retrieved from the |
Server, for example, and provides information on the defintion |
CIM Server, for example and provides information on the defintion of this method in the class hiearchy |
of this method in the class hierarchy. Together the |
(this object or a superclass or instance of a superclass)was originally |
propagated and ClassOrigin attributes can be used to determine if |
defined. Together the propagated and ClassOrigin attributes can be used |
methods originated with the current object or were inherited from |
to determine if methods originated with the current object or were |
higher levels in the hiearchy. |
inherited from higher levels in the hiearchy. |
|
</ul> | </ul> |
CIMMethods are generally in the context of a CIMClass. |
A CIMMethod is generally defined in the context of a \Ref{CIMClass}. |
| |
CIMMethod is a shared class that uses shared representations, meaning that multiple |
CIMMethod uses shared representations, meaning that multiple |
CIMMethods objects may refer to the came copy of data. Assignment and copy |
CIMMethod objects may refer to the same copy of data. Assignment and copy |
operators create new references to the same data, not distinct copies. A distinct copy |
operators create new references to the same data, not distinct copies. |
may be created using teh clone method. |
A distinct copy may be created using the clone method. |
{@link Shared Classes} | {@link Shared Classes} |
@see CIMConstMethod | @see CIMConstMethod |
@see CIMParameters | @see CIMParameters |
|
|
{ | { |
public: | public: |
| |
/** Creates a new unitialized CIMMethod object. |
/** Creates a new uninitialized CIMMethod object. |
The only thing that can be done with this object is to copy another object |
The only thing that can be done with this object is to copy another |
into it. Other methods such as setName, etc. will fail with an |
object into it. Other methods, such as setName, will fail with an |
UnitializedObjectException. The object has the state unitialized which |
UninitializedObjectException. The object has an uninitialized state, |
can be tested with the isUnitialized() method. |
which can be tested with the isUninitialized method. |
@see isUnitialized() |
@see isUninitialized() |
@see UnitializedObjectException |
@see UninitializedObjectException |
*/ | */ |
CIMMethod(); | CIMMethod(); |
| |
/** Creates a new CIMMethod object from another CIMMethod object. | /** Creates a new CIMMethod object from another CIMMethod object. |
The new CIMMethodObject references the same copy of data as the |
The new CIMMethod object references the same copy of data as the |
specified object; no copy is made. | specified object; no copy is made. |
@param x CIMMethod object from which to create the new CIMMethod object. | @param x CIMMethod object from which to create the new CIMMethod object. |
|
<p><b>Example:</b> |
<pre> | <pre> |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); | CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
const CIMMethod cm1(m1); | const CIMMethod cm1(m1); |
|
|
*/ | */ |
CIMMethod(const CIMMethod& x); | CIMMethod(const CIMMethod& x); |
| |
/** Creates a CIMMethod object with the specified name and other input attributes. |
/** Creates a CIMMethod object with the specified attributes. |
@param name CIMName defining the name for the method. | @param name CIMName defining the name for the method. |
| |
@param type CIMType defining method return data type. |
@param type CIMType defining the method return type. |
| |
@param classOrigin (optional) CIMName representing the class origin. Note |
@param classOrigin (optional) CIMName representing the class origin. |
that this should normally not be used. If not provided set to |
Note that this should normally not be used. If not provided set to |
CIMName() (Null name). | CIMName() (Null name). |
@param propagated Optional flag indicating whether the definition of the |
@param propagated Optional flag indicating whether the definition of |
CIM Method is local to the CIM Class (respectively, Instance) in which |
the CIM Method is local to the CIM Class (respectively, Instance) |
it appears, or was propagated without modification from the a |
in which it appears, or was propagated without modification from |
Superclass. Default is false. Note that this attribute is normally |
a superclass. Default is false. Note that this attribute is |
not set by CIM Clients but is used internally within the CIM |
normally not set by CIM Clients but is used internally within the |
Server. |
CIM Server. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); | CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
|
|
Boolean propagated = false); | Boolean propagated = false); |
| |
/** Destructor for the CIMMethod. The shared data copy remains valid until | /** Destructor for the CIMMethod. The shared data copy remains valid until |
all referring objects are destructed |
all referring objects are destructed. |
{@link Shared Classes} | {@link Shared Classes} |
*/ | */ |
~CIMMethod(); | ~CIMMethod(); |
| |
/** The assignment operator assigns one CIM method to another. |
/** The assignment operator assigns one CIMMethod to another. |
After the assignment, both CIMMethod objects refer to the same | After the assignment, both CIMMethod objects refer to the same |
data copy; a distinct copy is not created. | data copy; a distinct copy is not created. |
|
@param x CIMMethod object from which to assign this CIMMethod object. |
| |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
|
|
*/ | */ |
void setName(const CIMName& name); | void setName(const CIMName& name); |
| |
/** Gets the method return data type. |
/** Gets the method return type. |
@return CIMType containing the method return data type for this |
@return A CIMType containing the method return type. |
method. |
@exception UninitializedObjectException Thrown if the object is not |
@exception Throws UnitializedObjectException if object is not |
|
initialized. | initialized. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
|
|
*/ | */ |
CIMType getType() const; | CIMType getType() const; |
| |
/** Sets the method return data type to the specified CIMtype. |
/** Sets the method return type to the specified CIMType. |
This is the type of the CIMValue | This is the type of the CIMValue |
that is returned on a CIM method invocation |
that is returned on a CIM method invocation. |
@param type CIMType to be set into the CIMMethod object. | @param type CIMType to be set into the CIMMethod object. |
@exception Throws UnitializedObjectException if object is not |
@exception UninitializedObjectException Thrown if the object is not |
initialized. | initialized. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMMethod m1(); |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
m1.setName(CIMName ("getVersion")); | m1.setName(CIMName ("getVersion")); |
assert(m1.setType(CIMTYPE_STRING)); |
assert(m1.getName() == CIMName ("getVersion")); |
</pre> | </pre> |
*/ | */ |
void setType(CIMType type); | void setType(CIMType type); |
| |
/** Gets the class in which this method was defined. This information | /** Gets the class in which this method was defined. This information |
is normally available with methods that are part of classes and |
is normally available with methods that are part of a schema |
instances returned from a CIM Server. |
returned from a CIM Server. |
@return CIMName containing the classOrigin field. |
@return CIMName containing the classOrigin attribute. |
*/ | */ |
const CIMName& getClassOrigin() const; | const CIMName& getClassOrigin() const; |
| |
/** Sets the ClassOrigin attribute with the classname defined on |
/** Sets the classOrigin attribute with the specified class name. |
the input parameter. Normally this method is used internally |
Normally this method is used internally by a CIM Server when |
as part of the use objects containing methods (classes |
defining methods in the context of a schema. |
and instances) in the context of the CIM Server. |
|
@param classOrigin CIMName parameter defining the name | @param classOrigin CIMName parameter defining the name |
of the class origin. |
of the origin class. |
@exception Throws UnitializedObjectException if object is not |
@exception UninitializedObjectException Thrown if the object is not |
initialized. | initialized. |
*/ | */ |
void setClassOrigin(const CIMName& classOrigin); | void setClassOrigin(const CIMName& classOrigin); |
| |
/** Tests the propagated attribute of the object. The propagated attribute |
/** Tests the propagated attribute of the object. The propagated |
indicates if this method was propagated from a higher level |
attribute indicates whether this method was propagated from a |
class. Normally this attribute is set as part of putting |
higher-level class. Normally this attribute is set as part of |
classes into the repository (resolving the class). It is |
defining a method in the context of a schema. It is set in |
available on methods in classes read from the repository and |
methods retrieved from a CIM Server. |
on instances that are read from the instance repository. |
|
@return True if method is propagated; otherwise,false. | @return True if method is propagated; otherwise,false. |
*/ | */ |
Boolean getPropagated() const; | Boolean getPropagated() const; |
| |
/** Sets the Propagated qualifier. Normally this is used by the functions |
/** Sets the propagated attribute. Normally this is used by a CIM Server |
that resolve classes and instances as part of the installation into |
when defining a method in the context of a schema. |
a repository. |
@param propagated Flag indicating whether the method is propagated |
@param propagated Flag indicating method is propagated from superclass propagation. |
from a superclass. |
True means that the method was propagated from superclass. |
@exception UninitializedObjectException Thrown if the object is not |
@exception Throws UnitializedObjectException if object is not |
|
initialized. | initialized. |
*/ | */ |
void setPropagated(Boolean propagated); | void setPropagated(Boolean propagated); |
| |
/** Adds the specified qualifier to the CIMmethod object. |
/** Adds the specified qualifier to the CIMMethod object. |
@param x CIMQualifier object representing the qualifier | @param x CIMQualifier object representing the qualifier |
to be added. | to be added. |
@return The CIMMethod object after adding the specified qualifier. | @return The CIMMethod object after adding the specified qualifier. |
@exception Throws AlreadyExistsException if the qualifier already exists. |
@exception AlreadyExistsException Thrown if the qualifier already |
|
exists in this CIMMethod. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); | CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
|
|
@param name CIMName of the qualifier to be found. | @param name CIMName of the qualifier to be found. |
@return Zero origin index of the qualifier found or PEG_NOT_FOUND | @return Zero origin index of the qualifier found or PEG_NOT_FOUND |
if not found. | if not found. |
@exception Throws UnitializedObjectException if object is not |
@exception UninitializedObjectException Thrown if the object is not |
initialized. | initialized. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
|
|
/** Gets the CIMQualifier defined by the input parameter. | /** Gets the CIMQualifier defined by the input parameter. |
@param index Zero origin index of the qualifier requested. | @param index Zero origin index of the qualifier requested. |
@return CIMQualifier object representing the qualifier found. | @return CIMQualifier object representing the qualifier found. |
@exception Throws IndexOutOfBoundsException exception if the index is |
@exception IndexOutOfBoundsException Thrown if the index is |
outside the range of parameters available from the CIMMethod. | outside the range of parameters available from the CIMMethod. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); | CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
m1.addQualifier(CIMQualifier(CIMName ("stuff"), true)); | m1.addQualifier(CIMQualifier(CIMName ("stuff"), true)); |
Uint32 posQualifier; |
Uint32 posQualifier = m1.findQualifier(CIMName ("stuff")); |
posQualifier = m1.findQualifier(CIMName ("stuff")); |
if (posQualifier != PEG_NOT_FOUND) |
|
{ |
CIMQualifier q = m1.getQualifier(posQualifier); | CIMQualifier q = m1.getQualifier(posQualifier); |
|
} |
</pre> | </pre> |
*/ | */ |
CIMQualifier getQualifier(Uint32 index); | CIMQualifier getQualifier(Uint32 index); |
| |
/** Gets the CIMQualifier defined by the input parameter. | /** Gets the CIMQualifier defined by the input parameter. |
@param index Index of the qualifier requested. |
@param index Zero origin index of the qualifier requested. |
@return CIMConstQualifier object representing the qualifier found. |
@return CIMQualifier object representing the qualifier found. |
@exception Throws IndexOutOfBoundsException exception if the index is |
@exception IndexOutOfBoundsException Thrown if the index is |
outside the range of parameters available from the CIMMethod. | outside the range of parameters available from the CIMMethod. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); | CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
m1.addQualifier(CIMQualifier(CIMName ("stuff"), true)); | m1.addQualifier(CIMQualifier(CIMName ("stuff"), true)); |
|
const CIMMethod m2 = m1; |
Uint32 posQualifier; |
Uint32 posQualifier = m2.findQualifier(CIMName ("stuff")); |
posQualifier = m1.findQualifier(CIMName ("stuff")); |
if (posQualifier != PEG_NOT_FOUND) |
CIMQualifier q = m1.getQualifier(posQualifier); |
{ |
|
CIMConstQualifier q = m2.getQualifier(posQualifier); |
|
} |
</pre> | </pre> |
*/ | */ |
CIMConstQualifier getQualifier(Uint32 index) const; | CIMConstQualifier getQualifier(Uint32 index) const; |
| |
/** Removes the specified CIMQualifier from this method. |
/** Removes the specified qualifier from this method. |
@param index Index of the qualifier to remove. | @param index Index of the qualifier to remove. |
@exception Throws IndexOutOfBoundsException exception if the index is |
@exception IndexOutOfBoundsException Thrown if the index is |
outside the range of parameters available from the CIMMethod. | outside the range of parameters available from the CIMMethod. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
|
|
@param x CIMParameter to be added to the CIM Method. | @param x CIMParameter to be added to the CIM Method. |
@return CIMMethod object after the specified parameter is added. | @return CIMMethod object after the specified parameter is added. |
<p><b>Example:</b> | <p><b>Example:</b> |
@exception Throws UnitializedObjectException if object is not |
@exception UninitializedObjectException Thrown if the object is not |
initialized. | initialized. |
|
@exception AlreadyExistsException Thrown if the parameter already |
|
exists in this CIMMethod. |
<pre> | <pre> |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); | CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
m1.addParameter(CIMParameter(CIMName ("ipaddress"), CIMTYPE_STRING)); | m1.addParameter(CIMParameter(CIMName ("ipaddress"), CIMTYPE_STRING)); |
|
|
/** Gets the parameter defined by the specified index. | /** Gets the parameter defined by the specified index. |
@param index Index for the parameter to be returned. | @param index Index for the parameter to be returned. |
@return CIMParameter object requested. | @return CIMParameter object requested. |
@exception Throws IndexOutOfBoundsException if the index is outside |
@exception IndexOutOfBoundsException Thrown if the index is outside |
the range of available parameters. | the range of available parameters. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMParameter cp = m1.getParameter(m1.findParameter(CIMName ("ipaddress"))); |
CIMParameter cp; |
|
Uint32 parameterIndex = m1.findParameter(CIMName ("ipaddress")); |
|
if (parameterIndex != PEG_NOT_FOUND) |
|
{ |
|
cp = m1.getParameter(parameterIndex); |
|
} |
</pre> | </pre> |
*/ | */ |
CIMParameter getParameter(Uint32 index); | CIMParameter getParameter(Uint32 index); |
| |
/** Gets the parameter defined for the specified index. |
/** Gets the parameter defined by the specified index. |
@param index Index for the parameter to be returned. | @param index Index for the parameter to be returned. |
@return CIMConstParameter object requested. |
@return CIMParameter object requested. |
@exception Throws IndexOutOfBoundsException if the index is outside |
@exception IndexOutOfBoundsException Thrown if the index is outside |
the range of available parameters |
the range of available parameters. |
|
<p><b>Example:</b> |
|
<pre> |
|
CIMConstParameter cp; |
|
Uint32 parameterIndex = m1.findParameter(CIMName ("ipaddress")); |
|
if (parameterIndex != PEG_NOT_FOUND) |
|
{ |
|
cp = m1.getParameter(parameterIndex); |
|
} |
|
</pre> |
*/ | */ |
CIMConstParameter getParameter(Uint32 index) const; | CIMConstParameter getParameter(Uint32 index) const; |
| |
/** Removes the CIMParameter defined by the specified index. |
/** Removes the parameter defined by the specified index. |
@param index Index of the parameter to be removed. | @param index Index of the parameter to be removed. |
@exception Throws IndexOutOfBoundsException if the index is outside the |
@exception IndexOutOfBoundsException Thrown if the index is outside the |
range of parameters available from the CIMMethod. | range of parameters available from the CIMMethod. |
*/ | */ |
void removeParameter (Uint32 index); | void removeParameter (Uint32 index); |
|
|
| |
/** 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; | @return True if the object has not been initialized; |
otherwise false. |
otherwise, false. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMMethod m1; | CIMMethod m1; |
assert(m1.isUnitialized()); |
assert(m1.isUninitialized()); |
</pre> | </pre> |
*/ | */ |
Boolean isUninitialized() const; | Boolean isUninitialized() const; |
| |
/** Compares with a CIMConstMethod. | /** Compares with a CIMConstMethod. |
@param x CIMConstMethod object for the method to be compared. | @param x CIMConstMethod object for the method to be compared. |
@return True if this method is identical to the one specified. |
@return True if this method is identical to the one specified; |
|
otherwise, false. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); | CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
|
|
| |
CIMMethod(CIMMethodRep* rep); | CIMMethod(CIMMethodRep* rep); |
| |
|
/** This method is not implemented. It is defined to explicitly disallow |
|
construction of a CIMMethod from a CIMConstMethod. Because the |
|
CIMMethod class uses a shared representation model, allowing this |
|
construction would effectively allow modification of CIMConstMethod |
|
objects. |
|
*/ |
PEGASUS_EXPLICIT CIMMethod(const CIMConstMethod& x); | PEGASUS_EXPLICIT CIMMethod(const CIMConstMethod& x); |
| |
void _checkRep() const; | void _checkRep() const; |
|
|
/** The CIMConstMethod class is used to represent CIM methods in the | /** The CIMConstMethod class is used to represent CIM methods in the |
same manner as the CIMMethod class except that the const attribute | same manner as the CIMMethod class except that the const attribute |
is applied to the objects created. This class includes equivalents | is applied to the objects created. This class includes equivalents |
to the methods from CIMMethod that are usable in a const object including |
to the methods from CIMMethod that are available in a const object, |
constructors, (for example: getter methods) and the destructor. |
including constructors, accessor methods, and the destructor. |
|
|
|
Because the CIMMethod class uses a shared representation model, allowing |
|
the construction of a 'CIMMethod' from a 'const CIMMethod' would |
|
effectively allow modification of a 'const CIMMethod'. The CIMConstMethod |
|
class is used to represent constant CIMMethod objects. Since a |
|
CIMConstMethod cannot be converted to a CIMMethod, its value remains |
|
constant. |
| |
REVIEWERS: ATTN: Complete the explanation of why. |
|
@see CIMMethod() | @see CIMMethod() |
*/ | */ |
class PEGASUS_COMMON_LINKAGE CIMConstMethod | class PEGASUS_COMMON_LINKAGE CIMConstMethod |
{ | { |
public: | public: |
| |
/** Creates a new empty CIMConstMethod object. |
/** Creates a new uninitialized CIMConstMethod object. |
@see CIMMethod() |
The only thing that can be done with this object is to copy another |
|
object into it. Other methods, such as getName, will fail with an |
|
UninitializedObjectException. The object has an uninitialized state, |
|
which can be tested with the isUninitialized method. |
|
@see isUninitialized() |
|
@see UninitializedObjectException |
*/ | */ |
CIMConstMethod(); | CIMConstMethod(); |
| |
/** Creates a new CIMConstMethod object from another CIMConstMethod object. | /** Creates a new CIMConstMethod object from another CIMConstMethod object. |
The new CIMMethodObject references the same copy of data as teh specified object, |
The new CIMConstMethod object references the same copy of data as the |
no copy is made. |
specified object; no copy is made. |
@param x CIMMethod object from which to create the newCIMMethod object. |
@param x CIMConstMethod object from which to create the new |
|
CIMConstMethod object. |
|
<p><b>Example:</b> |
<pre> | <pre> |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
CIMConstMethod cm1(CIMName ("getHostName"), CIMTYPE_STRING); |
const CIMMethod cm1(m1); |
CIMConstMethod cm2(m1); |
</pre> | </pre> |
{@link Shared Classes} | {@link Shared Classes} |
*/ | */ |
CIMConstMethod(const CIMConstMethod& x); | CIMConstMethod(const CIMConstMethod& x); |
| |
/** Creates a new CIMConstMethod object from an |
/** Creates a new CIMConstMethod object from a CIMMethod object. |
existing CIMMethod object. Creates a pointer |
The new CIMConstMethod object references the same copy of data as the |
to the existing representation. |
specified object; no copy is made. |
@return CIMConstMethod object reference. |
@param x CIMMethod object from which to create the new |
@see CIMMethod() |
CIMConstMethod object. |
|
<p><b>Example:</b> |
|
<pre> |
|
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
|
CIMConstMethod cm1(m1); |
|
</pre> |
|
{@link Shared Classes} |
*/ | */ |
CIMConstMethod(const CIMMethod& x); | CIMConstMethod(const CIMMethod& x); |
| |
/** Creates a CIMConstMethod object with the specified name and other input attributes. |
/** Creates a CIMConstMethod object with the specified attributes. |
@param name CIMName defining the name for the method. | @param name CIMName defining the name for the method. |
| |
@param type CIMType defining method return data type. |
@param type CIMType defining the method return type. |
| |
@param classOrigin (optional) CIMName representing the class origin. Note |
@param classOrigin (optional) CIMName representing the class origin. |
that this should normally not be used. If not provided set to |
Note that this should normally not be used. If not provided set to |
CIMName() (Null name). | CIMName() (Null name). |
@param propagated Optional flag indicating whether the definition of the |
@param propagated Optional flag indicating whether the definition of |
CIM Method is local to the CIM Class (respectively, Instance) in which |
the CIM Method is local to the CIM Class (respectively, Instance) |
it appears, or was propagated without modification from the a |
in which it appears, or was propagated without modification from |
Superclass. Default is false. Note that this attribute is normally |
a superclass. Default is false. Note that this attribute is |
not set by CIM Clients but is used internally within the CIM |
normally not set by CIM Clients but is used internally within the |
Server. |
CIM Server. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); | CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
|
|
const CIMName& classOrigin = CIMName(), | const CIMName& classOrigin = CIMName(), |
Boolean propagated = false); | Boolean propagated = false); |
| |
/** Destructor for the CIMConstMethod. The shared data copy remains valid until |
/** Destructor for the CIMConstMethod. The shared data copy remains valid |
all referring objects are destructed |
until all referring objects are destructed. |
{@link Shared Classes} | {@link Shared Classes} |
*/ | */ |
~CIMConstMethod(); | ~CIMConstMethod(); |
| |
/** The assignment operator assigns one CIMConstMethod object to another. |
/** The assignment operator assigns one CIMConstMethod to another. |
After the assignment, both CIMMethod objects refer to the same |
After the assignment, both CIMConstMethod objects refer to the same |
data copy; a distinct copy is not created. | data copy; a distinct copy is not created. |
|
@param x CIMConstMethod object from which to assign this |
|
CIMConstMethod object. |
| |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
|
|
CIMConstMethod. | CIMConstMethod. |
After the assignment, both objects refer to the same | After the assignment, both objects refer to the same |
data copy; a distinct copy is not created. | data copy; a distinct copy is not created. |
|
@param x CIMConstMethod object from which to assign this |
|
CIMConstMethod object. |
| |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
|
|
*/ | */ |
const CIMName& getName() const; | const CIMName& getName() const; |
| |
/** Gets the method return data type. |
/** Gets the method return type. |
@return CIMType containing the method return data type for this |
@return A CIMType containing the method return type. |
method. |
@exception UninitializedObjectException Thrown if the object is not |
|
initialized. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); | CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
|
|
CIMType getType() const; | CIMType getType() const; |
| |
/** Gets the class in which this method was defined. This information | /** Gets the class in which this method was defined. This information |
is normally available with methods that are part of classes and |
is normally available with methods that are part of a schema |
instances returned from a CIM Server. |
returned from a CIM Server. |
@return CIMName containing the classOrigin field. |
@return CIMName containing the classOrigin attribute. |
*/ | */ |
const CIMName& getClassOrigin() const; | const CIMName& getClassOrigin() const; |
| |
/** Tests the propagated attribute of the object. The propagated attribute |
/** Tests the propagated attribute of the object. The propagated |
indicates if this method was propagated from a higher level |
attribute indicates whether this method was propagated from a |
class. Normally this attribute is set as part of putting |
higher-level class. Normally this attribute is set as part of |
classes into the repository (resolving the class). It is |
defining a method in the context of a schema. It is set in |
available on methods in classes read from the repository and |
methods retrieved from a CIM Server. |
on instances that are read from the instance repository. |
|
@return True if method is propagated; otherwise,false. | @return True if method is propagated; otherwise,false. |
*/ | */ |
Boolean getPropagated() const; | Boolean getPropagated() const; |
| |
/** Searches for a qualifier with the specified input name. | /** Searches for a qualifier with the specified input name. |
@param name CIMName of the qualifier to be found. | @param name CIMName of the qualifier to be found. |
@return Index of the qualifier found or PEG_NOT_FOUND |
@return Zero origin index of the qualifier found or PEG_NOT_FOUND |
if not found. | if not found. |
|
@exception UninitializedObjectException Thrown if the object is not |
|
initialized. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
m1.addQualifier(CIMQualifier(CIMName ("stuff"), true)); | m1.addQualifier(CIMQualifier(CIMName ("stuff"), true)); |
assert(m1.findQualifier(CIMName ("stuff")) != PEG_NOT_FOUND); |
CIMConstMethod m2(m1); |
|
assert(m2.findQualifier(CIMName ("stuff")) != PEG_NOT_FOUND); |
</pre> | </pre> |
*/ | */ |
Uint32 findQualifier(const CIMName& name) const; | Uint32 findQualifier(const CIMName& name) const; |
| |
/** Gets the CIMQualifier defined by the input parameter. | /** Gets the CIMQualifier defined by the input parameter. |
@param index Index of the qualifier requested. |
@param index Zero origin index of the qualifier requested. |
@return CIMQualifier object representing the qualifier found. | @return CIMQualifier object representing the qualifier found. |
@exception Throws IndexOutOfBoundsException exception if the index is |
@exception IndexOutOfBoundsException Thrown if the index is |
outside the range of parameters available from the CIMMethod. | outside the range of parameters available from the CIMMethod. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); | CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
m1.addQualifier(CIMQualifier(CIMName ("stuff"), true)); | m1.addQualifier(CIMQualifier(CIMName ("stuff"), true)); |
Uint32 posQualifier; |
CIMConstMethod m2(m1); |
posQualifier = m1.findQualifier(CIMName ("stuff")); |
Uint32 posQualifier = m2.findQualifier(CIMName ("stuff")); |
CIMQualifier q = m1.getQualifier(posQualifier); |
if (posQualifier != PEG_NOT_FOUND) |
|
{ |
|
CIMQualifier q = m2.getQualifier(posQualifier); |
|
} |
</pre> | </pre> |
*/ | */ |
CIMConstQualifier getQualifier(Uint32 index) const; | CIMConstQualifier getQualifier(Uint32 index) const; |
| |
/** Returns the number of Qualifiers attached to this CIMMethod object. |
/** Returns the number of Qualifiers attached to this CIMConstMethod |
@return The number of qualifiers in the CIM Method. |
object. |
|
@return The number of qualifiers attached to the CIM method. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
assert(m1.getQualifierCount() == 0); |
m1.addQualifier(CIMQualifier(CIMName ("stuff"), true)); |
|
m1.addQualifier(CIMQualifier(CIMName ("stuff2"), true)); |
|
CIMConstMethod m2(m1); |
|
assert(m2.getQualifierCount() == 2); |
</pre> | </pre> |
*/ | */ |
Uint32 getQualifierCount() const; | Uint32 getQualifierCount() const; |
|
|
| |
/** Gets the parameter defined by the specified index. | /** Gets the parameter defined by the specified index. |
@param index Index for the parameter to be returned. | @param index Index for the parameter to be returned. |
@return CIMParameter object requested. |
@return CIMConstParameter object requested. |
@exception Throws IndexOutOfBoundsException if the index is outside |
@exception IndexOutOfBoundsException Thrown if the index is outside |
the range of available parameters. | the range of available parameters. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMConstParameter cp = m1.getParameter(m1.findParameter(CIMName ("ipaddress"))); |
CIMConstParameter cp; |
|
Uint32 parameterIndex = m1.findParameter(CIMName ("ipaddress")); |
|
if (parameterIndex != PEG_NOT_FOUND) |
|
{ |
|
cp = m1.getParameter(parameterIndex); |
|
} |
</pre> | </pre> |
*/ | */ |
CIMConstParameter getParameter(Uint32 index) const; | CIMConstParameter getParameter(Uint32 index) 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; | @return True if the object has not been initialized; |
otherwise false. |
otherwise, false. |
|
<p><b>Example:</b> |
|
<pre> |
|
CIMConstMethod m1; |
|
assert(m1.isUninitialized()); |
|
</pre> |
*/ | */ |
Boolean isUninitialized() const; | Boolean isUninitialized() const; |
| |
/** Compares with a CIMConstMethod. | /** Compares with a CIMConstMethod. |
@param x CIMConstMethod object for the method to be compared. | @param x CIMConstMethod object for the method to be compared. |
@return True if this method is identical to the one specified. |
@return True if this method is identical to the one specified; |
|
otherwise, false. |
<p><b>Example:</b> | <p><b>Example:</b> |
<pre> | <pre> |
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); |
CIMConstMethod m2(CIMName ("test"), CIMTYPE_STRING); | CIMConstMethod m2(CIMName ("test"), CIMTYPE_STRING); |
assert(!m1.identical(m2)); | assert(!m1.identical(m2)); |
</pre> | </pre> |
*/ | */ |
Boolean identical(const CIMConstMethod& x) const; | Boolean identical(const CIMConstMethod& x) const; |
| |
/** Makes a clone (deep copy) of this CIMConstmethod. This creates |
/** Makes a clone (deep copy) of this CIMConstMethod. This creates |
a new copy of all of the components of the method including | a new copy of all of the components of the method including |
parameters and qualifiers. | parameters and qualifiers. |
@return Independent copy of the CIMConstMethod object. Note that | @return Independent copy of the CIMConstMethod object. Note that |
it is returned as a CIMMethod, not const. |
the copy is a non-constant CIMMethod. |
*/ | */ |
CIMMethod clone() const; | CIMMethod clone() const; |
| |