stlsoft_char_traits Struct Template Reference
[String Library]

#include <stlsoft/string/char_traits.hpp>

Inheritance diagram for stlsoft_char_traits:

char_traits stlsoft_char_traits_safe char_traits_safe

List of all members.


Detailed Description

template<typename C>
struct stlsoft::stlsoft_char_traits< C >

Character traits.

Parameters:
C The character type
N The integer type
Z The size type

Public Types

typedef C char_type
 The char type.
typedef stlsoft_char_traits< C > class_type
 The current parameterisation of the type.
typedef int int_type
 The integer type.
typedef size_t size_type
 The size type.
typedef ss_streampos_t pos_type
 The position type.
typedef ss_streamoff_t off_type
 The offset type.

Static Public Member Functions

static void assign (char_type &lhs, char_type const &rhs)
 Assigns rhs to lhs.
static char_typeassign (char_type *dest, size_type cch, char_type const &c)
 Assigns cch characters of value c to dest.
static bool eq (char_type const &lhs, char_type const &rhs)
 Evaluates whether lhs is equivalent to rhs.
static bool lt (char_type const &lhs, char_type const &rhs)
 Evaluates whether lhs is less than rhs.
static int_type compare (char_type const *s1, char_type const *s2, size_type cch)
 Compares cch characters of s1 with s2.
static int_type compare_max (char_type const *s1, char_type const *s2, size_type cch)
static int_type compare_null (char_type const *s1, char_type const *s2, size_type cch)
 Compares, using compare(), s1 with s2, either or both of which may be null.
static int_type compare_maxnull (char_type const *s1, char_type const *s2, size_type cch)
 Compares, using compare_max(), s1 with s2, either or both of which may be null.
static size_type length (char_type const *s)
 Evaluates the length of the string s.
static size_type length_null (char_type const *s)
 Evaluates the length of the string s, which may be null.
static size_type length_max (char_type const *s, size_type limit)
 Evaluates the length of the string s up to a given number of characters.
static size_type length_max_null (char_type const *s, size_type limit)
 Evaluates the length of the string s, which may be null, up to a given number of characters.
static char_typecopy (char_type *dest, char_type const *src, size_type cch)
 Copies cch characters from src to dest.
static char_typemove (char_type *dest, char_type const *src, size_type cch)
 Copies cch characters from src to dest, accounting for whether the ranges overlap.
static char_type const * find (char_type const *s, size_type cch, char_type const &c)
 Finds the first c in cch elements in s, or NULL if not found.
static char_type to_char_type (int_type const &c)
 Represents the character in the character type char_type.
static int_type to_int_type (char_type const &c)
 Represents the character in the integer type int_type.
static bool eq_int_type (int_type const &lhs, int_type const &rhs)
 Evaluates whether lhs and rhs are equivalent.
static int_type eof ()
 Returns the value representing the end-of-file.
static int_type not_eof (int_type const &c)
 Evaluates whether the given character is the end-of-file.

Member Typedef Documentation

typedef C char_type

The char type.

Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.

The current parameterisation of the type.

Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.

typedef int int_type

The integer type.

Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.

typedef size_t size_type

The size type.

Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.

The position type.

Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.

The offset type.

Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.


Member Function Documentation

static void assign ( char_type lhs,
char_type const &  rhs 
) [inline, static]

static char_type* assign ( char_type dest,
size_type  cch,
char_type const &  c 
) [inline, static]

Assigns cch characters of value c to dest.

Reimplemented in stlsoft_char_traits_safe.

References stlsoft_char_traits::assign(), and STLSOFT_MESSAGE_ASSERT.

static bool eq ( char_type const &  lhs,
char_type const &  rhs 
) [inline, static]

static bool lt ( char_type const &  lhs,
char_type const &  rhs 
) [inline, static]

Evaluates whether lhs is less than rhs.

Reimplemented in stlsoft_char_traits_safe.

Referenced by stlsoft_char_traits::compare(), and stlsoft_char_traits_safe::lt().

static int_type compare ( char_type const *  s1,
char_type const *  s2,
size_type  cch 
) [inline, static]

Compares cch characters of s1 with s2.

Parameters:
s1 The first string to compare
s2 The second string to compare
cch The number of characters to compare s1 with s2
Return values:
<0 s1 is lexicographically less than s2
0 s1 is lexicographically equal to s2
>0 s1 is lexicographically more than s2

