Public Types | Public Member Functions | Private Member Functions | Private Attributes
Poco::TextConverter Class Reference

#include <TextConverter.h>

List of all members.

Public Types

typedef int(* Transform )(int)

Public Member Functions

int convert (const std::string &source, std::string &destination, Transform trans)
 Destroys the TextConverter.
int convert (const void *source, int length, std::string &destination, Transform trans)
int convert (const std::string &source, std::string &destination)
int convert (const void *source, int length, std::string &destination)
 TextConverter (const TextEncoding &inEncoding, const TextEncoding &outEncoding, int defaultChar= '?')
 Transform function for convert.
 ~TextConverter ()

Private Member Functions

TextConverteroperator= (const TextConverter &)
 TextConverter ()
 TextConverter (const TextConverter &)

Private Attributes

int _defaultChar
const TextEncoding_inEncoding
const TextEncoding_outEncoding

Detailed Description

A TextConverter converts strings from one encoding into another.

Definition at line 52 of file TextConverter.h.


Member Typedef Documentation

typedef int(* Poco::TextConverter::Transform)(int)

Definition at line 57 of file TextConverter.h.


Constructor & Destructor Documentation

Poco::TextConverter::TextConverter ( const TextEncoding inEncoding,
const TextEncoding outEncoding,
int  defaultChar = '?' 
)

Transform function for convert.

Definition at line 53 of file TextConverter.cpp.

Creates the TextConverter. The encoding objects must not be deleted while the TextConverter is in use.

Definition at line 61 of file TextConverter.cpp.

Converts the source buffer from inEncoding to outEncoding and appends the result to destination. If a character cannot be represented in outEncoding, defaultChar is used instead. Returns the number of encoding errors (invalid byte sequences in source).


Member Function Documentation

int Poco::TextConverter::convert ( const std::string &  source,
std::string &  destination,
Transform  trans 
)

Destroys the TextConverter.

Definition at line 66 of file TextConverter.cpp.

int Poco::TextConverter::convert ( const void *  source,
int  length,
std::string &  destination,
Transform  trans 
)

Converts the source string from inEncoding to outEncoding and appends the result to destination. Every character is passed to the transform function. If a character cannot be represented in outEncoding, defaultChar is used instead. Returns the number of encoding errors (invalid byte sequences in source).

Definition at line 88 of file TextConverter.cpp.

int Poco::TextConverter::convert ( const std::string &  source,
std::string &  destination 
)

Converts the source buffer from inEncoding to outEncoding and appends the result to destination. Every character is passed to the transform function. If a character cannot be represented in outEncoding, defaultChar is used instead. Returns the number of encoding errors (invalid byte sequences in source).

Definition at line 137 of file TextConverter.cpp.

int Poco::TextConverter::convert ( const void *  source,
int  length,
std::string &  destination 
)

Converts the source string from inEncoding to outEncoding and appends the result to destination. If a character cannot be represented in outEncoding, defaultChar is used instead. Returns the number of encoding errors (invalid byte sequences in source).

Definition at line 143 of file TextConverter.cpp.

TextConverter& Poco::TextConverter::operator= ( const TextConverter ) [private]

Member Data Documentation

Definition at line 108 of file TextConverter.h.

Definition at line 106 of file TextConverter.h.

Definition at line 107 of file TextConverter.h.


The documentation for this class was generated from the following files:


pluginlib
Author(s): Tully Foote and Eitan Marder-Eppstein
autogenerated on Sat Dec 28 2013 17:20:20