cmpi
Public Member Functions | Protected Member Functions | Friends | List of all members
CmpiArgs Class Reference

#include <cmpi/CmpiArgs.h>

Inheritance diagram for CmpiArgs:
CmpiObject

Public Member Functions

 CmpiArgs ()
 
unsigned int getArgCount () const
 
CmpiData getArg (const char *name) const
 
CmpiData getArg (const int index, CmpiString *name=NULL) const
 
void setArg (const char *name, const CmpiData &data)
 
- Public Member Functions inherited from CmpiObject
CmpiBoolean isNull () const
 
CmpiString toString ()
 
CmpiBoolean isA (const char *typeName) const
 

Protected Member Functions

 CmpiArgs (CMPIArgs *enc)
 
CMPIArgsgetEnc () const
 
void * makeArgs (CMPIBroker *mb)
 
- Protected Member Functions inherited from CmpiObject
 CmpiObject ()
 
 CmpiObject (const void *enc)
 
CmpiString doToString (CMPIBroker *mb)
 
CmpiBoolean doIsA (CMPIBroker *mb, const char *typeName) const
 

Friends

class CmpiBroker
 
class CmpiMethodMI
 

Additional Inherited Members

- Protected Attributes inherited from CmpiObject
void * enc
 

Detailed Description

This class wraps a CIMOM specific input and output arguments passed to methodInvocation functions.

Constructor & Destructor Documentation

◆ CmpiArgs() [1/2]

CmpiArgs::CmpiArgs ( CMPIArgs enc)
protected

Protected constructor used by MIDrivers to encapsulate CMPIArgs.

References CmpiObject::enc.

◆ CmpiArgs() [2/2]

CmpiArgs::CmpiArgs ( )

Constructor - Empty argument container.

References CmpiObject::enc, CmpiProviderBase::getBroker(), and makeArgs().

Member Function Documentation

◆ getArg() [1/2]

CmpiData CmpiArgs::getArg ( const char *  name) const

getArg - Gets the CmpiData object representing the value associated with the argument name

Parameters
nameargument name.
Returns
CmpiData value object associated with the argument.

References CmpiData::_data, CMPI_RC_ERR_NOT_FOUND, CMPI_RC_OK, _CMPIArgs::ft, _CMPIArgsFT::getArg, getEnc(), _CMPIStatus::msg, and _CMPIStatus::rc.

◆ getArg() [2/2]

CmpiData CmpiArgs::getArg ( const int  index,
CmpiString name = NULL 
) const

getArgument - Gets the CmpiData object defined by the input index parameter.

Parameters
indexIndex into the argument array.
nameOptional output parameter returning the argument name.
Returns
CmpiData value object corresponding to the index.

References CmpiData::_data, CmpiString::charPtr(), CMPI_RC_ERR_NOT_FOUND, CMPI_RC_OK, _CMPIArgs::ft, _CMPIArgsFT::getArgAt, getEnc(), _CMPIStatus::msg, and _CMPIStatus::rc.

◆ getArgCount()

unsigned int CmpiArgs::getArgCount ( ) const

getArgCount - Gets the number of arguments defined for this argument container.

Returns
Number of arguments in this container.

References CMPI_RC_OK, _CMPIArgs::ft, _CMPIArgsFT::getArgCount, getEnc(), and _CMPIStatus::rc.

◆ getEnc()

CMPIArgs * CmpiArgs::getEnc ( ) const
protected

Gets the encapsulated CMPIArgs.

References CmpiObject::enc.

Referenced by getArg(), getArgCount(), and setArg().

◆ makeArgs()

void * CmpiArgs::makeArgs ( CMPIBroker mb)
protected

◆ setArg()

void CmpiArgs::setArg ( const char *  name,
const CmpiData data 
)

setArg - adds/replaces an argument value defined by the input parameter to the container.

Parameters
nameProperty name.
dataType and Value to be added.

References CmpiData::_data, _CMPIArgsFT::addArg, _CMPIValue::chars, CMPI_chars, CMPI_RC_OK, _CMPIArgs::ft, getEnc(), _CMPIStatus::rc, _CMPIData::type, and _CMPIData::value.

Friends And Related Function Documentation

◆ CmpiBroker

friend class CmpiBroker
friend

◆ CmpiMethodMI

friend class CmpiMethodMI
friend

The documentation for this class was generated from the following files: