Public Types | Static Public Member Functions | List of all members
Celartem::Converter< CharSrc, CharDest, SrcTraits, DestTraits > Struct Template Reference

#include <cel_uniconv.h>

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 
)
inlinestatic

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

Parameters
srcA string to convert.
lengthThe 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 
)
inlinestatic

This function converts the specified string.

Parameters
bufferBuffer to receive the result.
srcA string to convert.
lengthThe length of the string.

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:07.
Cuminas Logo