CStringBase< T > Class Template Reference

#include <String.h>

List of all members.

Public Member Functions

 CStringBase ()
 CStringBase (T c)
 CStringBase (const T *chars)
 CStringBase (const CStringBase &s)
 ~CStringBase ()
 operator const T * () const
T * GetBuffer (int minBufLength)
void ReleaseBuffer ()
void ReleaseBuffer (int newLength)
CStringBaseoperator= (T c)
CStringBaseoperator= (const T *chars)
CStringBaseoperator= (const CStringBase &s)
CStringBaseoperator+= (T c)
CStringBaseoperator+= (const T *s)
CStringBaseoperator+= (const CStringBase &s)
void Empty ()
int Length () const
bool IsEmpty () const
CStringBase Mid (int startIndex) const
CStringBase Mid (int startIndex, int count) const
CStringBase Left (int count) const
CStringBase Right (int count) const
void MakeUpper ()
void MakeLower ()
int Compare (const CStringBase &s) const
int CompareNoCase (const CStringBase &s) const
int Find (T c) const
int Find (T c, int startIndex) const
int Find (const CStringBase &s) const
int Find (const CStringBase &s, int startIndex) const
int ReverseFind (T c) const
int FindOneOf (const CStringBase &s) const
void TrimLeft (T c)
void TrimLeft ()
void TrimRight ()
void TrimRight (T c)
void Trim ()
int Insert (int index, T c)
int Insert (int index, const CStringBase &s)
int Replace (T oldChar, T newChar)
int Replace (const CStringBase &oldString, const CStringBase &newString)
int Delete (int index, int count=1)

Protected Member Functions

void SetCapacity (int newCapacity)
void GrowLength (int n)
void CorrectIndex (int &index) const

Protected Attributes

T * _chars
int _length
int _capacity

Private Member Functions

void TrimLeftWithCharSet (const CStringBase &charSet)
void TrimRightWithCharSet (const CStringBase &charSet)
void MoveItems (int destIndex, int srcIndex)
void InsertSpace (int &index, int size)
CStringBase GetTrimDefaultCharSet ()

Static Private Member Functions

static T * GetNextCharPointer (T *p)
static const T * GetNextCharPointer (const T *p)
static T * GetPrevCharPointer (T *base, T *p)
static const T * GetPrevCharPointer (const T *base, const T *p)


Detailed Description

template<class T>
class CStringBase< T >

Definition at line 101 of file String.h.


Constructor & Destructor Documentation

template<class T>
CStringBase< T >::CStringBase (  )  [inline]

Definition at line 204 of file String.h.

template<class T>
CStringBase< T >::CStringBase ( c  )  [inline]

Definition at line 206 of file String.h.

template<class T>
CStringBase< T >::CStringBase ( const T *  chars  )  [inline]

Definition at line 213 of file String.h.

template<class T>
CStringBase< T >::CStringBase ( const CStringBase< T > &  s  )  [inline]

Definition at line 220 of file String.h.

template<class T>
CStringBase< T >::~CStringBase (  )  [inline]

Definition at line 226 of file String.h.


Member Function Documentation

template<class T>
void CStringBase< T >::TrimLeftWithCharSet ( const CStringBase< T > &  charSet  )  [inline, private]

Definition at line 103 of file String.h.

Referenced by CStringBase< wchar_t >::TrimLeft().

template<class T>
void CStringBase< T >::TrimRightWithCharSet ( const CStringBase< T > &  charSet  )  [inline, private]

Definition at line 110 of file String.h.

Referenced by CStringBase< wchar_t >::TrimRight().

template<class T>
void CStringBase< T >::MoveItems ( int  destIndex,
int  srcIndex 
) [inline, private]

template<class T>
void CStringBase< T >::InsertSpace ( int &  index,
int  size 
) [inline, private]

Definition at line 138 of file String.h.

Referenced by CStringBase< wchar_t >::Insert().

template<class T>
static T* CStringBase< T >::GetNextCharPointer ( T *  p  )  [inline, static, private]

template<class T>
static const T* CStringBase< T >::GetNextCharPointer ( const T *  p  )  [inline, static, private]

Definition at line 147 of file String.h.

template<class T>
static T* CStringBase< T >::GetPrevCharPointer ( T *  base,
T *  p 
) [inline, static, private]

Definition at line 149 of file String.h.

Referenced by CStringBase< wchar_t >::ReverseFind().

template<class T>
static const T* CStringBase< T >::GetPrevCharPointer ( const T *  base,
const T *  p 
) [inline, static, private]

Definition at line 151 of file String.h.

template<class T>
void CStringBase< T >::SetCapacity ( int  newCapacity  )  [inline, protected]

template<class T>
void CStringBase< T >::GrowLength ( int  n  )  [inline, protected]

template<class T>
void CStringBase< T >::CorrectIndex ( int &  index  )  const [inline, protected]

template<class T>
CStringBase< T >::operator const T * (  )  const [inline]

Definition at line 228 of file String.h.

template<class T>
T* CStringBase< T >::GetBuffer ( int  minBufLength  )  [inline]

