textwolf  0.2
Public Types | Public Member Functions | Static Public Member Functions | List of all members
textwolf::charset::UCS2< byteorder > Class Template Reference

Character set UCS-2 (little/big endian) More...

#include <charset_ucs.hpp>

Public Types

enum  {
  LSB =(byteorder==ByteOrder::BE), MSB =(byteorder==ByteOrder::LE), Print1shift =(byteorder==ByteOrder::BE)?8:0, Print2shift =(byteorder==ByteOrder::LE)?8:0,
  MaxChar =0xFFFFU
}
 

Public Member Functions

template<class Iterator >
UChar value (char *buf, unsigned int &bufpos, Iterator &itr) const
 See template<class Iterator>Interface::value(char*,unsigned int&,Iterator&) More...
 
template<class Buffer_ >
void print (UChar chr, Buffer_ &buf) const
 See template<class Buffer>Interface::print(UChar,Buffer&) More...
 

Static Public Member Functions

template<class Iterator >
static void skip (char *, unsigned int &bufpos, Iterator &itr)
 See template<class Iterator>Interface::skip(char*,unsigned int&,Iterator&) More...
 
template<class Iterator >
static void fetchbytes (char *buf, unsigned int &bufpos, Iterator &itr)
 See template<class Iterator>Interface::fetchbytes(char*,unsigned int&,Iterator&) More...
 
template<class Iterator >
static UChar value_impl (char *buf, unsigned int &bufpos, Iterator &itr)
 
template<class Iterator >
static signed char asciichar (char *buf, unsigned int &bufpos, Iterator &itr)
 See template<class Iterator>Interface::value(char*,unsigned int&,Iterator&) More...
 
static bool is_equal (const UCS2 &, const UCS2 &)
 See template<class Buffer>Interface::is_equal( const Interface&, const Interface&) More...
 

Detailed Description

template<int byteorder = ByteOrder::BE>
class textwolf::charset::UCS2< byteorder >

Character set UCS-2 (little/big endian)

Template Parameters
byteordercharset::ByteOrder::LE or charset::ByteOrder::BE UCS-2 encoding is defined to be big-endian only. Although the similar designations 'UCS-2BE and UCS-2LE imitate the UTF-16 labels, they do not represent official encoding schemes. (http://en.wikipedia.org/wiki/UTF-16/UCS-2) therefore we take byteorder=ByteOrder::BE as default.

Member Enumeration Documentation

template<int byteorder = ByteOrder::BE>
anonymous enum
Enumerator
LSB 
MSB 
Print1shift 
Print2shift 
MaxChar 

Member Function Documentation

template<int byteorder = ByteOrder::BE>
template<class Iterator >
static signed char textwolf::charset::UCS2< byteorder >::asciichar ( char *  buf,
unsigned int &  bufpos,
Iterator &  itr 
)
inlinestatic

See template<class Iterator>Interface::value(char*,unsigned int&,Iterator&)

template<int byteorder = ByteOrder::BE>
template<class Iterator >
static void textwolf::charset::UCS2< byteorder >::fetchbytes ( char *  buf,
unsigned int &  bufpos,
Iterator &  itr 
)
inlinestatic
template<int byteorder = ByteOrder::BE>
static bool textwolf::charset::UCS2< byteorder >::is_equal ( const UCS2< byteorder > &  ,
const UCS2< byteorder > &   
)
inlinestatic
template<int byteorder = ByteOrder::BE>
template<class Buffer_ >
void textwolf::charset::UCS2< byteorder >::print ( UChar  chr,
Buffer_ &  buf 
) const
inline

See template<class Buffer>Interface::print(UChar,Buffer&)

template<int byteorder = ByteOrder::BE>
template<class Iterator >
static void textwolf::charset::UCS2< byteorder >::skip ( char *  ,
unsigned int &  bufpos,
Iterator &  itr 
)
inlinestatic
template<int byteorder = ByteOrder::BE>
template<class Iterator >
UChar textwolf::charset::UCS2< byteorder >::value ( char *  buf,
unsigned int &  bufpos,
Iterator &  itr 
) const
inline

See template<class Iterator>Interface::value(char*,unsigned int&,Iterator&)

template<int byteorder = ByteOrder::BE>
template<class Iterator >
static UChar textwolf::charset::UCS2< byteorder >::value_impl ( char *  buf,
unsigned int &  bufpos,
Iterator &  itr 
)
inlinestatic

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