CmpiObjectPath.h

Go to the documentation of this file.
00001 
00002 /*
00003  *
00004  * CmpiObjectPath.h
00005  *
00006  * (C) Copyright IBM Corp. 2003
00007  *
00008  * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE
00009  * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
00010  * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
00011  *
00012  * You can obtain a current copy of the Common Public License from
00013  * http://oss.software.ibm.com/developerworks/opensource/license-cpl.html
00014  *
00015  * Author:        Adrian Schuur <schuur@de.ibm.com>
00016  * Contributors:
00017  *
00018  * Description: CMPI C++ ObjectPath wrapper
00019  *
00020  */
00021 
00022 #ifndef _CmpiObjectPath_h_
00023 #define _CmpiObjectPath_h_
00024 #include "OW_config.h"
00025 
00026 #include "cmpidt.h"
00027 #include "cmpift.h"
00028 
00029 #include "CmpiObject.h"
00030 #include "CmpiData.h"
00031 #include "CmpiProviderBase.h"
00032 
00033 
00039 class CmpiObjectPath : public CmpiObject {
00040    friend class CmpiBroker;
00041    friend class CmpiResult;
00042    friend class CmpiInstance;
00043    friend class CmpiInstanceMI;
00044    friend class CmpiMethodMI;
00045    friend class CmpiAssociationMI;
00046    friend class CmpiPropertyMI;
00047    friend class CmpiIndicationMI;
00048    friend class CmpiData;
00049 //  protected:
00050   public:
00053    inline CmpiObjectPath(CMPIObjectPath* c)
00054       : CmpiObject((void*)c) {}
00055 
00058    inline CMPIObjectPath *getEnc() const
00059       { return (CMPIObjectPath*)enc; }
00060 //  private:
00061 
00064    CmpiObjectPath() {}
00065    void *makeObjectPath(CMPIBroker *mb, const char *ns, const char *cls);
00066    void *makeObjectPath(CMPIBroker *mb, const CmpiString& ns, const char *cls);
00067    CmpiBoolean doClassPathIsA(CMPIBroker *mb, const char *className);
00068 //  public:
00069 
00076    inline CmpiObjectPath(const char *ns, const char *cls) {
00077       enc=makeObjectPath(CmpiProviderBase::getBroker(),ns,cls);
00078    }
00079    CmpiObjectPath(const CmpiString &ns, const char *cls) {
00080       enc=makeObjectPath(CmpiProviderBase::getBroker(),ns,cls);
00081    }
00082 
00088    inline CmpiBoolean classPathIsA(const char *className) {
00089       return doClassPathIsA(CmpiProviderBase::getBroker(),className);
00090    }
00091 
00096    CmpiString getHostname() const;
00097 
00101    void setHostname(const char* hn);
00102    inline void setHostname(CmpiString hn)
00103       { setHostname(hn.charPtr()); }
00104 
00109    CmpiString getNameSpace() const;
00110 
00114    void setNameSpace(const char* ns);
00115    inline void setNameSpace(CmpiString ns)
00116       { setNameSpace(ns.charPtr()); }
00117 
00122    CmpiString getClassName() const;
00123 
00127    void setClassName(const char* hn);
00128    inline void setClassName(CmpiString hn)
00129       { setClassName(hn.charPtr()); }
00130 
00135    unsigned int getKeyCount() const;
00136 
00142    CmpiData getKey(const char* name) const;
00143 
00150    CmpiData getKey(const int index, CmpiString *name=NULL) const;
00151 
00157    void setKey(const char* name, CmpiData data);
00158 };
00159 
00160 #endif
00161 
00162 

Generated on Thu Feb 9 08:47:49 2006 for openwbem by  doxygen 1.4.6