Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

mpcl::text::TBasicString< TChar, TTraits, TAllocator > Class Template Reference

#include <basic_string.hh>

List of all members.

Public Types

typedef std::basic_string<
TChar, TTraits, TAllocator
>::allocator_type 
allocator_type
 Import this type.

typedef std::basic_string<
TChar, TTraits, TAllocator
>::const_iterator 
const_iterator
 Import this type.

typedef std::basic_string<
TChar, TTraits, TAllocator
>::const_pointer 
const_pointer
 Import this type.

typedef std::basic_string<
TChar, TTraits, TAllocator
>::const_reference 
const_reference
 Import this type.

typedef std::basic_string<
TChar, TTraits, TAllocator
>::const_reverse_iterator 
const_reverse_iterator
 Import this type.

typedef std::basic_string<
TChar, TTraits, TAllocator
>::difference_type 
difference_type
 Import this type.

typedef std::basic_string<
TChar, TTraits, TAllocator
>::iterator 
iterator
 Import this type.

typedef std::basic_string<
TChar, TTraits, TAllocator
>::pointer 
pointer
 Import this type.

typedef std::basic_string<
TChar, TTraits, TAllocator
>::reference 
reference
 Import this type.

typedef std::basic_string<
TChar, TTraits, TAllocator
>::reverse_iterator 
reverse_iterator
 Import this type.

typedef std::basic_string<
TChar, TTraits, TAllocator
>::size_type 
size_type
 Import this type.

typedef std::basic_string<
TChar, TTraits, TAllocator
>::traits_type 
traits_type
 Import this type.

typedef std::basic_string<
TChar, TTraits, TAllocator
>::value_type 
value_type
 Import this type.


Public Methods

 TBasicString (void)
 Builds a new instance.

 TBasicString (const std::basic_string< TChar, TTraits, TAllocator > &rkySOURCE)
 Builds a new instance.

 TBasicString (const TBasicString &rkySOURCE)
 Builds a new instance.

 TBasicString (const TBasicString &rkySOURCE, size_type zOFFSET, size_type zLENGTH=npos)
 Builds a new instance.

 TBasicString (const TChar *pkcSOURCE, size_type zLENGTH)
 TBasicString (const TChar *pkcSOURCE)
 TBasicString (size_type zTIMES, TChar cSOURCE)
 Builds a new instance.

template<typename InputIterator>  TBasicString (InputIterator tBEGIN_ITER, InputIterator tEND_ITER)
 Builds a new instance.

TBasicString & operator= (const TBasicString &rkySOURCE)
TBasicString & operator= (const TChar *pkcSOURCE)
TBasicString & operator= (TChar cSOURCE)
size_type replaceAll (const std::basic_string< TChar, TTraits, TAllocator > &rkySOURCE1, const std::basic_string< TChar, TTraits, TAllocator > &rkySOURCE2)
size_type replaceAll (const TChar *pkcSOURCE1, const TChar *pkcSOURCE2)
size_type replaceAll (TChar cSOURCE1, TChar cSOURCE2)
TBasicString & leftFill (TChar cSOURCE, size_type zLENGTH)
TBasicString & rightFill (TChar cSOURCE, size_type zLENGTH)
TBasicString & suppress (TChar cSOURCE)
TBasicString & suppressFirst (TChar cSOURCE)
TBasicString & suppressLast (TChar cSOURCE)
TBasicString & uppercase (void)
TBasicString & lowercase (void)
size_type occurrences (const TChar *pkcSOURCE) const
size_type occurrences (TChar cSOURCE) const
template<typename TOutputIter> const TBasicString & split (TChar cSOURCE, TOutputIter tTARGET_ITER) const


Detailed Description

template<typename TChar, typename TTraits = std::char_traits<TChar>, typename TAllocator = std::allocator<TChar>>
class mpcl::text::TBasicString< TChar, TTraits, TAllocator >

Extended string.

Warning:
This class follows the naming conventions used in STL classes.

Definition at line 52 of file basic_string.hh.


Constructor & Destructor Documentation

template<typename TChar, typename TTraits = std::char_traits<TChar>, typename TAllocator = std::allocator<TChar>>
mpcl::text::TBasicString< TChar, TTraits, TAllocator >::TBasicString const TChar *    pkcSOURCE,
size_type    zLENGTH
[inline]
 

Extends the parent constructor with checks for NULL string.

Parameters:
pkcSOURCE  Source string.
zLENGTH  Source string length.
Exceptions:
TConstraintException  If source string is NULL.

Definition at line 153 of file basic_string.hh.

References mpcl::text::TBasicString< TChar, TTraits, TAllocator >::size_type.

