CmpiObjectPath Class Reference

#include <cmpi/CmpiObjectPath.h>

Inheritance diagram for CmpiObjectPath:
CmpiObject

List of all members.

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)

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

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::CmpiObjectPath ( const char *  ns,
const char *  cls 
)

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

Parameters:
ns defining namespace or NULL
cls defining classname or NULL
Returns:
The new ObjectPath object

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

CmpiObjectPath::CmpiObjectPath ( const CmpiString ns,
const char *  cls 
)
CmpiObjectPath::CmpiObjectPath ( CMPIObjectPath c  ) 

Constructor used by MIDrivers to encapsulate CMPIObjectPathes.


Member Function Documentation

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:
className CIM classname to be tested for.
Returns:
True or False

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

CmpiBoolean CmpiObjectPath::doClassPathIsA ( CMPIBroker mb,
const char *  className 
) const [private]
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.

CMPIObjectPath * CmpiObjectPath::getEnc (  )  const
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.

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

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

Parameters:
index Index into the key property array.
name Optional output parameter returning the key name.
Returns:
CmpiData value object corresponding to the index.

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

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

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

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

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

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.

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.

void * CmpiObjectPath::makeObjectPath ( CMPIBroker mb,
const CmpiString ns,
const char *  cls 
) [private]
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 CmpiObjectPath().

void CmpiObjectPath::setClassName ( CmpiString  hn  ) 
void CmpiObjectPath::setClassName ( const char *  hn  ) 

setClassName - Sets the classname component.

Parameters:
hn representing the hostname.

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

Referenced by setClassName().

void CmpiObjectPath::setHostname ( CmpiString  hn  ) 
void CmpiObjectPath::setHostname ( const char *  hn  ) 

setHostname - Sets the hostname component.

Parameters:
hn representing the hostname.

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

Referenced by setHostname().

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

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

Parameters:
name key name.
data Type 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.

void CmpiObjectPath::setNameSpace ( CmpiString  ns  ) 
void CmpiObjectPath::setNameSpace ( const char *  ns  ) 

setNameSpace - Sets the namespace component.

Parameters:
ns representing the namespace.

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

Referenced by setNameSpace().


Friends And Related Function Documentation

friend class CmpiAssociationMI [friend]
friend class CmpiBroker [friend]

Reimplemented from CmpiObject.

friend class CmpiData [friend]

Referenced by setKey().

friend class CmpiIndicationMI [friend]
friend class CmpiInstance [friend]

Reimplemented from CmpiObject.

friend class CmpiInstanceMI [friend]
friend class CmpiMethodMI [friend]
friend class CmpiPropertyMI [friend]
friend class CmpiResult [friend]

The documentation for this class was generated from the following files:
Generated on Mon Jul 5 13:09:52 2010 for cmpi by  doxygen 1.6.3