Public Types | Static Public Member Functions

Celartem::UtfTraits< UChar > Struct Template Reference

#include <cel_unicode.h>

List of all members.

Public Types

enum  
 

Bytes per element.

More...

Static Public Member Functions

static UChar4 getCharcode (const UChar *inPtr, size_t &outLength)
static size_t encode (UChar *outBuffer, UChar4 inCharCode)
static size_t getCharSize (UChar4 inCharCode)

Detailed Description

template<typename UChar>
struct Celartem::UtfTraits< UChar >

The definition of UtfTraits. This structure is not actually implemented and usually specialized versions should be used.
If you want to use instanciate StringUtil, use UnicodeCharTraits instead of this structure.

See also:
UtfTraits<UChar4>, UtfTraits<UChar2>, UtfTraits<UChar1>
StringUtil, UnicodeCharTraits

Member Enumeration Documentation

template<typename UChar >
anonymous enum

Bytes per element.


Member Function Documentation

template<typename UChar >
static size_t Celartem::UtfTraits< UChar >::encode ( UChar *  outBuffer,
UChar4  inCharCode 
) [static]

This function encode the specified UCS-4 character code and write it on buffer.

Parameters:
outBuffer Pointer to buffer that receives the encoded result.
inCharCode UCS-4 character code to be encoded.
Returns:
The length of the encoded result in entries.
template<typename UChar >
static UChar4 Celartem::UtfTraits< UChar >::getCharcode ( const UChar *  inPtr,
size_t &  outLength 
) [static]

This function extract an UCS-4 character code from the specified pointer position.

Parameters:
inPtr Pointer to a buffer that stores the string.
outLength On return, the length of the entries used by the UCS-4 character code is returned to this variable. You can add this value to the pointer to make a pointer that points to the next UCS-4 character.
Returns:
UCS-4 character code.

Referenced by Celartem::UnicodeCharTraits< T >::getCharcode().

template<typename UChar >
static size_t Celartem::UtfTraits< UChar >::getCharSize ( UChar4  inCharCode  )  [static]

This function returns the length of the encoded result of the specified UCS-4 character code.

Parameters:
inCharCode UCS-4 character code to be encoded.
Returns:
The length of the encoded result in entries.

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

This document is made with doxygen 1.7.1 at Thu Feb 17 2011 15:40:19.
Caminova Logo