template<typename TChar, typename TTraits = std::char_traits<TChar>, typename TAllocator = std::allocator<TChar>>
mpcl::text::TBasicString< TChar, TTraits, TAllocator >::TBasicString const TChar *    pkcSOURCE [inline]
 

Extends the parent constructor with checks for NULL string.

Parameters:
pkcSOURCE  Source string.
Exceptions:
TConstraintException  If source string is NULL.

Definition at line 168 of file basic_string.hh.


Member Function Documentation

template<typename TChar, typename TTraits, typename TAllocator>
TBasicString< TChar, TTraits, TAllocator > & mpcl::text::TBasicString< TChar, TTraits, TAllocator >::leftFill TChar    cSOURCE,
size_type    zLENGTH
[inline]
 

Left inserts zLENGTH - length() characters cSOURCE (only if zLENGTH > length()).

Parameters:
cSOURCE  Source character.
zLENGTH  Total final length of the string.
Returns:
This instance.

Definition at line 397 of file basic_string.hh.

References mpcl::text::TBasicString< TChar, TTraits, TAllocator >::size_type.

template<typename TChar, typename TTraits, typename TAllocator>
TBasicString< TChar, TTraits, TAllocator > & mpcl::text::TBasicString< TChar, TTraits, TAllocator >::lowercase void    [inline]
 

Changes all characters to lowercase (using std::tolower()).

Returns:
This instance.
See also:
std::tolower().

Definition at line 515 of file basic_string.hh.

References mpcl::text::TBasicString< TChar, TTraits, TAllocator >::iterator.

template<typename TChar, typename TTraits, typename TAllocator>
TBasicString< TChar, TTraits, TAllocator >::size_type mpcl::text::TBasicString< TChar, TTraits, TAllocator >::occurrences TChar    cSOURCE const [inline]
 

Returns the occurrences of the character cSOURCE in this instance.

Parameters:
cSOURCE  Source character.
Returns:
The number of occurrences.

Definition at line 565 of file basic_string.hh.

References mpcl::text::TBasicString< TChar, TTraits, TAllocator >::size_type.

template<typename TChar, typename TTraits, typename TAllocator>
TBasicString< TChar, TTraits, TAllocator >::size_type mpcl::text::TBasicString< TChar, TTraits, TAllocator >::occurrences const TChar *    pkcSOURCE const [inline]
 

Returns the occurrences of the string pkcSOURCE in this instance.

Parameters:
pkcSOURCE  Source string.
Returns:
The number of occurrences.

Definition at line 538 of file basic_string.hh.

References mpcl::text::TBasicString< TChar, TTraits, TAllocator >::size_type.

template<typename TChar, typename TTraits = std::char_traits<TChar>, typename TAllocator = std::allocator<TChar>>
TBasicString& mpcl::text::TBasicString< TChar, TTraits, TAllocator >::operator= TChar    cSOURCE [inline]
 

Copies the character cSOURCE onto this.

Parameters:
cSOURCE  Source character.
Returns:
This instance.

Definition at line 218 of file basic_string.hh.

template<typename TChar, typename TTraits = std::char_traits<TChar>, typename TAllocator = std::allocator<TChar>>
TBasicString& mpcl::text::TBasicString< TChar, TTraits, TAllocator >::operator= const TChar *    pkcSOURCE [inline]
 

Copies the string pkcSOURCE onto this.

Parameters:
pkcSOURCE  Source string.
Returns:
This instance.

Definition at line 203 of file basic_string.hh.

template<typename TChar, typename TTraits = std::char_traits<TChar>, typename TAllocator = std::allocator<TChar>>
TBasicString& mpcl::text::TBasicString< TChar, TTraits, TAllocator >::operator= const TBasicString< TChar, TTraits, TAllocator > &    rkySOURCE [inline]
 

Copies the instance rkySOURCE onto this.

Parameters:
rkySOURCE  Source string.
Returns:
This instance.

Definition at line 192 of file basic_string.hh.

template<typename TChar, typename TTraits, typename TAllocator>
TBasicString< TChar, TTraits, TAllocator >::size_type mpcl::text::TBasicString< TChar, TTraits, TAllocator >::replaceAll TChar    cSOURCE1,
TChar    cSOURCE2
[inline]
 

Replace all occurrences of cSOURCE1 with cSOURCE2. It returns the number of times that cSOURCE1 is found.

Parameters:
cSOURCE1  Source character.
cSOURCE2  Source char.
Returns:
The number of substitutions.

Definition at line 377 of file basic_string.hh.

References mpcl::text::TBasicString< TChar, TTraits, TAllocator >::size_type.

