charset_tokeniser Class Template Reference
[String Library]

#include <stlsoft/string/charset_tokeniser.hpp>

Inheritance diagram for charset_tokeniser:

string_tokeniser stl_collection_tag collection_tag

List of all members.


Detailed Description

template<typename S, typename B = skip_blank_tokens<true>, typename V = S, typename T = string_tokeniser_type_traits<S, V>, typename D = S, typename P = charset_comparator<S>>
class stlsoft::charset_tokeniser< S, B, V, T, D, P >

A class template that provides string tokenising behaviour, where the delimiter is a character set, a la strtok().

This class takes a string, and a character-set delimiter, and fashions a sequence from the given string, with each element determined with respect to the delimiter. It is derived from stlsoft::string_tokeniser, and effectively defines a specialisation of it, in order to make it simpler to specialise. All that's usually required is to specialise the string type and, optionally, the blanks policy.

Parameters:
S The string type
B The blank skipping policy type. Defaults to skip_blank_tokens<true>
V The value type (the string type that will be used for the values). Defaults to S
T The string type traits type. Defaults to string_tokeniser_type_traits<S, V>
D The delimiter type (can be a string type or a character type). Defaults to S
P The tokeniser comparator type. Defaults to string_tokeniser_comparator<D, S, T>

Member Types

typedef charset_tokeniser< S,
B, V, T, D, P > 
class_type
 The current parameterisation of the type.
typedef
parent_class_type::string_type 
string_type
 The sequence string type.
typedef
parent_class_type::delimiter_type 
delimiter_type
 The delimiter type.
typedef
parent_class_type::blanks_policy_type 
blanks_policy_type
 The blanks policy type.
typedef
parent_class_type::value_type 
value_type
 The value type.
typedef
parent_class_type::traits_type 
traits_type
 The traits type.
typedef
parent_class_type::comparator_type 
comparator_type
 The tokeniser comparator type.
typedef
parent_class_type::char_type 
char_type
 The character type.
typedef
parent_class_type::size_type 
size_type
 The size type.
typedef
parent_class_type::const_reference 
const_reference
 The non-mutating (const) reference type.
typedef
parent_class_type::const_iterator 
const_iterator
 The non-mutating (const) iterator type.

Public Member Functions

Construction
 charset_tokeniser (char_type const *psz, delimiter_type const &charSet)
 Tokenise the given C-string with the given delimiter.
template<typename S1>
 charset_tokeniser (S1 const &str, delimiter_type const &charSet)
 Tokenise the given string with the given delimiter.
 charset_tokeniser (char_type const *psz, size_type cch, delimiter_type const &charSet)
 Tokenise the specified length of the given string with the given delimiter.
template<typename I>
 charset_tokeniser (I from, I to, delimiter_type const &charSet)
 Tokenise the given range with the given delimiter.

Member Typedef Documentation

typedef charset_tokeniser<S, B, V, T, D, P> class_type

The current parameterisation of the type.

Reimplemented from string_tokeniser.

The sequence string type.

Reimplemented from string_tokeniser.

The delimiter type.

Reimplemented from string_tokeniser.

The blanks policy type.

Reimplemented from string_tokeniser.

The value type.

Reimplemented from string_tokeniser.

The traits type.

Reimplemented from string_tokeniser.

The tokeniser comparator type.

Reimplemented from string_tokeniser.

The character type.

Reimplemented from string_tokeniser.

The size type.

Reimplemented from string_tokeniser.

The non-mutating (const) reference type.

Reimplemented from string_tokeniser.

The non-mutating (const) iterator type.


Constructor & Destructor Documentation

charset_tokeniser ( char_type const *  psz,
delimiter_type const &  charSet 
) [inline]

Tokenise the given C-string with the given delimiter.

Parameters:
psz Pointer to C-string whose contents will be tokenised
charSet The delimiter to perform the tokenisation
Note:
The tokeniser class takes a copy of psz. It does not alter the contents of psz

charset_tokeniser ( S1 const &  str,
delimiter_type const &  charSet 
) [inline]

Tokenise the given string with the given delimiter.

Parameters:
str The string whose contents will be tokenised
charSet The delimiter to perform the tokenisation
Note:
The tokeniser class takes a copy of str. It does not alter the contents of str

charset_tokeniser ( char_type const *  psz,
size_type  cch,
delimiter_type const &  charSet 
) [inline]

Tokenise the specified length of the given string with the given delimiter.

Parameters:
psz Pointer to C-string whose contents will be tokenised
cch The number of characters in psz to use
charSet The delimiter to perform the tokenisation
Note:
The tokeniser class takes a copy of psz. It does not alter the contents of psz

charset_tokeniser ( from,
to,
delimiter_type const &  charSet 
) [inline]

Tokenise the given range with the given delimiter.

Parameters:
from The start of the asymmetric range to tokenise
to The start of the asymmetric range to tokenise
charSet The delimiter to use


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

Generated on Thu Jun 10 08:58:58 2010 for STLSoft by  doxygen 1.5.6