OWBI1::CIMMethod Class Reference

The CIMMethod class encapsulates all data and behaviour pertinent to an CIM method. More...

#include <OWBI1_CIMMethod.hpp>

Inheritance diagram for OWBI1::CIMMethod:

Inheritance graph
[legend]
Collaboration diagram for OWBI1::CIMMethod:

Collaboration graph
[legend]
List of all members.

Public Types

typedef COWIntrusiveReference<
METHData > CIMMethod::* 
safe_bool

Public Member Functions

 CIMMethod ()
 Create a new CIMMethod object.
 CIMMethod (CIMNULL_t)
 Create a NULL CIMMethod object.
 CIMMethod (const CIMName &name)
 Create an CIMMethod with a name.
 CIMMethod (const char *name)
 Create an CIMMethod with a name.
 CIMMethod (const CIMMethod &arg)
 Copy constructor.
 ~CIMMethod ()
 Destroy this CIMMethod object.
virtual void setNull ()
 Set this to a null object.
CIMMethodoperator= (const CIMMethod &arg)
 Assignment operator.
CIMMethodsetQualifiers (const CIMQualifierArray &quals)
 Set the qualifiers for this method.
CIMMethodaddQualifier (const CIMQualifier &qual)
 Add a qualifier to this CIMMethod.
CIMQualifierArray getQualifiers () const
 Get the qualifiers for this method.
CIMQualifier getQualifier (const CIMName &name) const
 Get the qualifier associated with a specified name.
CIMName getOriginClass () const
 Get the origin class for this method.
CIMMethodsetOriginClass (const CIMName &originCls)
 Set thr origin class for this method.
CIMMethodaddParameter (const CIMParameter &param)
 Add a parameter to this CIMMethod.
CIMMethodsetParameters (const CIMParameterArray &inParms)
 Set the parameters for this method.
CIMParameterArray getParameters () const
 Get the parameters for this method.
CIMParameterArray getINParameters () const
 Get the IN parameters for this method.
CIMParameterArray getOUTParameters () const
 Get the OUT parameters for this method.
CIMMethodsetReturnType (const CIMDataType &type)
 Set the return data type for this parameter.
CIMDataType getReturnType () const
Int32 getReturnDataSize () const
CIMMethodsetOverridingMethod (const CIMName &omname)
 Set name of overriding method.
CIMName getOverridingMethod () const
CIMMethodsetPropagated (bool propagated=true)
 Set the propagated flag for this method.
bool getPropagated () const
 Get the propagated flag.
CIMMethod clone (WBEMFlags::EIncludeQualifiersFlag includeQualifiers=WBEMFlags::E_INCLUDE_QUALIFIERS, WBEMFlags::EIncludeClassOriginFlag includeClassOrigin=WBEMFlags::E_INCLUDE_CLASS_ORIGIN) const
 Create an CIMMethod object based on this one, using the criteria specified in the parameters.
virtual CIMName getName () const
virtual void setName (const CIMName &name)
 Set the name of this method.
virtual void readObject (std::istream &istrm)
 Read this object from an input stream.
virtual void writeObject (std::ostream &ostrm) const
 Write this object to an output stream.
virtual String toMOF () const
virtual String toString () const
 operator safe_bool () const
bool operator! () const

Protected Attributes

COWIntrusiveReference< METHDatam_pdata

Friends

OWBI1_OWBI1PROVIFC_API bool operator< (const CIMMethod &x, const CIMMethod &y)

Classes

struct  METHData

Detailed Description

The CIMMethod class encapsulates all data and behaviour pertinent to an CIM method.

CIMMethods are ref counted, copy on write objects. It is possible to have an CIMMethod object that is NULL. The method to check for this condition is as follows:

CIMMethod ch = cc.getMethod(...); if (!ch) { // Null method } else { // Valid method }

Definition at line 65 of file OWBI1_CIMMethod.hpp.


Member Typedef Documentation

typedef COWIntrusiveReference<METHData> CIMMethod::* OWBI1::CIMMethod::safe_bool
 

Definition at line 255 of file OWBI1_CIMMethod.hpp.


Constructor & Destructor Documentation

OWBI1::CIMMethod::CIMMethod  ) 
 

Create a new CIMMethod object.

Definition at line 85 of file OWBI1_CIMMethod.cpp.

Referenced by clone().

OWBI1::CIMMethod::CIMMethod CIMNULL_t   )  [explicit]
 

Create a NULL CIMMethod object.

Definition at line 90 of file OWBI1_CIMMethod.cpp.

OWBI1::CIMMethod::CIMMethod const CIMName name  )  [explicit]
 

Create an CIMMethod with a name.

Parameters:
name The name of this CIMMethod.

Definition at line 101 of file OWBI1_CIMMethod.cpp.

References m_pdata, and name.

OWBI1::CIMMethod::CIMMethod const char *  name  )  [explicit]
 

Create an CIMMethod with a name.

Parameters:
name The name of this CIMMethod as a NULL terminated string.

Definition at line 95 of file OWBI1_CIMMethod.cpp.

References m_pdata.

