00001 /* 00002 * 00003 * $Id: CmpiString.h,v 1.4 2012/06/03 04:51:10 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 * 00019 * Description: CMPI String Definitions 00020 * 00021 */ 00022 00023 #ifndef _CmpiString_h_ 00024 #define _CmpiString_h_ 00025 00026 #include "cmpidt.h" 00027 #include "cmpift.h" 00028 #include <string.h> 00029 00030 #ifndef CMPI_PLATFORM_WIN32_IX86_MSVC 00031 #include <strings.h> 00032 #endif 00033 00034 #ifndef CmpiBoolean 00035 #define CmpiBoolean CMPIBoolean 00036 #define CmpiRc CMPIrc 00037 #endif 00038 00039 #include "Linkage.h" 00040 #include "CmpiStatus.h" 00041 00042 #ifdef CMPI_PLATFORM_WIN32_IX86_MSVC 00043 #define strcasecmp _stricmp 00044 #endif 00045 00049 class CMPI_PROVIDER_LINKAGE CmpiString { //: public CmpiObject { 00050 friend class CmpiBroker; 00051 friend class CmpiData; 00052 friend class CmpiObjectPath; 00053 friend class CmpiInstance; 00054 friend class CmpiObject; 00055 friend class CmpiArgs; 00056 friend class CmpiArrayIdx; 00057 private: 00058 protected: 00059 void *enc; 00062 CmpiString(CMPIString* c); 00063 00066 CMPIString *getEnc() const; 00067 00068 public: 00069 00072 CmpiString(); 00073 00076 CmpiString(const char * s); 00077 00080 CmpiString(const CmpiString& s); 00081 00084 const char* charPtr() const; 00085 00088 CmpiBoolean equals(const char *str) const; 00089 CmpiBoolean equals(const CmpiString& str) const; 00090 00093 CmpiBoolean equalsIgnoreCase(const char *str) const; 00094 CmpiBoolean equalsIgnoreCase(const CmpiString& str) const; 00095 }; 00096 00097 #endif 00098 00099