Webmaster  |  Imprint 
C++ Server Pages
Main  |  License  |  Documentation  |  Download 

TextCodec Class Template Reference

Generic TextCodec class/facet which may be subclassed by specific Codec classes. More...

#include <cxxtools/textcodec.h>

Inheritance diagram for TextCodec:

Utf8Codec

List of all members.

Public Types

typedef I InternT
typedef E ExternT

Public Member Functions

 TextCodec (size_t ref=0)
 Constructs a new TextCodec object.
virtual ~TextCodec ()
 Empty desctructor.
size_t refs () const


Detailed Description

template<typename I, typename E>
class cxxtools::TextCodec< I, E >

This class contains default implementations for the methods do_unshift(), do_encoding() and do_always_noconv() so sub-classes do not have to implement this default behaviour.

Codecs are used to convert one Text-encoding into another Text-encoding. The internal and external data type can be specified using the template parameter 'I' (internal) and 'E' (external).

When used on a platform which supports locales and facets the conversion may use locale-specific conversion of the Text.

This class derives from facet std::codecvt. Further documentation can be found there.

Parameters:
I The character type associated with the internal code set.
E The character type associated with the external code set.
See also:
Utf8Codec

Utf16Codec

Utf32Codec


Constructor & Destructor Documentation

TextCodec ( size_t  ref = 0  ) 

The internal and external type are specified by the template parameters of the class.

Parameters:
ref This parameter is passed to std::codecvt. When ref == 0 the locale takes care of deleting the facet. If ref == 1 the locale does not destroy the facet.

Copyright © 2008 The Tntnet Development Team
Tntnet 1.6