ACE_UTF8_Encoding_Converter Class Reference

#include <UTF8_Encoding_Converter.h>

Inheritance diagram for ACE_UTF8_Encoding_Converter:
Inheritance graph
[legend]
Collaboration diagram for ACE_UTF8_Encoding_Converter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ACE_UTF8_Encoding_Converter (void)
virtual ~ACE_UTF8_Encoding_Converter (void)
 De-allocate the native converter.
virtual Result to_utf8 (const void *source, size_t source_size, ACE_Byte *target, size_t target_size, bool strict=true)
virtual Result from_utf8 (const ACE_Byte *source, size_t source_size, void *target, size_t target_size, bool strict=true)

Static Public Member Functions

static
ACE_UTF8_Encoding_Converter
encoded (const ACE_Byte *source, size_t source_size)

Private Attributes

ACE_Encoding_Converternative_

Detailed Description

Convert from UTF-16 or UTF-32 to UTF-8. This class implements the ACE_Encoding_Converter interface.


Constructor & Destructor Documentation

ACE_UTF8_Encoding_Converter::ACE_UTF8_Encoding_Converter ( void   ) 

Allocate the converter to be used by the from_utf8() method based on the size of the native wide character.

virtual ACE_UTF8_Encoding_Converter::~ACE_UTF8_Encoding_Converter ( void   )  [virtual]

De-allocate the native converter.


Member Function Documentation

static ACE_UTF8_Encoding_Converter* ACE_UTF8_Encoding_Converter::encoded ( const ACE_Byte source,
size_t  source_size 
) [static]

This factory helper method determines if the source stream is UTF-8 encoded. If it is, allocate an ACE_UTF8_Encoding_Converter and return it. The caller then owns the allocated object.

virtual Result ACE_UTF8_Encoding_Converter::from_utf8 ( const ACE_Byte source,
size_t  source_size,
void *  target,
size_t  target_size,
bool  strict = true 
) [virtual]

Utilize the native converter to convert the UTF-8 source into an alternate encoding and store it in the provided target buffer.

Implements ACE_Encoding_Converter.

virtual Result ACE_UTF8_Encoding_Converter::to_utf8 ( const void *  source,
size_t  source_size,
ACE_Byte target,
size_t  target_size,
bool  strict = true 
) [virtual]

Since the source *must be* UTF-8, there is no conversion required. This method just copies the source to the target given that there is enough space.

Implements ACE_Encoding_Converter.


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Fri Sep 11 03:59:00 2009 for ACE by  doxygen 1.6.1