STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

stlsoft_char_traits Struct Template Reference

Character traits. More...

#include <stlsoft_char_traits.h>

Inheritance diagram for stlsoft_char_traits:

char_traits stlsoft_char_traits_safe char_traits_safe List of all members.

Public Types

typedef C char_type
 The char type.

typedef stlsoft_char_traits<
C > 
class_type
 The current parameterisation of the type.

typedef ss_int_t int_type
 The integer type.

typedef ss_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 Methods

void assign (char_type &lhs, char_type const &rhs)
 Assigns rhs to lhs.

char_typeassign (char_type *dest, size_type cch, char_type const &c)
 Assigns cch characters of value c to dest.

ss_bool_t eq (char_type const &lhs, char_type const &rhs)
 Evaluates whether lhs is equivalent to rhs.

ss_bool_t lt (char_type const &lhs, char_type const &rhs)
 Evaluates whether lhs is less than rhs.

int_type compare (char_type const *s1, char_type const *s2, size_type cch)
 Compares cch characters of s1 with s2.

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.

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.

size_type length (char_type const *s)
 Evaluates the length of the string s.

size_type length_null (char_type const *s)
 Evaluates the length of the string s, which may be null.

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.

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.

char_typecopy (char_type *dest, char_type const *src, size_type cch)
 Copies cch characters from src to dest.

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.

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.

char_type to_char_type (int_type const &c)
 Represents the character in the character type char_type.

int_type to_int_type (char_type const &c)
 Represents the character in the integer type int_type.

ss_bool_t eq_int_type (int_type const &lhs, int_type const &rhs)
 Evaluates whether lhs and rhs are equivalent.

int_type eof ()
 Returns the value representing the end-of-file.

int_type not_eof (int_type const &c)
 Evaluates whether the given character is the end-of-file.


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


Member Typedef Documentation

typedef C char_type
 

The char type.

Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.

typedef stlsoft_char_traits<C> class_type
 

The current parameterisation of the type.

Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.

typedef ss_int_t int_type
 

The integer type.

Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.

typedef ss_streamoff_t off_type
 

The offset type.

Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.

typedef ss_streampos_t pos_type
 

The position type.

Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.

typedef ss_size_t size_type
 

The size type.

Reimplemented in stlsoft_char_traits_safe, char_traits, and char_traits_safe.


Member Function Documentation

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.

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

Assigns rhs to lhs.

Reimplemented in stlsoft_char_traits_safe.

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.

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.

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.

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

Copies cch characters from src to dest.

Reimplemented in stlsoft_char_traits_safe.

int_type eof   [inline, static]
 

Returns the value representing the end-of-file.

Reimplemented in stlsoft_char_traits_safe.

ss_bool_t eq char_type const &    lhs,
char_type const &    rhs
[inline, static]
 

Evaluates whether lhs is equivalent to rhs.

Reimplemented in stlsoft_char_traits_safe.

ss_bool_t 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.

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.

size_type length char_type const *    s [inline, static]
 

Evaluates the length of the string s.

Reimplemented in stlsoft_char_traits_safe.

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.

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.

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.

ss_bool_t lt char_type const &    lhs,
char_type const &    rhs
[inline, static]
 

Evaluates whether lhs is less than rhs.

Reimplemented in stlsoft_char_traits_safe.

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.

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.

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.

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.


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

STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004