CmpiInstance.h

Go to the documentation of this file.
00001 
00002 /*
00003  *
00004  * CmpiInstance.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++ Instance wrapper
00019  *
00020  */
00021 
00022 #ifndef _CmpiInstance_h_
00023 #define _CmpiInstance_h_
00024 #include "OW_config.h"
00025 
00026 #include "cmpidt.h"
00027 #include "cmpift.h"
00028 
00029 /*#include "CmpiImpl.h" */
00030 
00031 #include "CmpiObject.h"
00032 #include "CmpiObjectPath.h"
00033 #include "CmpiData.h"
00034 #include "CmpiProviderBase.h"
00035 
00036 class CmpiObjectPath;
00037 
00042 class CmpiInstance : public CmpiObject {
00043    friend class CmpiBroker;
00044    friend class CmpiResult;
00045    friend class CmpiInstanceMI;
00046    friend class CmpiMethodMI;
00047    friend class CmpiData;
00048 
00049   public:
00050 
00053    inline CmpiInstance(const CMPIInstance* enc)
00054       { this->enc=(void*)enc; }
00055 
00058    inline CMPIInstance *getEnc() const
00059       { return (CMPIInstance*)enc; }
00060 //   private:
00061 
00064    CmpiInstance() {}
00065 
00068    void *makeInstance(CMPIBroker *mb, const CmpiObjectPath& cop);
00069    CmpiBoolean doInstanceIsA(CMPIBroker *mb, const char *className);
00070 
00071 //  public:
00077    inline CmpiInstance(const CmpiObjectPath& op) {
00078       enc=makeInstance(CmpiProviderBase::getBroker(),op);
00079    }
00080 
00085    inline CmpiBoolean instanceIsA(const char *className) {
00086       return doInstanceIsA(CmpiProviderBase::getBroker(),className);
00087    }
00088 
00093    unsigned int getPropertyCount();
00094 
00100    CmpiData getProperty(const char* name);
00101 
00108    CmpiData getProperty(const int index, CmpiString *name=NULL);
00109 
00115    void setProperty(const char* name, const CmpiData data);
00116 
00121    CmpiObjectPath getObjectPath();
00122 };
00123 
00124 #endif

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