cmpi
|
00001 /* 00002 * 00003 * $Id: CmpiArray.h,v 1.4 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 * 00018 * Description: CMPI Array Definitions 00019 * 00020 */ 00021 00022 #ifndef _CmpiArray_h_ 00023 #define _CmpiArray_h_ 00024 00025 #include "cmpidt.h" 00026 #include "CmpiString.h" 00027 00028 #include "Linkage.h" 00029 #include "CmpiObjectPath.h" 00030 #include "CmpiInstance.h" 00031 #include "CmpiBaseMI.h" 00032 #include "CmpiData.h" 00033 00034 class CmpiArray; 00035 class CmpiInstance; 00036 class CmpiData; 00037 00038 class CMPI_PROVIDER_LINKAGE CmpiArrayIdx { 00039 friend class CmpiArray; 00040 const CmpiArray &ar; 00041 CMPICount idx; 00042 CmpiArrayIdx(const CmpiArray &a, CMPICount i); 00043 public: 00044 CmpiArrayIdx& operator=(const CmpiData&); 00045 CmpiData getData() const; 00046 00049 operator CmpiString() const; 00052 operator const char* () const; 00055 operator CmpiDateTime() const; 00058 operator CmpiInstance() const; 00061 operator CmpiObjectPath() const; 00064 operator CMPISint8() const; 00067 operator CMPISint16() const; 00070 operator CMPISint32() const; 00073 operator CMPISint64() const; 00074 00077 operator unsigned char() const; 00080 operator unsigned short() const; 00083 operator CMPIUint32() const; 00086 operator CMPIUint64() const; 00089 operator CMPIReal32() const; 00092 operator CMPIReal64() const; 00093 00094 }; 00095 00096 00118 class CmpiArray : public CmpiObject { 00119 friend class CmpiArrayIdx; 00120 friend class CmpiData; 00121 friend class CmpiEnumeration; 00122 void operator=(int x); 00123 00126 CMPIArray *getEnc() const; 00127 void *makeArray(CMPIBroker *mb,CMPICount max, CMPIType type); 00128 CmpiArray(CMPIArray *arr); 00129 public: 00130 CmpiArray(CMPICount max, CMPIType type); 00131 CmpiArray(); 00132 CMPICount size() const; 00133 CmpiArrayIdx operator[](int idx) const; 00134 }; 00135 00136 #endif 00137 00138 00139