HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
hi::v1::char_map< Encoding > Struct Template Reference

Detailed Description

template<fixed_string Encoding>
struct hi::v1::char_map< Encoding >

Character encoder/decoder template.

Template Parameters
Encodinga string-tag representing the encoding.

Implementations have to define the following members:

Character type.

char_type

Read a single code-point

constexpr std::pair<char32_t, bool> read(char_type const *& ptr, char_type const *last) const noexcept
@ read
Allow read access to a file.

Determine number of code-units for a code-point.

constexpr std::pair<uint8_t, bool> size(char32_t code_point) const noexcept

Encode a single code-point.

constexpr void write(char32_t code_point, char_type *&ptr) const noexcept
@ write
Allow write access to a file.

Read a chunk of ASCII characters.

__m128i read_ascii_chunk16(char_type const *ptr) const noexcept

read_ascii_chunk16() returns a 16 byte register. The implementation of this function must set the high-bit of each non-ASCII character.

Write a chunk of ASCII characters.

void write_ascii_chunk16(__m128i chunk, char_type *ptr) const noexcept

The documentation for this struct was generated from the following file: