xoreos
0.0.5
|
A manager handling string encoding conversions. More...
Public Member Functions | |
ConversionManager () | |
~ConversionManager () | |
bool | hasSupportTranscode (Encoding from, Encoding to) |
UString | convert (Encoding encoding, byte *data, size_t n) |
MemoryReadStream * | convert (Encoding encoding, const UString &str, bool terminate=true) |
Private Member Functions | |
byte * | doConvert (iconv_t &ctx, byte *data, size_t nIn, size_t nOut, size_t &size) |
UString | convert (iconv_t &ctx, byte *data, size_t n, size_t growth, size_t termSize) |
MemoryReadStream * | convert (iconv_t &ctx, const UString &str, size_t growth, size_t termSize) |
Private Attributes | |
iconv_t | _contextFrom [kEncodingMAX] |
iconv_t | _contextTo [kEncodingMAX] |
Additional Inherited Members | |
Static Public Member Functions inherited from Common::Singleton< ConversionManager > | |
static ConversionManager & | instance () |
static void | destroy () |
Protected Types inherited from Common::Singleton< ConversionManager > | |
typedef ConversionManager | SingletonBaseType |
Protected Member Functions inherited from Common::Singleton< ConversionManager > | |
Singleton () | |
virtual | ~Singleton () |
A manager handling string encoding conversions.
Definition at line 60 of file encoding.cpp.
|
inline |
Definition at line 62 of file encoding.cpp.
References _contextFrom, _contextTo, Common::kEncodingMAX, Common::kEncodingName, and warning().
|
inline |
Definition at line 77 of file encoding.cpp.
References _contextFrom, _contextTo, and Common::kEncodingMAX.
Definition at line 100 of file encoding.cpp.
References _contextFrom, Common::kEncodingGrowthFrom, and Common::kEncodingMAX.
Referenced by convert().
|
inline |
Definition at line 107 of file encoding.cpp.
References _contextTo, convert(), Common::kEncodingGrowthTo, Common::kEncodingMAX, and Common::kTerminatorLength.
|
inlineprivate |
Definition at line 143 of file encoding.cpp.
References doConvert(), and Common::ScopedPtrBase< T, Deallocator >::get().
|
inlineprivate |
Definition at line 158 of file encoding.cpp.
References Common::UString::c_str(), doConvert(), and Common::ScopedPtrBase< T, Deallocator >::release().
|
inlineprivate |
Definition at line 119 of file encoding.cpp.
References Common::ScopedPtrBase< T, Deallocator >::get(), Common::ScopedPtrBase< T, Deallocator >::release(), and warning().
Referenced by convert().
Definition at line 86 of file encoding.cpp.
References _contextFrom, _contextTo, Common::kEncodingMAX, and Common::kEncodingUTF8.
|
private |
Definition at line 116 of file encoding.cpp.
Referenced by ConversionManager(), convert(), hasSupportTranscode(), and ~ConversionManager().
|
private |
Definition at line 117 of file encoding.cpp.
Referenced by ConversionManager(), convert(), hasSupportTranscode(), and ~ConversionManager().