cmpi
CmpiObjectPath Class Reference

#include <cmpi/CmpiObjectPath.h>

Inheritance diagram for CmpiObjectPath:
CmpiObject

Public Member Functions

 CmpiObjectPath (const char *ns, const char *cls)
 
 CmpiObjectPath (const CmpiString &ns, const char *cls)
 
 CmpiObjectPath (CMPIObjectPath *c)
 
CMPIObjectPathgetEnc () const
 
CmpiBoolean classPathIsA (const char *className) const
 
CmpiString getHostname () const
 
void setHostname (const char *hn)
 
void setHostname (CmpiString hn)
 
CmpiString getNameSpace () const
 
void setNameSpace (const char *ns)
 
void setNameSpace (CmpiString ns)
 
CmpiString getClassName () const
 
void setClassName (const char *hn)
 
void setClassName (CmpiString hn)
 
unsigned int getKeyCount () const
 
CmpiData getKey (const char *name) const
 
CmpiData getKey (const int index, CmpiString *name=NULL) const
 
void setKey (const char *name, const CmpiData data)
 
- Public Member Functions inherited from CmpiObject
CmpiBoolean isNull () const
 
CmpiString toString ()
 
CmpiBoolean isA (const char *typeName) const
 

Private Member Functions

void * makeObjectPath (CMPIBroker *mb, const char *ns, const char *cls)
 
void * makeObjectPath (CMPIBroker *mb, const CmpiString &ns, const char *cls)
 
CmpiBoolean doClassPathIsA (CMPIBroker *mb, const char *className) const
 

Friends

class CmpiBroker
 
class CmpiResult
 
class CmpiInstance
 
class CmpiInstanceMI
 
class CmpiMethodMI
 
class CmpiAssociationMI
 
class CmpiPropertyMI
 
class CmpiIndicationMI
 
class CmpiData
 

Additional Inherited Members

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

Detailed Description

The ObjectPath class represents the value of a Instance reference. It constains the namespace, classname and key properties. ObjectPath can also be used to represent a class reference. In that case key properties will be ignored.

Constructor & Destructor Documentation

◆ CmpiObjectPath() [1/3]

CmpiObjectPath::CmpiObjectPath ( const char * ns,
const char * cls )

Constructor - Creates an ObjectPath object with the classname from the input parameter.

Parameters
nsdefining namespace or NULL
clsdefining classname or NULL
Returns
The new ObjectPath object

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

◆ CmpiObjectPath() [2/3]

CmpiObjectPath::CmpiObjectPath ( const CmpiString & ns,
const char * cls )

◆ CmpiObjectPath() [3/3]

CmpiObjectPath::CmpiObjectPath ( CMPIObjectPath * c)

Constructor used by MIDrivers to encapsulate CMPIObjectPathes.

References CmpiObject::CmpiObject().

Member Function Documentation

◆ classPathIsA()

CmpiBoolean CmpiObjectPath::classPathIsA ( const char * className) const

classPathIsA - Tests whether this CIM ObjectPath is a reference to a CIM class is of type <className>.

Parameters
classNameCIM classname to be tested for.
Returns
True or False

References CmpiBoolean, doClassPathIsA(), and CmpiProviderBase::getBroker().

Referenced by CmpiData.

◆ doClassPathIsA()

CmpiBoolean CmpiObjectPath::doClassPathIsA ( CMPIBroker * mb,
const char * className ) const
private

◆ getClassName()

CmpiString CmpiObjectPath::getClassName ( ) const

getClassName - returns the classname component of the ObjectPath

Returns
CmpiString containing the namespace.

References CMPI_RC_OK, _CMPIObjectPath::ft, _CMPIObjectPathFT::getClassName, getEnc(), and _CMPIStatus::rc.

Referenced by CmpiData.

◆ getEnc()

◆ getHostname()

CmpiString CmpiObjectPath::getHostname ( ) const

getHostname - returns the hostname component of the ObjectPath

Returns
CmpiString containing the hostname.

References CMPI_RC_OK, _CMPIObjectPath::ft, getEnc(), _CMPIObjectPathFT::getHostname, and _CMPIStatus::rc.

Referenced by CmpiData.

◆ getKey() [1/2]

CmpiData CmpiObjectPath::getKey ( const char * name) const

getKey - Gets the CmpiData object representing the value associated with the key

Parameters
namekey name.
Returns
CmpiData value object associated with the key.

References CmpiData::_data, CMPI_RC_OK, CmpiData, _CMPIObjectPath::ft, getEnc(), _CMPIObjectPathFT::getKey, and _CMPIStatus::rc.

Referenced by CmpiData.

◆ getKey() [2/2]

CmpiData CmpiObjectPath::getKey ( const int index,
CmpiString * name = NULL ) const

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

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

