Public Types | Static Public Member Functions

Celartem::Converter< CharSrc, CharDest, SrcTraits, DestTraits > Struct Template Reference

#include <cel_uniconv.h>

List of all members.

Public Types

enum  { AUTOSIZE = -1 }

Static Public Member Functions

static size_t bufferSize (const CharSrc *src, size_t length=AUTOSIZE)
static void convert (CharDest *CEL_RESTRICT buffer, const CharSrc *CEL_RESTRICT src, size_t length=AUTOSIZE)

Detailed Description

template<typename CharSrc, typename CharDest, typename SrcTraits = UtfTraits<CharSrc>, typename DestTraits = UtfTraits<CharDest>>
struct Celartem::Converter< CharSrc, CharDest, SrcTraits, DestTraits >

This struct provides the string conversion routine between CharSrc and CharDest. If you don't specify SrcTraits and/or DestTraits explicitly, it automatically uses UtfTraits < CharSrc > and/or UtfTraits < CharDest >.


Member Enumeration Documentation

template<typename CharSrc , typename CharDest , typename SrcTraits = UtfTraits<CharSrc>, typename DestTraits = UtfTraits<CharDest>>
anonymous enum
Enumerator:
AUTOSIZE 

This is to indicate the string is '\0' terminated and the length should be automatically calculated.


Member Function Documentation

template<typename CharSrc , typename CharDest , typename SrcTraits = UtfTraits<CharSrc>, typename DestTraits = UtfTraits<CharDest>>
static size_t Celartem::Converter< CharSrc, CharDest, SrcTraits, DestTraits >::bufferSize ( const CharSrc *  src,
size_t  length = AUTOSIZE 
) [inline, static]

This function calculates the buffer size (in entries) needed to convert the specified string.

Parameters:
src A string to convert.
length The length of the string.
template<typename CharSrc , typename CharDest , typename SrcTraits = UtfTraits<CharSrc>, typename DestTraits = UtfTraits<CharDest>>
static void Celartem::Converter< CharSrc, CharDest, SrcTraits, DestTraits >::convert ( CharDest *CEL_RESTRICT  buffer,
const CharSrc *CEL_RESTRICT  src,
size_t  length = AUTOSIZE 
) [inline, static]

This function converts the specified string.

Parameters:
buffer Buffer to receive the result.
src A string to convert.
length The length of the string.

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