OW_NAMESPACE::CIMMethod Class Reference

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

#include <OW_CIMMethod.hpp>

Inheritance diagram for OW_NAMESPACE::CIMMethod:

Inheritance graph
[legend]
Collaboration diagram for OW_NAMESPACE::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.
String 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.
String 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 String 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

OW_COMMON_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 OW_CIMMethod.hpp.


Member Typedef Documentation

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

Definition at line 255 of file OW_CIMMethod.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::CIMMethod::CIMMethod  ) 
 

Create a new CIMMethod object.

Definition at line 83 of file OW_CIMMethod.cpp.

Referenced by clone().

OW_NAMESPACE::CIMMethod::CIMMethod CIMNULL_t   )  [explicit]
 

Create a NULL CIMMethod object.

Definition at line 88 of file OW_CIMMethod.cpp.

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

Create an CIMMethod with a name.

Parameters:
name The name of this CIMMethod.

Definition at line 99 of file OW_CIMMethod.cpp.

References m_pdata, and name.

OW_NAMESPACE::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 93 of file OW_CIMMethod.cpp.

References m_pdata.

OW_NAMESPACE::CIMMethod::CIMMethod const CIMMethod arg  ) 
 

Copy constructor.

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

Definition at line 105 of file OW_CIMMethod.cpp.

OW_NAMESPACE::CIMMethod::~CIMMethod  ) 
 

Destroy this CIMMethod object.

Definition at line 110 of file OW_CIMMethod.cpp.


Member Function Documentation

CIMMethod & OW_NAMESPACE::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 176 of file OW_CIMMethod.cpp.

References m_pdata.

CIMMethod & OW_NAMESPACE::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 128 of file OW_CIMMethod.cpp.

References m_pdata.

Referenced by OW_NAMESPACE::MOF::CIMOMVisitor::VisitMethodDeclaration().

CIMMethod OW_NAMESPACE::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 264 of file OW_CIMMethod.cpp.

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

CIMParameterArray OW_NAMESPACE::CIMMethod::getINParameters  )  const
 

Get the IN parameters for this method.

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

Definition at line 196 of file OW_CIMMethod.cpp.

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

String OW_NAMESPACE::CIMMethod::getName  )  const [virtual]
 

Returns:
The name of this method as an String.

Implements OW_NAMESPACE::CIMElement.

Definition at line 302 of file OW_CIMMethod.cpp.

References m_pdata.

Referenced by OW_NAMESPACE::CIMtoXML(), OW_NAMESPACE::ProviderManager::getMethodProvider(), and OW_NAMESPACE::CIMClass::setMethod().

String OW_NAMESPACE::CIMMethod::getOriginClass  )  const
 

Get the origin class for this method.

Returns:
The name of the origin class.

Definition at line 163 of file OW_CIMMethod.cpp.

References m_pdata.

CIMParameterArray OW_NAMESPACE::CIMMethod::getOUTParameters  )  const
 

Get the OUT parameters for this method.

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

Definition at line 217 of file OW_CIMMethod.cpp.

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

String OW_NAMESPACE::CIMMethod::getOverridingMethod  )  const
 

Returns:
The name of the overriding method.

Definition at line 258 of file OW_CIMMethod.cpp.

References m_pdata.

CIMParameterArray OW_NAMESPACE::CIMMethod::getParameters  )  const
 

Get the parameters for this method.

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

Definition at line 190 of file OW_CIMMethod.cpp.

References m_pdata.

bool OW_NAMESPACE::CIMMethod::getPropagated  )  const
 

Get the propagated flag.

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

Definition at line 296 of file OW_CIMMethod.cpp.

References m_pdata.

CIMQualifier OW_NAMESPACE::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 148 of file OW_CIMMethod.cpp.

References i, m_pdata, and name.

CIMQualifierArray OW_NAMESPACE::CIMMethod::getQualifiers  )  const
 

Get the qualifiers for this method.

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

Definition at line 142 of file OW_CIMMethod.cpp.

References m_pdata.

Int32 OW_NAMESPACE::CIMMethod::getReturnDataSize  )  const
 

Returns:
The size of the return data type.

Definition at line 245 of file OW_CIMMethod.cpp.

References m_pdata.

CIMDataType OW_NAMESPACE::CIMMethod::getReturnType  )  const
 

Returns:
The return data type for this method.

Definition at line 239 of file OW_CIMMethod.cpp.

References m_pdata.

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

Definition at line 256 of file OW_CIMMethod.hpp.

References m_pdata.

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

Definition at line 258 of file OW_CIMMethod.hpp.

CIMMethod & OW_NAMESPACE::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 121 of file OW_CIMMethod.cpp.

References m_pdata.

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

Read this object from an input stream.

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

Implements OW_NAMESPACE::SerializableIFC.

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

Set the name of this method.

Parameters:
name The new name for this method.

Implements OW_NAMESPACE::CIMElement.

Definition at line 308 of file OW_CIMMethod.cpp.

References m_pdata, and name.

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

Set this to a null object.

All subsequent operation will fail after this method is called.

Implements OW_NAMESPACE::CIMBase.

Definition at line 115 of file OW_CIMMethod.cpp.

References m_pdata.

CIMMethod & OW_NAMESPACE::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 169 of file OW_CIMMethod.cpp.

References m_pdata.

CIMMethod & OW_NAMESPACE::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 251 of file OW_CIMMethod.cpp.

References m_pdata.

CIMMethod & OW_NAMESPACE::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 183 of file OW_CIMMethod.cpp.

References m_pdata.

CIMMethod & OW_NAMESPACE::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 289 of file OW_CIMMethod.cpp.

References m_pdata.

CIMMethod & OW_NAMESPACE::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 135 of file OW_CIMMethod.cpp.

References m_pdata.

CIMMethod & OW_NAMESPACE::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 232 of file OW_CIMMethod.cpp.

References m_pdata, and type.

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

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

Implements OW_NAMESPACE::CIMBase.

Definition at line 358 of file OW_CIMMethod.cpp.

References i, and m_pdata.

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

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

Reimplemented from OW_NAMESPACE::CIMElement.

Definition at line 397 of file OW_CIMMethod.cpp.

References m_pdata.

virtual void OW_NAMESPACE::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 OW_NAMESPACE::SerializableIFC.


Friends And Related Function Documentation

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

Definition at line 404 of file OW_CIMMethod.cpp.


Member Data Documentation

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

Definition at line 267 of file OW_CIMMethod.hpp.

Referenced by addParameter(), addQualifier(), CIMMethod(), clone(), getINParameters(), getName(), getOriginClass(), getOUTParameters(), getOverridingMethod(), getParameters(), getPropagated(), getQualifier(), getQualifiers(), getReturnDataSize(), getReturnType(), operator safe_bool(), OW_NAMESPACE::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:12:29 2006 for openwbem by  doxygen 1.4.6