"L. Spiro Engine"
|
00001 00018 #ifndef __LSTL_STRING_H__ 00019 #define __LSTL_STRING_H__ 00020 00021 #include "../LSTLib.h" 00022 #include "LSTLStringBase.h" 00023 00024 namespace lstl { 00025 00034 class CString : public CStringBase<CString, char> { 00035 public : 00036 // == Various constructors. 00037 explicit LSE_CALL CString( CAllocator * _paAllocator = NULL ); 00038 LSE_CALL CString( const char * _pcString, CAllocator * _paAllocator = NULL ); 00039 LSE_CALL CString( const wchar_t * _pwcString, CAllocator * _paAllocator = NULL ); 00040 LSE_CALL CString( const CString &_sString, CAllocator * _paAllocator = NULL ); 00041 LSE_CALL CString( const CStringBase<CString, char> &_sbStringBase, CAllocator * _paAllocator = NULL ); 00042 00043 00044 // == Operators. 00051 CString & LSE_CALL operator = ( const char * _pcString ); 00052 00059 CString & LSE_CALL operator = ( const CString &_strString ); 00060 00061 00062 // == Functions. 00070 LSBOOL LSE_CALL FromUI64( LSUINT64 _ui64Value, LSUINT32 _ui32Radix = 10 ); 00071 00079 LSBOOL LSE_CALL FromI64( LSINT64 _i64Value, LSUINT32 _ui32Radix = 10 ); 00080 00089 LSBOOL LSE_CALL FromDouble( LSDOUBLE _dValue, LSBOOL _bScientific = false ); 00090 00098 static CString LSE_CALL CStringFromUtfX( const wchar_t * _pwcString, CAllocator * _paAllocator = NULL ); 00099 00108 static CString LSE_CALL CreateFromUI64( LSUINT64 _ui64Value, LSUINT32 _ui32Radix = 10 ); 00109 00118 static CString LSE_CALL CreateFromI64( LSINT64 _i64Value, LSUINT32 _ui32Radix = 10 ); 00119 00129 static CString LSE_CALL CreateFromDouble( LSDOUBLE _dValue, LSBOOL _bScientific = false ); 00130 00131 protected : 00132 // == Functions. 00140 LSUINT32 LSE_CALL StrLen( const char * _pcValue ) const; 00141 00145 friend class CStringBase<CString, char>; 00146 00147 private : 00148 typedef CStringBase<CString, char> Parent; 00149 }; 00150 00151 } // namespace lstl 00152 00153 #endif // __LSTL_STRING_H__