template<typename TChar, typename TTraits, typename TAllocator>
TBasicString< TChar, TTraits, TAllocator >::size_type mpcl::text::TBasicString< TChar, TTraits, TAllocator >::replaceAll const TChar *    pkcSOURCE1,
const TChar *    pkcSOURCE2
[inline]
 

Replace all occurrences of pkcSOURCE1 with pkcSOURCE2. It returns the number of times that pkcSOURCE1 is found.

Parameters:
pkcSOURCE1  Source string.
pkcSOURCE2  Source string.
Returns:
The number of substitutions.

Definition at line 347 of file basic_string.hh.

References mpcl::text::TBasicString< TChar, TTraits, TAllocator >::size_type.

template<typename TChar, typename TTraits = std::char_traits<TChar>, typename TAllocator = std::allocator<TChar>>
size_type mpcl::text::TBasicString< TChar, TTraits, TAllocator >::replaceAll const std::basic_string< TChar, TTraits, TAllocator > &    rkySOURCE1,
const std::basic_string< TChar, TTraits, TAllocator > &    rkySOURCE2
[inline]
 

Replaces all occurrences of rkySOURCE1 with rkySOURCE2. It returns the number of times that rkySOURCE1 is found.

Parameters:
a  rkySOURCE1 Source string.
a  rkySOURCE2 Source string.
Returns:
The number of substitutions.

Definition at line 231 of file basic_string.hh.

References mpcl::text::TBasicString< TChar, TTraits, TAllocator >::size_type.

template<typename TChar, typename TTraits, typename TAllocator>
TBasicString< TChar, TTraits, TAllocator > & mpcl::text::TBasicString< TChar, TTraits, TAllocator >::rightFill TChar    cSOURCE,
size_type    zLENGTH
[inline]
 

Right inserts zLENGTH - length() characters cSOURCE (only if zLENGTH > length()).

Parameters:
cSOURCE  Source character.
zLENGTH  Total final length of the string.
Returns:
This instance.

Definition at line 413 of file basic_string.hh.

template<typename TChar, typename TTraits = std::char_traits<TChar>, typename TAllocator = std::allocator<TChar>>
template<typename TOutputIter>
const TBasicString& mpcl::text::TBasicString< TChar, TTraits, TAllocator >::split TChar    cSOURCE,
TOutputIter    tTARGET_ITER
const [inline]
 

Stores the strings between characters cSOURCE (but excluding it) in the container pointed by the iterator tTARGET_ITER.

Parameters:
cSOURCE  Separator character.
tTARGET_ITER  Target container iterator.

Definition at line 336 of file basic_string.hh.

References mpcl::text::Split().

template<typename TChar, typename TTraits, typename TAllocator>
TBasicString< TChar, TTraits, TAllocator > & mpcl::text::TBasicString< TChar, TTraits, TAllocator >::suppress TChar    cSOURCE [inline]
 

Suppress all occurrences of cSOURCE.

Parameters:
cSOURCE  Source character.
Returns:
This instance.

Definition at line 429 of file basic_string.hh.

References mpcl::text::TBasicString< TChar, TTraits, TAllocator >::iterator.

template<typename TChar, typename TTraits, typename TAllocator>
TBasicString< TChar, TTraits, TAllocator > & mpcl::text::TBasicString< TChar, TTraits, TAllocator >::suppressFirst TChar    cSOURCE [inline]
 

Suppress the first occurrence of cSOURCE.

Parameters:
cSOURCE  Source character.
Returns:
This instance.

Definition at line 442 of file basic_string.hh.

References mpcl::text::TBasicString< TChar, TTraits, TAllocator >::const_iterator, and mpcl::text::TBasicString< TChar, TTraits, TAllocator >::iterator.

template<typename TChar, typename TTraits, typename TAllocator>
TBasicString< TChar, TTraits, TAllocator > & mpcl::text::TBasicString< TChar, TTraits, TAllocator >::suppressLast TChar    cSOURCE [inline]
 

Suppress the last occurrence of cSOURCE.

Parameters:
cSOURCE  Source character.
Returns:
This instance.

Definition at line 470 of file basic_string.hh.

References mpcl::text::TBasicString< TChar, TTraits, TAllocator >::iterator.

template<typename TChar, typename TTraits, typename TAllocator>
TBasicString< TChar, TTraits, TAllocator > & mpcl::text::TBasicString< TChar, TTraits, TAllocator >::uppercase void    [inline]
 

Changes all characters to uppercase (using std::toupper()).

Returns:
This instance.
See also:
std::toupper().

Definition at line 498 of file basic_string.hh.

References mpcl::text::TBasicString< TChar, TTraits, TAllocator >::iterator.


The documentation for this class was generated from the following file:
Generated on Mon Oct 13 02:35:25 2003 for MPCL by doxygen1.2.18