OWBI1::CIMMethod::CIMMethod const CIMMethod arg  ) 
 

Copy constructor.

Parameters:
arg The CIMMethod this object will be a copy of.

Definition at line 107 of file OWBI1_CIMMethod.cpp.

OWBI1::CIMMethod::~CIMMethod  ) 
 

Destroy this CIMMethod object.

Definition at line 112 of file OWBI1_CIMMethod.cpp.


Member Function Documentation

CIMMethod & OWBI1::CIMMethod::addParameter const CIMParameter param  ) 
 

Add a parameter to this CIMMethod.

Parameters:
param The CIMParameter to add to this method.
Returns:
a reference to *this

Definition at line 178 of file OWBI1_CIMMethod.cpp.

References m_pdata.

CIMMethod & OWBI1::CIMMethod::addQualifier const CIMQualifier qual  ) 
 

Add a qualifier to this CIMMethod.

Parameters:
qual The CIMQualifier to add to this method.
Returns:
a reference to *this

Definition at line 130 of file OWBI1_CIMMethod.cpp.

References m_pdata.

CIMMethod OWBI1::CIMMethod::clone WBEMFlags::EIncludeQualifiersFlag  includeQualifiers = WBEMFlags::E_INCLUDE_QUALIFIERS,
WBEMFlags::EIncludeClassOriginFlag  includeClassOrigin = WBEMFlags::E_INCLUDE_CLASS_ORIGIN
const
 

Create an CIMMethod object based on this one, using the criteria specified in the parameters.

Parameters:
includeQualifiers If false, no qualifiers will be included in the CIMMethod returned. Otherwise all qualifiers are included.
includeClassOrigin I false, the class origin will not be included in the CIMMethod returned. Otherwise the class origin is included
Returns:
A new CIMMethod that is a copy of this one with the qualifiers and class origin optionally exclued.

Definition at line 266 of file OWBI1_CIMMethod.cpp.

References CIMMethod(), OWBI1::CIMNULL, and m_pdata.

CIMParameterArray OWBI1::CIMMethod::getINParameters  )  const
 

Get the IN parameters for this method.

Returns:
An CIMParameterArray that contains IN the parameters for this method.

Definition at line 198 of file OWBI1_CIMMethod.cpp.

References OWBI1::CIMQualifier::CIM_QUAL_IN, i, m_pdata, and OWBI1::Array< T >::push_back().

CIMName OWBI1::CIMMethod::getName  )  const [virtual]
 

Returns:
The name of this method as an CIMName.

Implements OWBI1::CIMElement.

Definition at line 304 of file OWBI1_CIMMethod.cpp.

References m_pdata.

Referenced by OWBI1::CIMClass::setMethod().

CIMName OWBI1::CIMMethod::getOriginClass  )  const
 

Get the origin class for this method.

Returns:
The name of the origin class.

Definition at line 165 of file OWBI1_CIMMethod.cpp.

References m_pdata.

CIMParameterArray OWBI1::CIMMethod::getOUTParameters  )  const
 

Get the OUT parameters for this method.

Returns:
An CIMParameterArray that contains OUT the parameters for this method.

Definition at line 219 of file OWBI1_CIMMethod.cpp.

References OWBI1::CIMQualifier::CIM_QUAL_OUT, i, m_pdata, and OWBI1::Array< T >::push_back().

CIMName OWBI1::CIMMethod::getOverridingMethod  )  const
 

Returns:
The name of the overriding method.

Definition at line 260 of file OWBI1_CIMMethod.cpp.

References m_pdata.

CIMParameterArray OWBI1::CIMMethod::getParameters  )  const
 

Get the parameters for this method.

Returns:
An CIMParameterArray that contains the parameters for this method.

Definition at line 192 of file OWBI1_CIMMethod.cpp.

References m_pdata.

bool OWBI1::CIMMethod::getPropagated  )  const
 

Get the propagated flag.

Returns:
true if this method is propagated. Otherwise false.

Definition at line 298 of file OWBI1_CIMMethod.cpp.

References m_pdata.

CIMQualifier OWBI1::CIMMethod::getQualifier const CIMName name  )  const
 

Get the qualifier associated with a specified name.

Parameters:
name The name of the qualifier to retrieve.
Returns:
The CIMQualifier associated with the given name if found. Otherwise a NULL CIMQualifier.

Definition at line 150 of file OWBI1_CIMMethod.cpp.

References i, m_pdata, and name.

CIMQualifierArray OWBI1::CIMMethod::getQualifiers  )  const
 

Get the qualifiers for this method.

Returns:
An CIMQualifierArray that contains the qualifiers for this method.

Definition at line 144 of file OWBI1_CIMMethod.cpp.

References m_pdata.

Int32 OWBI1::CIMMethod::getReturnDataSize  )  const
 

Returns:
The size of the return data type.

Definition at line 247 of file OWBI1_CIMMethod.cpp.

References m_pdata.

CIMDataType OWBI1::CIMMethod::getReturnType  )  const
 

Returns:
The return data type for this method.

Definition at line 241 of file OWBI1_CIMMethod.cpp.

References m_pdata.

