Unravel Engine C++ Reference
Loading...
Searching...
No Matches
utf8::internal Namespace Reference

Enumerations

enum  utf_error {
  UTF8_OK , NOT_ENOUGH_ROOM , INVALID_LEAD , INCOMPLETE_SEQUENCE ,
  OVERLONG_SEQUENCE , INVALID_CODE_POINT
}
 

Functions

template<typename octet_type >
utfchar8_t mask8 (octet_type oc)
 
template<typename u16_type >
utfchar16_t mask16 (u16_type oc)
 
template<typename octet_type >
bool is_trail (octet_type oc)
 
bool is_lead_surrogate (utfchar32_t cp)
 
bool is_trail_surrogate (utfchar32_t cp)
 
bool is_surrogate (utfchar32_t cp)
 
bool is_code_point_valid (utfchar32_t cp)
 
bool is_in_bmp (utfchar32_t cp)
 
template<typename octet_iterator >
int sequence_length (octet_iterator lead_it)
 
bool is_overlong_sequence (utfchar32_t cp, int length)
 
template<typename octet_iterator >
utf_error increase_safely (octet_iterator &it, const octet_iterator end)
 Helper for get_sequence_x.
 
template<typename octet_iterator >
utf_error get_sequence_1 (octet_iterator &it, octet_iterator end, utfchar32_t &code_point)
 get_sequence_x functions decode utf-8 sequences of the length x
 
template<typename octet_iterator >
utf_error get_sequence_2 (octet_iterator &it, octet_iterator end, utfchar32_t &code_point)
 
template<typename octet_iterator >
utf_error get_sequence_3 (octet_iterator &it, octet_iterator end, utfchar32_t &code_point)
 
template<typename octet_iterator >
utf_error get_sequence_4 (octet_iterator &it, octet_iterator end, utfchar32_t &code_point)
 
template<typename octet_iterator >
utf_error validate_next (octet_iterator &it, octet_iterator end, utfchar32_t &code_point)
 
template<typename octet_iterator >
utf_error validate_next (octet_iterator &it, octet_iterator end)
 
template<typename word_iterator >
utf_error validate_next16 (word_iterator &it, word_iterator end, utfchar32_t &code_point)
 
template<typename octet_iterator , typename octet_type >
octet_iterator append (utfchar32_t cp, octet_iterator result)
 
char * append (utfchar32_t cp, char *result)
 
template<typename container_type >
std::back_insert_iterator< container_type > append (utfchar32_t cp, std::back_insert_iterator< container_type > result)
 
template<typename octet_iterator >
octet_iterator append (utfchar32_t cp, octet_iterator result)
 
template<typename word_iterator , typename word_type >
word_iterator append16 (utfchar32_t cp, word_iterator result)
 
template<typename container_type >
std::back_insert_iterator< container_type > append16 (utfchar32_t cp, std::back_insert_iterator< container_type > result)
 
template<typename word_iterator >
word_iterator append16 (utfchar32_t cp, word_iterator result)
 

Variables

const utfchar16_t LEAD_SURROGATE_MIN = 0xd800u
 
const utfchar16_t LEAD_SURROGATE_MAX = 0xdbffu
 
const utfchar16_t TRAIL_SURROGATE_MIN = 0xdc00u
 
const utfchar16_t TRAIL_SURROGATE_MAX = 0xdfffu
 
const utfchar16_t LEAD_OFFSET = 0xd7c0u
 
const utfchar32_t SURROGATE_OFFSET = 0xfca02400u
 
const utfchar32_t CODE_POINT_MAX = 0x0010ffffu
 

Enumeration Type Documentation

◆ utf_error

Enumerator
UTF8_OK 
NOT_ENOUGH_ROOM 
INVALID_LEAD 
INCOMPLETE_SEQUENCE 
OVERLONG_SEQUENCE 
INVALID_CODE_POINT 

Definition at line 165 of file core.h.

Function Documentation

◆ append() [1/4]

char * utf8::internal::append ( utfchar32_t cp,
char * result )
inline

Definition at line 381 of file core.h.

◆ append() [2/4]

template<typename octet_iterator , typename octet_type >
octet_iterator utf8::internal::append ( utfchar32_t cp,
octet_iterator result )

Definition at line 357 of file core.h.

◆ append() [3/4]

template<typename octet_iterator >
octet_iterator utf8::internal::append ( utfchar32_t cp,
octet_iterator result )

Definition at line 398 of file core.h.

◆ append() [4/4]

template<typename container_type >
std::back_insert_iterator< container_type > utf8::internal::append ( utfchar32_t cp,
std::back_insert_iterator< container_type > result )

Definition at line 388 of file core.h.

◆ append16() [1/3]

template<typename container_type >
std::back_insert_iterator< container_type > utf8::internal::append16 ( utfchar32_t cp,
std::back_insert_iterator< container_type > result )

Definition at line 421 of file core.h.

◆ append16() [2/3]