Reimplemented in stlsoft_char_traits_safe.

References stlsoft_char_traits::eq(), stlsoft_char_traits::lt(), and STLSOFT_MESSAGE_ASSERT.

Referenced by stlsoft_char_traits_safe::compare_null(), and stlsoft_char_traits::compare_null().

static int_type compare_null ( char_type const *  s1,
char_type const *  s2,
size_type  cch 
) [inline, static]

Compares, using compare(), s1 with s2, either or both of which may be null.

Reimplemented in stlsoft_char_traits_safe.

References stlsoft_char_traits::compare().

static int_type compare_maxnull ( char_type const *  s1,
char_type const *  s2,
size_type  cch 
) [inline, static]

Compares, using compare_max(), s1 with s2, either or both of which may be null.

Reimplemented in stlsoft_char_traits_safe.

Referenced by stlsoft_char_traits_safe::compare_maxnull().

static size_type length ( char_type const *  s  )  [inline, static]

static size_type length_null ( char_type const *  s  )  [inline, static]

Evaluates the length of the string s, which may be null.

Reimplemented in stlsoft_char_traits_safe.

References stlsoft_char_traits::length().

static size_type length_max ( char_type const *  s,
size_type  limit 
) [inline, static]

Evaluates the length of the string s up to a given number of characters.

Parameters:
s The string to be evaluated. It may not be null
limit The maximum number of characters to evaluate
Returns:
The length of the string (in characters) not including the null-terminator

Reimplemented in stlsoft_char_traits_safe.

References stlsoft_char_traits::eq(), and STLSOFT_MESSAGE_ASSERT.

Referenced by stlsoft_char_traits_safe::length_max_null(), and stlsoft_char_traits::length_max_null().

static size_type length_max_null ( char_type const *  s,
size_type  limit 
) [inline, static]

Evaluates the length of the string s, which may be null, up to a given number of characters.

Parameters:
s The string to be evaluated. It may be null
limit The maximum number of characters to evaluate
Returns:
The length of the string (in characters) not including the null-terminator

Reimplemented in stlsoft_char_traits_safe.

References stlsoft_char_traits::length_max().

static char_type* copy ( char_type dest,
char_type const *  src,
size_type  cch 
) [inline, static]

static char_type* move ( char_type dest,
char_type const *  src,
size_type  cch 
) [inline, static]

Copies cch characters from src to dest, accounting for whether the ranges overlap.

Reimplemented in stlsoft_char_traits_safe.

References stlsoft_char_traits::assign(), and STLSOFT_MESSAGE_ASSERT.

Referenced by stlsoft_char_traits_safe::move().

static char_type const* find ( char_type const *  s,
size_type  cch,
char_type const &  c 
) [inline, static]

Finds the first c in cch elements in s, or NULL if not found.

Reimplemented in stlsoft_char_traits_safe.

References stlsoft_char_traits::eq(), and STLSOFT_MESSAGE_ASSERT.

Referenced by stlsoft_char_traits_safe::find().

static char_type to_char_type ( int_type const &  c  )  [inline, static]

Represents the character in the character type char_type.

Reimplemented in stlsoft_char_traits_safe.

Referenced by stlsoft_char_traits_safe::to_char_type().

static int_type to_int_type ( char_type const &  c  )  [inline, static]

Represents the character in the integer type int_type.

Reimplemented in stlsoft_char_traits_safe.

References ss_typename_type_k.

Referenced by stlsoft_char_traits_safe::to_int_type().

static bool eq_int_type ( int_type const &  lhs,
int_type const &  rhs 
) [inline, static]

Evaluates whether lhs and rhs are equivalent.

Reimplemented in stlsoft_char_traits_safe.

Referenced by stlsoft_char_traits_safe::eq_int_type().

static int_type eof (  )  [inline, static]

Returns the value representing the end-of-file.

Reimplemented in stlsoft_char_traits_safe.

Referenced by stlsoft_char_traits_safe::eof(), and stlsoft_char_traits::not_eof().

static int_type not_eof ( int_type const &  c  )  [inline, static]

Evaluates whether the given character is the end-of-file.

Reimplemented in stlsoft_char_traits_safe.

References stlsoft_char_traits::eof().

Referenced by stlsoft_char_traits_safe::not_eof().


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

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