CmpiObject.h

Go to the documentation of this file.
00001 
00002 /*
00003  *
00004  * CmpiObject.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 bas class for all Cmpi classes
00019  *
00020  */
00021 
00022 #ifndef _CmpiObject_h_
00023 #define _CmpiObject_h_
00024 #include "OW_config.h"
00025 
00026 #include "cmpidt.h"
00027 #include "cmpift.h"
00028 
00029 #ifndef CmpiBoolean
00030 #define CmpiBoolean CMPIBoolean
00031 #define CmpiRc      CMPIrc
00032 #endif
00033 
00034 #include "CmpiString.h"
00035 #include "CmpiProviderBase.h"
00036 
00037 class CmpiBroker;
00038 
00042 class CmpiObject {
00043    friend class CmpiBroker;
00044    friend class CmpiObjectPath;
00045    friend class CmpiInstance;
00046   protected:
00049     void *enc;
00052    CmpiObject() {}
00055    inline CmpiObject(const void* enc)
00056       { this->enc=(void*)enc; }
00057    CmpiString doToString(CMPIBroker *mb);
00058    CmpiBoolean doIsA(CMPIBroker *mb, const char *typeName);
00059   private:
00060   public:
00063    inline CmpiBoolean isNull() const
00064       { return (enc==NULL); }
00067    inline CmpiString toString() {
00068       return doToString(CmpiProviderBase::getBroker());
00069    }
00072    inline CmpiBoolean isA(const char *typeName) {
00073       return doIsA(CmpiProviderBase::getBroker(),typeName);
00074    }
00075 };
00076 
00077 #endif
00078 

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