template<typename word_iterator , typename word_type >
word_iterator utf8::internal::append16 ( utfchar32_t cp,
word_iterator result )

Definition at line 406 of file core.h.

◆ append16() [3/3]

template<typename word_iterator >
word_iterator utf8::internal::append16 ( utfchar32_t cp,
word_iterator result )

Definition at line 431 of file core.h.

◆ get_sequence_1()

template<typename octet_iterator >
utf_error utf8::internal::get_sequence_1 ( octet_iterator & it,
octet_iterator end,
utfchar32_t & code_point )

get_sequence_x functions decode utf-8 sequences of the length x

Definition at line 184 of file core.h.

◆ get_sequence_2()

template<typename octet_iterator >
utf_error utf8::internal::get_sequence_2 ( octet_iterator & it,
octet_iterator end,
utfchar32_t & code_point )

Definition at line 195 of file core.h.

◆ get_sequence_3()

template<typename octet_iterator >
utf_error utf8::internal::get_sequence_3 ( octet_iterator & it,
octet_iterator end,
utfchar32_t & code_point )

Definition at line 210 of file core.h.

◆ get_sequence_4()

template<typename octet_iterator >
utf_error utf8::internal::get_sequence_4 ( octet_iterator & it,
octet_iterator end,
utfchar32_t & code_point )

Definition at line 229 of file core.h.

◆ increase_safely()

template<typename octet_iterator >
utf_error utf8::internal::increase_safely ( octet_iterator & it,
const octet_iterator end )

Helper for get_sequence_x.

Definition at line 169 of file core.h.

◆ is_code_point_valid()

bool utf8::internal::is_code_point_valid ( utfchar32_t cp)
inline

Definition at line 122 of file core.h.

◆ is_in_bmp()

bool utf8::internal::is_in_bmp ( utfchar32_t cp)
inline

Definition at line 127 of file core.h.

◆ is_lead_surrogate()

bool utf8::internal::is_lead_surrogate ( utfchar32_t cp)
inline

Definition at line 107 of file core.h.

◆ is_overlong_sequence()

bool utf8::internal::is_overlong_sequence ( utfchar32_t cp,
int length )
inline

Definition at line 148 of file core.h.

◆ is_surrogate()

bool utf8::internal::is_surrogate ( utfchar32_t cp)
inline

Definition at line 117 of file core.h.

◆ is_trail()

template<typename octet_type >
bool utf8::internal::is_trail ( octet_type oc)
inline

Definition at line 102 of file core.h.

◆ is_trail_surrogate()

bool utf8::internal::is_trail_surrogate ( utfchar32_t cp)
inline

Definition at line 112 of file core.h.

◆ mask16()

template<typename u16_type >
utfchar16_t utf8::internal::mask16 ( u16_type oc)
inline

Definition at line 96 of file core.h.

◆ mask8()

template<typename octet_type >
utfchar8_t utf8::internal::mask8 ( octet_type oc)
inline

Definition at line 91 of file core.h.

◆ sequence_length()

template<typename octet_iterator >
int utf8::internal::sequence_length ( octet_iterator lead_it)

Definition at line 133 of file core.h.

◆ validate_next() [1/2]

template<typename octet_iterator >
utf_error utf8::internal::validate_next ( octet_iterator & it,
octet_iterator end )
inline

Definition at line 308 of file core.h.

◆ validate_next() [2/2]

template<typename octet_iterator >
utf_error utf8::internal::validate_next ( octet_iterator & it,
octet_iterator end,
utfchar32_t & code_point )

Definition at line 254 of file core.h.

◆ validate_next16()

template<typename word_iterator >
utf_error utf8::internal::validate_next16 ( word_iterator & it,
word_iterator end,
utfchar32_t & code_point )

Definition at line 314 of file core.h.

Variable Documentation

◆ CODE_POINT_MAX

const utfchar32_t utf8::internal::CODE_POINT_MAX = 0x0010ffffu

Definition at line 88 of file core.h.

◆ LEAD_OFFSET

const utfchar16_t utf8::internal::LEAD_OFFSET = 0xd7c0u

Definition at line 84 of file core.h.

◆ LEAD_SURROGATE_MAX

const utfchar16_t utf8::internal::LEAD_SURROGATE_MAX = 0xdbffu

Definition at line 81 of file core.h.

◆ LEAD_SURROGATE_MIN

const utfchar16_t utf8::internal::LEAD_SURROGATE_MIN = 0xd800u

Definition at line 80 of file core.h.

◆ SURROGATE_OFFSET

const utfchar32_t utf8::internal::SURROGATE_OFFSET = 0xfca02400u

Definition at line 85 of file core.h.

◆ TRAIL_SURROGATE_MAX

const utfchar16_t utf8::internal::TRAIL_SURROGATE_MAX = 0xdfffu

Definition at line 83 of file core.h.

◆ TRAIL_SURROGATE_MIN

const utfchar16_t utf8::internal::TRAIL_SURROGATE_MIN = 0xdc00u

Definition at line 82 of file core.h.