Open CASCADE Technology 6.6.0
|
Template class for Unicode strings support. It defines an iterator and provide correct way to read multi-byte text (UTF-8 and UTF-16) and convert it from one to another. The current value of iterator returned as UTF-32 Unicode code.
#include <NCollection_UtfIterator.hxx>
Public Member Functions | |
NCollection_UtfIterator (const Type *theString) | |
Constructor. | |
void | Init (const Type *theString) |
Initialize iterator within specified NULL-terminated string. | |
NCollection_UtfIterator & | operator++ () |
Pre-increment operator. Reads the next unicode character. Notice - no protection against overrun! | |
NCollection_UtfIterator | operator++ (int) |
Post-increment operator. Notice - no protection against overrun! | |
bool | operator== (const NCollection_UtfIterator &theRight) const |
Equality operator. | |
Standard_Utf32Char | operator* () const |
Dereference operator. | |
const Type * | BufferHere () const |
Buffer-fetching getter. | |
Type * | ChangeBufferHere () |
Buffer-fetching getter. Dangerous! Iterator should be reinitialized on buffer change. | |
const Type * | BufferNext () const |
Buffer-fetching getter. | |
Standard_Integer | Index () const |
Standard_Integer | AdvanceBytesUtf8 () const |
Standard_Integer | AdvanceBytesUtf16 () const |
Standard_Integer | AdvanceBytesUtf32 () const |
Standard_Utf8Char * | GetUtf8 (Standard_Utf8Char *theBuffer) const |
Fill the UTF-8 buffer within current Unicode symbol. Use method AdvanceUtf8() to allocate buffer with enough size. | |
Standard_Utf8UChar * | GetUtf8 (Standard_Utf8UChar *theBuffer) const |
Standard_Utf16Char * | GetUtf16 (Standard_Utf16Char *theBuffer) const |
Fill the UTF-16 buffer within current Unicode symbol. Use method AdvanceUtf16() to allocate buffer with enough size. | |
Standard_Utf32Char * | GetUtf32 (Standard_Utf32Char *theBuffer) const |
Fill the UTF-32 buffer within current Unicode symbol. Use method AdvanceUtf32() to allocate buffer with enough size. | |
template<typename TypeWrite > | |
Standard_Integer | AdvanceBytesUtf () const |
template<typename TypeWrite > | |
TypeWrite * | GetUtf (TypeWrite *theBuffer) const |
Fill the UTF-** buffer within current Unicode symbol. Use method AdvanceUtf**() to allocate buffer with enough size. |
NCollection_UtfIterator< Type >::NCollection_UtfIterator | ( | const Type * | theString | ) | [inline] |
theString | buffer to iterate |
Standard_Integer NCollection_UtfIterator< Type >::AdvanceBytesUtf | ( | ) | const |
Standard_Integer NCollection_UtfIterator< Type >::AdvanceBytesUtf16 | ( | ) | const |
Standard_Integer NCollection_UtfIterator< Type >::AdvanceBytesUtf32 | ( | ) | const [inline] |
Standard_Integer NCollection_UtfIterator< Type >::AdvanceBytesUtf8 | ( | ) | const |
const Type* NCollection_UtfIterator< Type >::BufferHere | ( | ) | const [inline] |
const Type* NCollection_UtfIterator< Type >::BufferNext | ( | ) | const [inline] |
Type* NCollection_UtfIterator< Type >::ChangeBufferHere | ( | ) | [inline] |
TypeWrite* NCollection_UtfIterator< Type >::GetUtf | ( | TypeWrite * | theBuffer | ) | const |
theBuffer | buffer to fill |
Standard_Utf16Char* NCollection_UtfIterator< Type >::GetUtf16 | ( | Standard_Utf16Char * | theBuffer | ) | const |
theBuffer | buffer to fill |
Standard_Utf32Char* NCollection_UtfIterator< Type >::GetUtf32 | ( | Standard_Utf32Char * | theBuffer | ) | const |
theBuffer | buffer to fill |
Standard_Utf8UChar* NCollection_UtfIterator< Type >::GetUtf8 | ( | Standard_Utf8UChar * | theBuffer | ) | const |
Standard_Utf8Char* NCollection_UtfIterator< Type >::GetUtf8 | ( | Standard_Utf8Char * | theBuffer | ) | const |
theBuffer | buffer to fill |
Standard_Integer NCollection_UtfIterator< Type >::Index | ( | ) | const [inline] |
void NCollection_UtfIterator< Type >::Init | ( | const Type * | theString | ) | [inline] |
Standard_Utf32Char NCollection_UtfIterator< Type >::operator* | ( | ) | const [inline] |
NCollection_UtfIterator& NCollection_UtfIterator< Type >::operator++ | ( | ) | [inline] |
NCollection_UtfIterator NCollection_UtfIterator< Type >::operator++ | ( | int | ) | [inline] |
bool NCollection_UtfIterator< Type >::operator== | ( | const NCollection_UtfIterator< Type > & | theRight | ) | const [inline] |