cmpi

cmpi/CmpiInstance.h

Go to the documentation of this file.
00001 /*
00002  *
00003  * $Id: CmpiInstance.h,v 1.3 2008/07/09 19:36:59 tyreld Exp $
00004  *
00005  * (C) Copyright IBM Corp. 2003, 2005, 2008
00006  *
00007  * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
00008  * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
00009  * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
00010  *
00011  * You can obtain a current copy of the Eclipse Public License from
00012  * http://www.opensource.org/licenses/eclipse-1.0.txt
00013  *
00014  * Author:        Adrian Schuur <schuur@de.ibm.com>
00015  * Contributors:  Heidi Neumann, heidineu@de.ibm.com
00016  *                Angel Nunez Mencias, anunez@de.ibm.com
00017  *                Viktor Mihajlovski, mihajlov@de.ibm.com
00018  * Description: CMPI Instance Definitions
00019  *
00020  */
00021 
00022 #ifndef _CmpiInstance_h_
00023 #define _CmpiInstance_h_
00024 
00025 #include "cmpidt.h"
00026 #include "cmpift.h"
00027 
00028 #include "Linkage.h"
00029 #include "CmpiObject.h"
00030 #include "CmpiStatus.h"
00031 #include "CmpiObjectPath.h"
00032 #include "CmpiBroker.h"
00033 #include "CmpiData.h"
00034 
00035 class CmpiObjectPath;
00036 class CmpiData;
00037 
00042 class CMPI_PROVIDER_LINKAGE CmpiInstance : public CmpiObject {
00043    friend class CmpiBroker;
00044    friend class CmpiResult;
00045    friend class CmpiInstanceMI;
00046    friend class CmpiMethodMI;
00047    friend class CmpiData;
00048 protected:
00049 
00052    CmpiInstance(const CMPIInstance* enc);
00053 
00056    CMPIInstance *getEnc() const;
00057 
00058 private:
00059 
00062    CmpiInstance();
00063 
00066    void *makeInstance(CMPIBroker *mb, const CmpiObjectPath& cop);
00067 
00068    CmpiBoolean doInstanceIsA(CMPIBroker *mb, const char *className);
00069 
00070 public:
00076    CmpiInstance(const CmpiObjectPath& op);
00077 
00082    CmpiBoolean instanceIsA(const char *className);
00083 
00088    unsigned int getPropertyCount();
00089 
00095    CmpiData getProperty(const char* name) const;
00096 
00103    CmpiData getProperty(const int index, CmpiString *name=NULL);
00104 
00110    void setProperty(const char* name, const CmpiData data);
00111 
00118    void setPropertyFilter(const char** properties, const char** keys);
00119 
00124    CmpiObjectPath getObjectPath() const;
00125 };
00126 
00127 #endif