OWBI1::CIMMethod::operator safe_bool  )  const [inline]
 

Definition at line 256 of file OWBI1_CIMMethod.hpp.

References m_pdata.

bool OWBI1::CIMMethod::operator!  )  const [inline]
 

Definition at line 258 of file OWBI1_CIMMethod.hpp.

CIMMethod & OWBI1::CIMMethod::operator= const CIMMethod arg  ) 
 

Assignment operator.

Parameters:
arg The CIMMethod to assign to this object.
Returns:
A reference to this CIMMethod after the assignment has taken place.

Definition at line 123 of file OWBI1_CIMMethod.cpp.

References m_pdata.

virtual void OWBI1::CIMMethod::readObject std::istream &  istrm  )  [virtual]
 

Read this object from an input stream.

Parameters:
istrm The input stream to read this object from.

Implements OWBI1::SerializableIFC.

void OWBI1::CIMMethod::setName const CIMName name  )  [virtual]
 

Set the name of this method.

Parameters:
name The new name for this method.

Implements OWBI1::CIMElement.

Definition at line 310 of file OWBI1_CIMMethod.cpp.

References m_pdata, and name.

void OWBI1::CIMMethod::setNull  )  [virtual]
 

Set this to a null object.

All subsequent operation will fail after this method is called.

Implements OWBI1::CIMBase.

Definition at line 117 of file OWBI1_CIMMethod.cpp.

References m_pdata.

CIMMethod & OWBI1::CIMMethod::setOriginClass const CIMName originCls  ) 
 

Set thr origin class for this method.

Parameters:
originCls The name of the origin class for this method.
Returns:
a reference to *this

Definition at line 171 of file OWBI1_CIMMethod.cpp.

References m_pdata.

CIMMethod & OWBI1::CIMMethod::setOverridingMethod const CIMName omname  ) 
 

Set name of overriding method.

Parameters:
omname The name of the overriding method.
Returns:
a reference to *this

Definition at line 253 of file OWBI1_CIMMethod.cpp.

References m_pdata.

CIMMethod & OWBI1::CIMMethod::setParameters const CIMParameterArray inParms  ) 
 

Set the parameters for this method.

Parameters:
inParms An CIMParameterArray that contains the parameters for this method.
Returns:
a reference to *this

Definition at line 185 of file OWBI1_CIMMethod.cpp.

References m_pdata.

CIMMethod & OWBI1::CIMMethod::setPropagated bool  propagated = true  ) 
 

Set the propagated flag for this method.

Parameters:
propagated If true method is propagated. Otherwise false.
Returns:
a reference to *this

Definition at line 291 of file OWBI1_CIMMethod.cpp.

References m_pdata.

CIMMethod & OWBI1::CIMMethod::setQualifiers const CIMQualifierArray quals  ) 
 

Set the qualifiers for this method.

Parameters:
quals An CIMQualifierArray that contains the qualifiers for this CIMInstance.
Returns:
a reference to *this

Definition at line 137 of file OWBI1_CIMMethod.cpp.

References m_pdata.

CIMMethod & OWBI1::CIMMethod::setReturnType const CIMDataType type  ) 
 

Set the return data type for this parameter.

Parameters:
type An CIMDataType object that represents the type.
Returns:
a reference to *this

Definition at line 234 of file OWBI1_CIMMethod.cpp.

References m_pdata, and type.

String OWBI1::CIMMethod::toMOF  )  const [virtual]
 

Returns:
The MOF representation of this object as an String.

Implements OWBI1::CIMBase.

Definition at line 360 of file OWBI1_CIMMethod.cpp.

References i, and m_pdata.

String OWBI1::CIMMethod::toString  )  const [virtual]
 

Returns:
The string representation of this method as an String.

Implements OWBI1::CIMElement.

Definition at line 399 of file OWBI1_CIMMethod.cpp.

References m_pdata.

virtual void OWBI1::CIMMethod::writeObject std::ostream &  ostrm  )  const [virtual]
 

Write this object to an output stream.

Parameters:
ostrm The output stream to write this object to.

Implements OWBI1::SerializableIFC.


Friends And Related Function Documentation

OWBI1_OWBI1PROVIFC_API bool operator< const CIMMethod x,
const CIMMethod y
[friend]
 

Definition at line 406 of file OWBI1_CIMMethod.cpp.


Member Data Documentation

COWIntrusiveReference<METHData> OWBI1::CIMMethod::m_pdata [protected]
 

Definition at line 267 of file OWBI1_CIMMethod.hpp.

Referenced by addParameter(), addQualifier(), CIMMethod(), clone(), getINParameters(), getName(), getOriginClass(), getOUTParameters(), getOverridingMethod(), getParameters(), getPropagated(), getQualifier(), getQualifiers(), getReturnDataSize(), getReturnType(), operator safe_bool(), OWBI1::operator<(), operator=(), setName(), setNull(), setOriginClass(), setOverridingMethod(), setParameters(), setPropagated(), setQualifiers(), setReturnType(), toMOF(), and toString().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:18:06 2006 for openwbem by  doxygen 1.4.6