stlencoders  1.1.3
Public Types | Static Public Member Functions | List of all members
stlencoders::portable_wchar_encoding_traits< traits > Struct Template Reference

A character encoding traits adaptor that converts an underlying encoding traits class for type char to type wchar_t. More...

Public Types

typedef wchar_t char_type
 The encoding character type. More...
 
typedef traits::int_type int_type
 An integral type representing an octet. More...
 

Static Public Member Functions

static bool eq (const char_type &lhs, const char_type &rhs)
 Returns whether the character lhs is to be treated equal to the character rhs. More...
 
static bool eq_int_type (const int_type &lhs, const int_type &rhs)
 Returns whether the integral value lhs is to be treated equal to rhs. More...
 
static char_type to_char_type (const int_type &c)
 Converts an integral value to a character in the encoding alphabet. More...
 
static char_type to_char_type_lower (const int_type &c)
 Converts an integral value to a lowercase character in the encoding alphabet. More...
 
static char_type to_char_type_upper (const int_type &c)
 Converts an integral value to an uppercase character in the encoding alphabet. More...
 
static int_type to_int_type (const char_type &c)
 Converts a character to an integral value. More...
 
static char_type pad ()
 Returns the character used to perform padding at the end of a character sequence. More...
 
static int_type inv ()
 Returns an integral value represented by no character in the encoding alphabet. More...
 

Detailed Description

template<class traits>
struct stlencoders::portable_wchar_encoding_traits< traits >

A character encoding traits adaptor that converts an underlying encoding traits class for type char to type wchar_t.

A portable encoding traits class' encoding alphabet must only use characters from the basic execution character set:

a b c d e f g h i j k l m n o p q r s t u v w x y z
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 1 2 3 4 5 6 7 8 9
_ { } [ ] # ( ) < > % : ; . ? * + - / ^ & | ∼ ! = , \ " '
Template Parameters
traitsthe underlying character encoding traits class with character type char

Member Typedef Documentation

template<class traits>
typedef wchar_t stlencoders::portable_wchar_encoding_traits< traits >::char_type

The encoding character type.

template<class traits>
typedef traits::int_type stlencoders::portable_wchar_encoding_traits< traits >::int_type

An integral type representing an octet.

Member Function Documentation

template<class traits>
static bool stlencoders::portable_wchar_encoding_traits< traits >::eq ( const char_type lhs,
const char_type rhs 
)
inlinestatic

Returns whether the character lhs is to be treated equal to the character rhs.

template<class traits>
static bool stlencoders::portable_wchar_encoding_traits< traits >::eq_int_type ( const int_type lhs,
const int_type rhs 
)
inlinestatic

Returns whether the integral value lhs is to be treated equal to rhs.

template<class traits>
static int_type stlencoders::portable_wchar_encoding_traits< traits >::inv ( )
inlinestatic

Returns an integral value represented by no character in the encoding alphabet.

template<class traits>
static char_type stlencoders::portable_wchar_encoding_traits< traits >::pad ( )
inlinestatic

Returns the character used to perform padding at the end of a character sequence.

template<class traits>
static char_type stlencoders::portable_wchar_encoding_traits< traits >::to_char_type ( const int_type c)
inlinestatic

Converts an integral value to a character in the encoding alphabet.

Parameters
can integral value
Returns
the character representing c
template<class traits>
static char_type stlencoders::portable_wchar_encoding_traits< traits >::to_char_type_lower ( const int_type c)
inlinestatic

Converts an integral value to a lowercase character in the encoding alphabet.

Parameters
can integral value
Returns
the lowercase character representing c
template<class traits>
static char_type stlencoders::portable_wchar_encoding_traits< traits >::to_char_type_upper ( const int_type c)
inlinestatic

Converts an integral value to an uppercase character in the encoding alphabet.

Parameters
can integral value
Returns
the uppercase character representing c
template<class traits>
static int_type stlencoders::portable_wchar_encoding_traits< traits >::to_int_type ( const char_type c)
inlinestatic

Converts a character to an integral value.

Parameters
ca character
Returns
the integral value represented by c, or inv() for characters not in the encoding alphabet