References CmpiData::_data, CMPI_RC_OK, CmpiData, _CMPIObjectPath::ft, getEnc(), _CMPIObjectPathFT::getKeyAt, and _CMPIStatus::rc.

◆ getKeyCount()

unsigned int CmpiObjectPath::getKeyCount ( ) const

getKeyCount - Gets the number of key properties defined for this ObjectPath.

Returns
Number of key properties of this ObjectPath.

References CMPI_RC_OK, _CMPIObjectPath::ft, getEnc(), _CMPIObjectPathFT::getKeyCount, and _CMPIStatus::rc.

Referenced by CmpiData.

◆ getNameSpace()

CmpiString CmpiObjectPath::getNameSpace ( ) const

getNameSpace - returns the namespace component of the ObjectPath

Returns
CmpiString containing the namespace.

References CMPI_RC_OK, _CMPIObjectPath::ft, getEnc(), _CMPIObjectPathFT::getNameSpace, and _CMPIStatus::rc.

Referenced by CmpiData.

◆ makeObjectPath() [1/2]

void * CmpiObjectPath::makeObjectPath ( CMPIBroker * mb,
const char * ns,
const char * cls )
private

Constructor - Should not be called

References CMPI_RC_OK, _CMPIBroker::eft, _CMPIBrokerEncFT::newObjectPath, and _CMPIStatus::rc.

Referenced by CmpiData, CmpiObjectPath(), and CmpiObjectPath().

◆ makeObjectPath() [2/2]

void * CmpiObjectPath::makeObjectPath ( CMPIBroker * mb,
const CmpiString & ns,
const char * cls )
private

◆ setClassName() [1/2]

void CmpiObjectPath::setClassName ( CmpiString hn)

◆ setClassName() [2/2]

void CmpiObjectPath::setClassName ( const char * hn)

setClassName - Sets the classname component.

Parameters
hnrepresenting the hostname.

References CMPI_RC_OK, _CMPIObjectPath::ft, getEnc(), _CMPIStatus::rc, and _CMPIObjectPathFT::setClassName.

Referenced by CmpiData, and setClassName().

◆ setHostname() [1/2]

void CmpiObjectPath::setHostname ( CmpiString hn)

◆ setHostname() [2/2]

void CmpiObjectPath::setHostname ( const char * hn)

setHostname - Sets the hostname component.

Parameters
hnrepresenting the hostname.

References CMPI_RC_OK, _CMPIObjectPath::ft, getEnc(), _CMPIStatus::rc, and _CMPIObjectPathFT::setHostname.

Referenced by CmpiData, and setHostname().

◆ setKey()

void CmpiObjectPath::setKey ( const char * name,
const CmpiData data )

setKey - adds/replaces a key value defined by the input parameter to the ObjectPath

Parameters
namekey name.
dataType and Value to be added.

References CmpiData::_data, _CMPIObjectPathFT::addKey, _CMPIValue::chars, CMPI_chars, CMPI_RC_OK, CmpiData, _CMPIObjectPath::ft, getEnc(), _CMPIStatus::rc, _CMPIData::type, and _CMPIData::value.

Referenced by CmpiData.

◆ setNameSpace() [1/2]

void CmpiObjectPath::setNameSpace ( CmpiString ns)

◆ setNameSpace() [2/2]

void CmpiObjectPath::setNameSpace ( const char * ns)

setNameSpace - Sets the namespace component.

Parameters
nsrepresenting the namespace.

References CMPI_RC_OK, _CMPIObjectPath::ft, getEnc(), _CMPIStatus::rc, and _CMPIObjectPathFT::setNameSpace.

Referenced by CmpiData, and setNameSpace().

Friends And Related Symbol Documentation

◆ CmpiAssociationMI

friend class CmpiAssociationMI
friend

References CmpiAssociationMI.

Referenced by CmpiAssociationMI.

◆ CmpiBroker

friend class CmpiBroker
friend

References CmpiBroker.

Referenced by CmpiBroker.

◆ CmpiData

◆ CmpiIndicationMI

friend class CmpiIndicationMI
friend

References CmpiIndicationMI.

Referenced by CmpiIndicationMI.

◆ CmpiInstance

friend class CmpiInstance
friend

References CmpiInstance.

Referenced by CmpiInstance.

◆ CmpiInstanceMI

friend class CmpiInstanceMI
friend

References CmpiInstanceMI.

Referenced by CmpiInstanceMI.

◆ CmpiMethodMI

friend class CmpiMethodMI
friend

References CmpiMethodMI.

Referenced by CmpiMethodMI.

◆ CmpiPropertyMI

friend class CmpiPropertyMI
friend

References CmpiPropertyMI.

Referenced by CmpiPropertyMI.

◆ CmpiResult

friend class CmpiResult
friend

References CmpiResult.

Referenced by CmpiResult.


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