template<class T>
void CStringBase< T >::ReleaseBuffer (  )  [inline]

template<class T>
void CStringBase< T >::ReleaseBuffer ( int  newLength  )  [inline]

Definition at line 239 of file String.h.

template<class T>
CStringBase& CStringBase< T >::operator= ( c  )  [inline]

Definition at line 246 of file String.h.

template<class T>
CStringBase& CStringBase< T >::operator= ( const T *  chars  )  [inline]

Definition at line 255 of file String.h.

template<class T>
CStringBase& CStringBase< T >::operator= ( const CStringBase< T > &  s  )  [inline]

Definition at line 264 of file String.h.

template<class T>
CStringBase& CStringBase< T >::operator+= ( c  )  [inline]

Definition at line 275 of file String.h.

template<class T>
CStringBase& CStringBase< T >::operator+= ( const T *  s  )  [inline]

Definition at line 282 of file String.h.

template<class T>
CStringBase& CStringBase< T >::operator+= ( const CStringBase< T > &  s  )  [inline]

Definition at line 290 of file String.h.

template<class T>
void CStringBase< T >::Empty (  )  [inline]

template<class T>
int CStringBase< T >::Length (  )  const [inline]

template<class T>
bool CStringBase< T >::IsEmpty (  )  const [inline]

template<class T>
CStringBase CStringBase< T >::Mid ( int  startIndex  )  const [inline]

template<class T>
CStringBase CStringBase< T >::Mid ( int  startIndex,
int  count 
) const [inline]

Definition at line 307 of file String.h.

template<class T>
CStringBase CStringBase< T >::Left ( int  count  )  const [inline]

template<class T>
CStringBase CStringBase< T >::Right ( int  count  )  const [inline]

Definition at line 326 of file String.h.

Referenced by OpenArchive().

template<class T>
void CStringBase< T >::MakeUpper (  )  [inline]

Definition at line 333 of file String.h.

template<class T>
void CStringBase< T >::MakeLower (  )  [inline]

Definition at line 335 of file String.h.

template<class T>
int CStringBase< T >::Compare ( const CStringBase< T > &  s  )  const [inline]

Definition at line 338 of file String.h.

Referenced by operator!=(), and operator==().

template<class T>
int CStringBase< T >::CompareNoCase ( const CStringBase< T > &  s  )  const [inline]

template<class T>
int CStringBase< T >::Find ( c  )  const [inline]

template<class T>
int CStringBase< T >::Find ( c,
int  startIndex 
) const [inline]

Definition at line 346 of file String.h.

template<class T>
int CStringBase< T >::Find ( const CStringBase< T > &  s  )  const [inline]

Definition at line 358 of file String.h.

template<class T>
int CStringBase< T >::Find ( const CStringBase< T > &  s,
int  startIndex 
) const [inline]

Definition at line 359 of file String.h.

template<class T>
int CStringBase< T >::ReverseFind ( c  )  const [inline]

template<class T>
int CStringBase< T >::FindOneOf ( const CStringBase< T > &  s  )  const [inline]

Definition at line 388 of file String.h.

Referenced by DoesNameContainWildCard().

template<class T>
void CStringBase< T >::TrimLeft ( c  )  [inline]

Definition at line 396 of file String.h.

template<class T>
CStringBase CStringBase< T >::GetTrimDefaultCharSet (  )  [inline, private]

template<class T>
void CStringBase< T >::TrimLeft (  )  [inline]

Definition at line 414 of file String.h.

Referenced by CStringBase< wchar_t >::Trim().

template<class T>
void CStringBase< T >::TrimRight (  )  [inline]

Definition at line 418 of file String.h.

Referenced by CStringBase< wchar_t >::Trim().

template<class T>
void CStringBase< T >::TrimRight ( c  )  [inline]

Definition at line 422 of file String.h.

template<class T>
void CStringBase< T >::Trim (  )  [inline]

Definition at line 443 of file String.h.

template<class T>
int CStringBase< T >::Insert ( int  index,
c 
) [inline]

Definition at line 449 of file String.h.

Referenced by CStringBase< wchar_t >::Replace().

template<class T>
int CStringBase< T >::Insert ( int  index,
const CStringBase< T > &  s 
) [inline]

Definition at line 456 of file String.h.

template<class T>
int CStringBase< T >::Replace ( oldChar,
newChar 
) [inline]

Definition at line 470 of file String.h.

Referenced by DecompressArchive().

template<class T>
int CStringBase< T >::Replace ( const CStringBase< T > &  oldString,
const CStringBase< T > &  newString 
) [inline]

Definition at line 487 of file String.h.

template<class T>
int CStringBase< T >::Delete ( int  index,
int  count = 1 
) [inline]


Member Data Documentation

template<class T>
T* CStringBase< T >::_chars [protected]

template<class T>
int CStringBase< T >::_length [protected]

template<class T>
int CStringBase< T >::_capacity [protected]


The documentation for this class was generated from the following file:

Generated on Sun May 25 00:20:55 2008 by  doxygen 1.5.6