Contents
|
In file ../../src/Pegasus/Common/CIMMethod.h:
The CIMConstMethod class provides a const interface to a CIMMethod object.
Documentation
The CIMConstMethod class provides a const interface to a CIMMethod
object. This class is needed because the shared representation model
used by CIMMethod does not prevent modification to a const CIMMethod
object. Note that the value of a CIMConstMethod object could still be
modified by a CIMMethod object that refers to the same data copy.
Inheritance:
Public Methods
| CIMConstMethod ()
Constructs an uninitialized CIMConstMethod object.
|
| CIMConstMethod (const CIMConstMethod& x)
Constructs a CIMConstMethod object from the value of a specified CIMConstMethod object, so that both objects refer to the same data copy.
|
| CIMConstMethod (const CIMMethod& x)
Constructs a CIMConstMethod object from the value of a specified CIMMethod object, so that both objects refer to the same data copy.
|
| CIMConstMethod ( const CIMName& name, CIMType type, const CIMName& classOrigin = CIMName(), Boolean propagated = false)
Constructs a CIMConstMethod object with the specified attributes.
|
| ~CIMConstMethod ()
Destructs the CIMConstMethod object
|
CIMConstMethod& | operator= (const CIMConstMethod& x)
Assigns the value of the specified CIMConstMethod object to this object, so that both objects refer to the same data copy.
|
CIMConstMethod& | 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.
|
const CIMName& | getName () const
Gets the name of the method.
|
CIMType | getType () const
Gets the method return type.
|
const CIMName& | getClassOrigin () const
Gets the class in which this method was defined.
|
Boolean | getPropagated () const
Tests the propagated attribute of the object.
|
Uint32 | findQualifier (const CIMName& name) const
Finds a qualifier by name.
|
CIMConstQualifier | getQualifier (Uint32 index) const
Gets the qualifier at the specified index.
|
Uint32 | getQualifierCount () const
Gets the number of qualifiers in the method.
|
Uint32 | findParameter (const CIMName& name) const
Finds a parameter by name.
|
CIMConstParameter | getParameter (Uint32 index) const
Gets the parameter at the specified index.
|
Uint32 | getParameterCount () const
Gets the number of parameters in the method.
|
Boolean | isUninitialized () const
Determines whether the object has been initialized.
|
Boolean | identical (const CIMConstMethod& x) const
Compares the method with another method.
|
CIMMethod | clone () const
Makes a deep copy of the method.
|
- CIMConstMethod()
-
Constructs an uninitialized CIMConstMethod 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.
- CIMConstMethod(const CIMConstMethod& x)
-
Constructs a CIMConstMethod object from the value of a specified
CIMConstMethod object, so that both objects refer to the same data
copy.
Example:
CIMConstMethod cm1(CIMName ("getHostName"), CIMTYPE_STRING);
CIMConstMethod cm2(m1);
- Parameters:
- x - The CIMConstMethod object from which to construct a new
CIMConstMethod object.
- CIMConstMethod(const CIMMethod& x)
-
Constructs a CIMConstMethod 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);
CIMConstMethod cm1(m1);
- Parameters:
- x - The CIMMethod object from which to construct a new
CIMConstMethod object.
- CIMConstMethod( const CIMName& name, CIMType type, const CIMName& classOrigin = CIMName(), Boolean propagated = false)
-
Constructs a CIMConstMethod object with the specified attributes.
Example:
CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
- Throws:
- UninitializedObjectException If the method name is null.
- Parameters:
- name - CIMName defining the name for the method.
type - CIMType defining the method return type.
classOrigin - (optional) CIMName representing the class origin.
Note that this should normally not be used. If not provided set to
CIMName() (Null name).
propagated - Optional flag indicating whether the definition of
the CIM Method is local to the CIM Class (respectively, Instance)
in which it appears, or was propagated without modification from
a superclass. Default is false. Note that this attribute is
normally not set by CIM Clients but is used internally within the
CIM Server.
- ~CIMConstMethod()
-
Destructs the CIMConstMethod object
- CIMConstMethod& operator=(const CIMConstMethod& x)
-
Assigns the value of the specified CIMConstMethod object to this
object, so that both objects refer to the same data copy.
Example:
CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
CIMConstMethod m2;
m2 = m1;
- Parameters:
- x - The CIMConstMethod object from which to assign this
CIMConstMethod object.
- Returns:
- A reference to this CIMConstMethod object.
- CIMConstMethod& 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);
CIMConstMethod m2;
m2 = m1;
- Parameters:
- x - The CIMMethod object from which to assign this
CIMConstMethod object.
- Returns:
- A reference to this CIMConstMethod object.
- const CIMName& getName() const
-
Gets the name of the method.
Example:
CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
assert(m1.getName() == CIMName ("getHostName"));
- Throws:
- UninitializedObjectException If the object is not
initialized.
- Returns:
- CIMName with the name of the method.
- CIMType getType() const
-
Gets the method return type.
Example:
CIMConstMethod 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.
- const CIMName& getClassOrigin() const
-
Gets the class in which this method was defined. This information
is normally available with methods that are part of a schema
returned from a CIM Server.
- Throws:
- UninitializedObjectException If the object is not
initialized.
- Returns:
- CIMName containing the classOrigin attribute.
- Boolean 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.
- Uint32 findQualifier(const CIMName& name) const
-
Finds a qualifier by name.
Example:
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
CIMConstMethod m2(m1);
assert(m2.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.
- CIMConstQualifier getQualifier(Uint32 index) const
-
Gets the qualifier at the specified index.
Example:
CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
CIMConstMethod m2(m1);
Uint32 posQualifier = m2.findQualifier(CIMName ("stuff"));
if (posQualifier != PEG_NOT_FOUND)
{
CIMQualifier 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 at the specified index.
- Uint32 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));
CIMConstMethod m2(m1);
assert(m2.getQualifierCount() == 2);
- Throws:
- UninitializedObjectException If the object is not
initialized.
- Returns:
- An integer count of the CIMQualifiers in the CIMMethod.
- Uint32 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.
- CIMConstParameter 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.
- Uint32 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.
- Boolean isUninitialized() const
-
Determines whether the object has been initialized.
Example:
CIMConstMethod m1;
assert(m1.isUninitialized());
- Returns:
- True if the object has not been initialized, false otherwise.
- Boolean identical(const CIMConstMethod& x) const
-
Compares the method with another method.
Example:
CIMConstMethod 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.
- CIMMethod 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 CIMMethod object with a separate copy of the
CIMConstMethod object.
- This class has no child classes.
- Friends:
- class CIMMethod
class CIMMethodRep class XmlWriter class MofWriter
Alphabetic index HTML hierarchy of classes or Java
|