template class axl::enc::UtfCodec
#include <axl_enc_CharCodec.h>
template <typename T>
class UtfCodec: public axl::enc::CharCodec
{
public:
// typedefs
typedef T::C C;
// construction
UtfCodec();
// methods
virtual
size_t
calcRequiredBufferSizeToEncode_utf8(
const utf8_t* p,
size_t length
);
virtual
size_t
calcRequiredBufferSizeToEncode_utf16(
const utf16_t* p,
size_t length
);
virtual
size_t
calcRequiredBufferSizeToEncode_utf32(
const utf32_t* p,
size_t length
);
virtual
size_t
encode_utf8(
void* buffer,
size_t bufferSize,
const utf8_t* p,
size_t length,
size_t* takenLength = NULL
);
virtual
size_t
encode_utf16(
void* buffer,
size_t bufferSize,
const utf16_t* p,
size_t length,
size_t* takenLength = NULL
);
virtual
size_t
encode_utf32(
void* buffer,
size_t bufferSize,
const utf32_t* p,
size_t length,
size_t* takenLength = NULL
);
virtual
size_t
calcRequiredBufferLengthToDecode_utf8(
const void* p,
size_t size
);
virtual
size_t
calcRequiredBufferLengthToDecode_utf16(
const void* p,
size_t size
);
virtual
size_t
calcRequiredBufferLengthToDecode_utf32(
const void* p,
size_t size
);
virtual
size_t
decode_utf8(
utf8_t* buffer,
size_t bufferLength,
const void* p,
size_t size,
size_t* takenSize = NULL
);
virtual
size_t
decode_utf16(
utf16_t* buffer,
size_t bufferLength,
const void* p,
size_t size,
size_t* takenSize = NULL
);
virtual
size_t
decode_utf32(
utf32_t* buffer,
size_t bufferLength,
const void* p,
size_t size,
size_t* takenSize = NULL
);
virtual
size_t
decode_utf32(
uchar_t* cplBuffer,
utf32_t* textBuffer,
size_t bufferLength,
const void* p,
size_t size,
size_t* takenSize = NULL
);
};
Inherited Members
public:
// methods
size_t
getUnitSize();
virtual
size_t
calcRequiredBufferSizeToEncode_utf8(
const utf8_t* p,
size_t length
) = 0;
virtual
size_t
calcRequiredBufferSizeToEncode_utf16(
const utf16_t* p,
size_t length
) = 0;
virtual
size_t
calcRequiredBufferSizeToEncode_utf32(
const utf32_t* p,
size_t length
) = 0;
size_t
calcRequiredBufferSizeToEncode_utf8(const sl::StringRef_utf8& string);
size_t
calcRequiredBufferSizeToEncode_utf16(const sl::StringRef_utf16& string);
size_t
calcRequiredBufferSizeToEncode_utf32(const sl::StringRef_utf32& string);
virtual
size_t
encode_utf8(
void* buffer,
size_t bufferSize,
const utf8_t* p,
size_t length,
size_t* takenLength = NULL
) = 0;
virtual
size_t
encode_utf16(
void* buffer,
size_t bufferSize,
const utf16_t* p,
size_t length,
size_t* takenLength = NULL
) = 0;
virtual
size_t
encode_utf32(
void* buffer,
size_t bufferSize,
const utf32_t* p,
size_t length,
size_t* takenLength = NULL
) = 0;
size_t
encode_utf8(
sl::Array<char>* buffer,
const utf8_t* p,
size_t length
);
size_t
encode_utf16(
sl::Array<char>* buffer,
const utf16_t* p,
size_t length
);
size_t
encode_utf32(
sl::Array<char>* buffer,
const utf32_t* p,
size_t length
);
size_t
encode_utf8(
sl::Array<char>* buffer,
const sl::StringRef_utf8& string
);
size_t
encode_utf16(
sl::Array<char>* buffer,
const sl::StringRef_utf16& string
);
size_t
encode_utf32(
sl::Array<char>* buffer,
const sl::StringRef_utf32& string
);
sl::Array<char>
encode_utf8(
const utf8_t* p,
size_t length
);
sl::Array<char>
encode_utf16(
const utf16_t* p,
size_t length
);
sl::Array<char>
encode_utf32(
const utf32_t* p,
size_t length
);
sl::Array<char>
encode_utf8(const sl::StringRef_utf8& string);
sl::Array<char>
encode_utf16(const sl::StringRef_utf16& string);
sl::Array<char>
encode_utf32(const sl::StringRef_utf32& string);
virtual
size_t
calcRequiredBufferLengthToDecode_utf8(
const void* p,
size_t size
) = 0;
virtual
size_t
calcRequiredBufferLengthToDecode_utf16(
const void* p,
size_t size
) = 0;
virtual
size_t
calcRequiredBufferLengthToDecode_utf32(
const void* p,
size_t size
) = 0;
virtual
size_t
decode_utf8(
utf8_t* buffer,
size_t bufferLength,
const void* p,
size_t size,
size_t* takenSize = NULL
) = 0;
virtual
size_t
decode_utf16(
utf16_t* buffer,
size_t bufferLength,
const void* p,
size_t size,
size_t* takenSize = NULL
) = 0;
virtual
size_t
decode_utf32(
utf32_t* buffer,
size_t bufferLength,
const void* p,
size_t size,
size_t* takenSize = NULL
) = 0;
virtual
size_t
decode_utf32(
uchar_t* cplBuffer,
utf32_t* textBuffer,
size_t bufferLength,
const void* p,
size_t size,
size_t* takenSize = NULL
) = 0;
size_t
decode_utf8(
sl::String_utf8* string,
const void* p,
size_t size
);
size_t
decode_utf16(
sl::String_utf16* string,
const void* p,
size_t size
);
size_t
decode_utf32(
sl::String_utf32* string,
const void* p,
size_t size
);
sl::String_utf8
decode_utf8(
const void* p,
size_t size
);
sl::String_utf16
decode_utf16(
const void* p,
size_t size
);
sl::String_utf32
decode_utf32(
const void* p,
size_t size
);