![]() |
VR-Link API Documentation for HLA Evolved
|
A single unicode character. More...
Collaboration diagram for DtUnicodeChar:Public Types | |
| typedef unsigned int | CodePoint |
| typedef unsigned short | Surrogate |
| typedef unsigned char | Octet |
| A Unicode Octet is 8bit byte used in UTF-8 encoding. More... | |
Public Member Functions | |
| DtUnicodeChar () | |
| DtUnicodeChar (const char c) | |
| Construct a unicode character for a character c. More... | |
| DtUnicodeChar (const wchar_t c) | |
| Construct a unicode character for a character c. More... | |
| DtUnicodeChar (const unsigned short s, const unsigned short c) | |
| Construct a pair of UTF-16 code units, where the first character must be a surrogate pair. More... | |
| DtUnicodeChar (const DtUnicodeChar &other) | |
| DtUnicodeChar & | operator= (const DtUnicodeChar &other) |
| bool | operator== (const DtUnicodeChar &other) const |
| bool | operator!= (const DtUnicodeChar &other) const |
| unsigned int | utf8Length () const |
| Calculate the utf-8 length of a code point. More... | |
| template<int sizeofWChar_t> | |
| unsigned int | wchartLength () const |
| unsigned int | wideStringLength () const |
| unsigned int | utf16Length () const |
| unsigned int | utf32Length () const |
| unsigned int | utf16CodeUnits () const |
| unsigned int | readUtf16 (const Surrogate *memory) |
| Read from UTF-16 encoded memory, Returns number of code units read, NOT number of bytes. More... | |
| void | writeUtf16 (Surrogate *memory) const |
| void | readUtf32 (const unsigned int *memory) |
| void | writeUtf32 (unsigned int *memory) const |
| unsigned int | readUtf8 (const unsigned char *memory) |
| void | writeUtf8 (char *memory) const |
| template<int sizeofWchart> | |
| void | writeWCharT (wchar_t *memory) const |
| void | writeWChar (wchar_t *memory) const |
| CodePoint | codePoint () const |
| template<> | |
| unsigned int | wchartLength () const |
| template<> | |
| unsigned int | wchartLength () const |
| template<> | |
| DtUnicodeChar::CodePoint | widechar (const wchar_t c) |
| template<> | |
| void | writeWCharT (wchar_t *memory) const |
| template<> | |
| void | writeWCharT (wchar_t *memory) const |
Static Public Member Functions | |
| template<int sizeof_wchar_t> | |
| static CodePoint | widechar (const wchar_t c) |
| static bool | isCodePointValid (CodePoint codePoint) |
| static bool | isSurrogateSubstringValid (const Surrogate *start, const Surrogate *end, const Surrogate *substringStart, const Surrogate *substringEnd) |
| static bool | isSurrogate (Surrogate cp) |
| static DtUnicodeChar | fromUtf32 (unsigned int character) |
| static CodePoint | decodeSurrogatePair (Surrogate hi, Surrogate lo) |
| static void | encodeSurrogatePair (CodePoint cp, Surrogate &hi, Surrogate &lo) |
| static unsigned int | utf8Length (const unsigned char c) |
| Get the length based upon the first character. More... | |
Static Public Attributes | |
| static const CodePoint | CodePointMax = 0x0010ffff |
| static const Surrogate | LeadSurrogateMin = 0xd800 |
| static const Surrogate | LeadSurrogateMax = 0xdbff |
| static const Surrogate | TrailSurrogateMin = 0xdc00 |
| static const Surrogate | TrailSurrogateMax = 0xdfff |
Protected Member Functions | |
| DtUnicodeChar (unsigned int utf32c) | |
Private Attributes | |
| CodePoint | myCodePoint |
A single unicode character.
| typedef unsigned int DtUnicodeChar::CodePoint |
| typedef unsigned char DtUnicodeChar::Octet |
A Unicode Octet is 8bit byte used in UTF-8 encoding.
| typedef unsigned short DtUnicodeChar::Surrogate |
|
inline |
Referenced by fromUtf32().
|
inlineexplicit |
Construct a unicode character for a character c.
C is assumed to be either ASCII or Latin-1
|
inlineexplicit |
Construct a unicode character for a character c.
C is assumed to be either UTF-16 or UTF-32 depending on encoding. If an invalid UTF-16 character is supplied an exception will be thrown.
|
inlineexplicit |
Construct a pair of UTF-16 code units, where the first character must be a surrogate pair.
References isSurrogate().
|
inline |
|
inlineprotected |
|
inline |
References myCodePoint.
Referenced by readUtf16().
|
inlinestatic |
References LeadSurrogateMin, and TrailSurrogateMin.
Referenced by writeUtf16().
|
inlinestatic |
| DtInvalidInput | if the character is not valid. |
References DtUnicodeChar(), and isCodePointValid().
References CodePointMax, and isSurrogate().
Referenced by fromUtf32().
References LeadSurrogateMin, and TrailSurrogateMax.
Referenced by DtUnicodeChar(), isCodePointValid(), and readUtf16().
|
inlinestatic |
References LeadSurrogateMin, and TrailSurrogateMin.
|
inline |
References myCodePoint.
|
inline |
References myCodePoint.
|
inline |
References myCodePoint.
Read from UTF-16 encoded memory, Returns number of code units read, NOT number of bytes.
References decodeSurrogatePair(), isSurrogate(), and myCodePoint.
|
inline |
References myCodePoint.
|
inline |
References myCodePoint.
|
inline |
References myCodePoint.
|
inline |
References myCodePoint.
|
inline |
|
inline |
Calculate the utf-8 length of a code point.
References myCodePoint.
|
inlinestatic |
Get the length based upon the first character.
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
References encodeSurrogatePair(), and myCodePoint.
|
inline |
References myCodePoint.
|
inline |
References myCodePoint.
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Referenced by isCodePointValid().
|
static |
|
static |
Referenced by encodeSurrogatePair(), isSurrogate(), and isSurrogateSubstringValid().
|
private |
Referenced by codePoint(), operator!=(), operator=(), operator==(), readUtf16(), readUtf32(), readUtf8(), utf16CodeUnits(), utf16Length(), utf8Length(), writeUtf16(), writeUtf32(), and writeUtf8().
|
static |
Referenced by isSurrogate().
|
static |
Referenced by encodeSurrogatePair(), and isSurrogateSubstringValid().