The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Static Public Member Functions | List of all members
ucs4_convert_impl::utf8_impl Struct Reference

#include <ucs4_convert_impl.hpp>

Static Public Member Functions

static const char * get_name ()
 
static size_t byte_size_from_ucs4_codepoint (ucs4::char_t ch)
 
static int byte_size_from_utf8_first (utf8::char_t ch)
 
template<typename writer >
static void write (writer out, ucs4::char_t ch)
 Writes a UCS-4 character to a UTF-8 stream. More...
 
template<typename iitor_t >
static ucs4::char_t read (iitor_t &input, const iitor_t &end)
 Reads a UCS-4 character from a UTF-8 stream. More...
 

Detailed Description

Definition at line 24 of file ucs4_convert_impl.hpp.

Member Function Documentation

static size_t ucs4_convert_impl::utf8_impl::byte_size_from_ucs4_codepoint ( ucs4::char_t  ch)
inlinestatic

Definition at line 27 of file ucs4_convert_impl.hpp.

Referenced by read(), and write().

static int ucs4_convert_impl::utf8_impl::byte_size_from_utf8_first ( utf8::char_t  ch)
inlinestatic

Definition at line 45 of file ucs4_convert_impl.hpp.

References count_leading_ones().

Referenced by read().

static const char* ucs4_convert_impl::utf8_impl::get_name ( )
inlinestatic

Definition at line 26 of file ucs4_convert_impl.hpp.

template<typename iitor_t >
static ucs4::char_t ucs4_convert_impl::utf8_impl::read ( iitor_t &  input,
const iitor_t &  end 
)
inlinestatic

Reads a UCS-4 character from a UTF-8 stream.

Parameters
inputAn iterator pointing to the first character of a UTF-8 sequence to read.
endAn iterator pointing to the end of the UTF-8 sequence to read.

Definition at line 96 of file ucs4_convert_impl.hpp.

References byte_size_from_ucs4_codepoint(), byte_size_from_utf8_first(), and i.

template<typename writer >
static void ucs4_convert_impl::utf8_impl::write ( writer  out,
ucs4::char_t  ch 
)
inlinestatic

Writes a UCS-4 character to a UTF-8 stream.

Parameters
outAn object to write utf8::char_t. Required operations: 1) push(utf8::char_t) to write a single character 2) can_push(size_t n) to check whether there is still enough space for n characters.
chThe UCS-4 character to write to the stream.

Definition at line 70 of file ucs4_convert_impl.hpp.

References byte_size_from_ucs4_codepoint().


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