Unravel Engine C++ Reference
Loading...
Searching...
No Matches
core.h File Reference
#include <iterator>
#include <cstring>
#include <string>

Go to the source code of this file.

Classes

struct  StaticAssert< Condition >
 
struct  StaticAssert< true >
 

Namespaces

namespace  utf8
 
namespace  utf8::internal
 

Macros

#define UTF_CPP_CPLUSPLUS   __cplusplus
 
#define UTF_CPP_OVERRIDE
 
#define UTF_CPP_NOEXCEPT   throw()
 
#define UTF_CPP_STATIC_ASSERT(condition)
 
#define UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(IT, END)
 

Typedefs

typedef unsigned char utf8::utfchar8_t
 
typedef unsigned short utf8::utfchar16_t
 
typedef unsigned int utf8::utfchar32_t
 

Enumerations

enum  utf8::internal::utf_error {
  utf8::internal::UTF8_OK , utf8::internal::NOT_ENOUGH_ROOM , utf8::internal::INVALID_LEAD , utf8::internal::INCOMPLETE_SEQUENCE ,
  utf8::internal::OVERLONG_SEQUENCE , utf8::internal::INVALID_CODE_POINT
}
 

Functions

template<typename octet_type >
utfchar8_t utf8::internal::mask8 (octet_type oc)
 
template<typename u16_type >
utfchar16_t utf8::internal::mask16 (u16_type oc)
 
template<typename octet_type >
bool utf8::internal::is_trail (octet_type oc)
 
bool utf8::internal::is_lead_surrogate (utfchar32_t cp)
 
bool utf8::internal::is_trail_surrogate (utfchar32_t cp)
 
bool utf8::internal::is_surrogate (utfchar32_t cp)
 
bool utf8::internal::is_code_point_valid (utfchar32_t cp)
 
bool utf8::internal::is_in_bmp (utfchar32_t cp)
 
template<typename octet_iterator >
int utf8::internal::sequence_length (octet_iterator lead_it)
 
bool utf8::internal::is_overlong_sequence (utfchar32_t cp, int length)
 
template<typename octet_iterator >
utf_error utf8::internal::increase_safely (octet_iterator &it, const octet_iterator end)
 Helper for get_sequence_x.
 
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
 
template<typename octet_iterator >
utf_error utf8::internal::get_sequence_2 (octet_iterator &it, octet_iterator end, utfchar32_t &code_point)
 
template<typename octet_iterator >
utf_error utf8::internal::get_sequence_3 (octet_iterator &it, octet_iterator end, utfchar32_t &code_point)
 
template<typename octet_iterator >
utf_error utf8::internal::get_sequence_4 (octet_iterator &it, octet_iterator end, utfchar32_t &code_point)
 
template<typename octet_iterator >
utf_error utf8::internal::validate_next (octet_iterator &it, octet_iterator end, utfchar32_t &code_point)
 
template<typename octet_iterator >
utf_error utf8::internal::validate_next (octet_iterator &it, octet_iterator end)
 
template<typename word_iterator >
utf_error utf8::internal::validate_next16 (word_iterator &it, word_iterator end, utfchar32_t &code_point)
 
template<typename octet_iterator , typename octet_type >
octet_iterator utf8::internal::append (utfchar32_t cp, octet_iterator result)
 
char * utf8::internal::append (utfchar32_t cp, char *result)
 
template<typename container_type >
std::back_insert_iterator< container_type > utf8::internal::append (utfchar32_t cp, std::back_insert_iterator< container_type > result)
 
template<typename octet_iterator >
octet_iterator utf8::internal::append (utfchar32_t cp, octet_iterator result)
 
template<typename word_iterator , typename word_type >
word_iterator utf8::internal::append16 (utfchar32_t cp, word_iterator result)
 
template<typename container_type >
std::back_insert_iterator< container_type > utf8::internal::append16 (utfchar32_t cp, std::back_insert_iterator< container_type > result)
 
template<typename word_iterator >
word_iterator utf8::internal::append16 (utfchar32_t cp, word_iterator result)
 
template<typename octet_iterator >
octet_iterator utf8::find_invalid (octet_iterator start, octet_iterator end)
 
const char * utf8::find_invalid (const char *str)
 
std::size_t utf8::find_invalid (const std::string &s)
 
template<typename octet_iterator >
bool utf8::is_valid (octet_iterator start, octet_iterator end)
 
bool utf8::is_valid (const char *str)
 
bool utf8::is_valid (const std::string &s)
 
template<typename octet_iterator >
bool utf8::starts_with_bom (octet_iterator it, octet_iterator end)
 
bool utf8::starts_with_bom (const std::string &s)
 

Variables

const utfchar16_t utf8::internal::LEAD_SURROGATE_MIN = 0xd800u
 
const utfchar16_t utf8::internal::LEAD_SURROGATE_MAX = 0xdbffu
 
const utfchar16_t utf8::internal::TRAIL_SURROGATE_MIN = 0xdc00u
 
const utfchar16_t utf8::internal::TRAIL_SURROGATE_MAX = 0xdfffu
 
const utfchar16_t utf8::internal::LEAD_OFFSET = 0xd7c0u
 
const utfchar32_t utf8::internal::SURROGATE_OFFSET = 0xfca02400u
 
const utfchar32_t utf8::internal::CODE_POINT_MAX = 0x0010ffffu
 
const utfchar8_t utf8::bom [] = {0xef, 0xbb, 0xbf}
 The library API - functions intended to be called by the users.
 

Macro Definition Documentation

◆ UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR

#define UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR ( IT,
END )
Value:
{utf_error ret = increase_safely(IT, END); if (ret != UTF8_OK) return ret;}

Definition at line 180 of file core.h.

◆ UTF_CPP_CPLUSPLUS

#define UTF_CPP_CPLUSPLUS   __cplusplus

Definition at line 40 of file core.h.

◆ UTF_CPP_NOEXCEPT

#define UTF_CPP_NOEXCEPT   throw()

Definition at line 49 of file core.h.

◆ UTF_CPP_OVERRIDE

#define UTF_CPP_OVERRIDE

Definition at line 48 of file core.h.

◆ UTF_CPP_STATIC_ASSERT

#define UTF_CPP_STATIC_ASSERT ( condition)
Value:

Definition at line 53 of file core.h.