Public Types | Static Public Member Functions | List of all members
Celartem::UtfTraits< UChar > Struct Template Reference

#include <cel_unicode.h>

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
outBufferPointer to buffer that receives the encoded result.
inCharCodeUCS-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
inPtrPointer to a buffer that stores the string.
outLengthOn 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(), and Celartem::String::getNthUnicodeChar().

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
inCharCodeUCS-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:

Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:06.
Cuminas Logo