00001 // $Id: SLString.hpp,v 1.9 2004/04/14 11:58:14 mr_lex Exp $ 00002 #ifndef SL_STRING_HPP 00003 #define SL_STRING_HPP 00004 00005 #include <boost/shared_ptr.hpp> 00006 00007 #include "segusoland.hpp" 00008 #include "SLHashTable.hpp" 00009 00010 SL_NAMESPACE_BEGIN 00011 00051 class SLString 00052 : 00053 public SLHashTable::Element 00054 { 00055 public: 00056 00071 SLString(const char * str, 00072 const char * locale = SL_LOCALE_DEFAULT, 00073 const char * encoding = SL_ENCODING_DEFAULT); 00074 00082 int cmp(const SLString &other) const; 00083 00088 bool operator==(const SLString &other) const; 00089 00093 bool operator<(const SLString &other) const; 00094 00101 SLString operator+(const SLString &) const; 00102 00106 unsigned long getByteSize() const; 00107 00114 const char * to_utf8() const; 00115 00122 const char * get_locale() const; 00123 00124 00125 00129 SLHashTable::HashCode getHashCode() const; 00130 00134 SLString *clone() const; 00135 00139 bool operator==(const SLHashTable::Element &other) const; 00140 00141 00142 protected: 00146 class Data; 00147 00152 boost::shared_ptr<Data> _shared_ptr; 00153 00167 static const char * emptyCString; 00168 }; // class SLString 00169 00170 SL_NAMESPACE_END 00171 #endif // #ifndef SL_STRING_HPP 00172 00173 // $Log: SLString.hpp,v $ 00174 // Revision 1.9 2004/04/14 11:58:14 mr_lex 00175 // NEW: added operator + for concatenation 00176 // 00177 // Revision 1.8 2004/04/05 18:11:54 mr_lex 00178 // NEW: 1st working version of plugins 00179 // 00180 // Revision 1.7 2004/04/01 11:12:29 mr_lex 00181 // NEW: operator== 00182 // 00183 // Revision 1.6 2004/03/30 18:53:31 mr_lex 00184 // FIX: changed SL_DEBUG to SL_DEBUG2 to have two levels of verbosity 00185 // 00186 // Revision 1.5 2004/03/30 00:54:00 mr_lex 00187 // NEW: list sorting + fixed some issues with const types 00188 // 00189 // Revision 1.4 2004/03/29 13:01:33 mr_lex 00190 // FIX: finished converting to shared_ptr 00191 // 00192