StringEncoding
INCLUDE FILE
#include "StringEncoding.h"
class StringEncoding
DEFINITION
class StringEncoding;
class CharacterRangeprivate
DEFINITION
class CharacterRange;
constructor CharacterRange
DEFINITION
| CharacterRange | ( | char32_t source_start, | |
| uint8_t target_start, | |||
| uint8_t length | ); |
| PARAMETER | DESCRIPTION |
|---|---|
source_start |
|
target_start |
|
length |
method encodeconst
DEFINITION
| std::optional< uint8_t > encode | ( | char32_t codepoint | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
codepoint |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< uint8_t > |
method operator<const
DEFINITION
| bool operator< | ( | const CharacterRange & other | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
other |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method overlapsconst
DEFINITION
| bool overlaps | ( | const CharacterRange & other | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
other |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method source_endconst
DEFINITION
| char32_t source_end | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
char32_t |
method target_endconst
DEFINITION
| uint8_t target_end | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
uint8_t |
member length
DEFINITION
uint8_t length;
member source_start
DEFINITION
char32_t source_start;
member target_start
DEFINITION
uint8_t target_start;
constructor StringEncoding
DEFINITION
| StringEncoding | ( | ); |
constructor StringEncoding
DEFINITION
| StringEncoding | ( | Symbol name, | |
| const std::shared_ptr< StructuredValue > & definition, | |||
| const Target & target | ); |
| PARAMETER | DESCRIPTION |
|---|---|
name |
|
definition |
|
target |
method add_namedprivate
DEFINITION
| void add_named | ( | const std::u32string & source, | |
| uint8_t target | ); |
| PARAMETER | DESCRIPTION |
|---|---|
source |
|
target |
method add_namedprivate
DEFINITION
| void add_named | ( | const Token & target_token, | |
| const std::shared_ptr< StructuredValue > & sources | ); |
| PARAMETER | DESCRIPTION |
|---|---|
target_token |
|
sources |
method add_named_rangeprivate
DEFINITION
| void add_named_range | ( | const std::u32string & prefix, | |
| char32_t source_start, | |||
| uint8_t target_start, | |||
| uint8_t length | ); |
| PARAMETER | DESCRIPTION |
|---|---|
prefix |
|
source_start |
|
target_start |
|
length |
method add_named_rangesprivate
DEFINITION
| void add_named_ranges | ( | const Token & prefix_token, | |
| const std::shared_ptr< StructuredValue > & ranges | ); |
| PARAMETER | DESCRIPTION |
|---|---|
prefix_token |
|
ranges |
method add_rangeprivate
DEFINITION
| void add_range | ( | const std::shared_ptr< StructuredValue > & range | ); |
| PARAMETER | DESCRIPTION |
|---|---|
range |
method add_rangeprivate
DEFINITION
| void add_range | ( | const CharacterRange & range | ); |
| PARAMETER | DESCRIPTION |
|---|---|
range |
method add_singletonprivate
DEFINITION
| void add_singleton | ( | uint32_t source, | |
| uint8_t target | ); |
| PARAMETER | DESCRIPTION |
|---|---|
source |
|
target |
method add_singletonprivate
DEFINITION
| void add_singleton | ( | const Token & target_token, | |
| const std::shared_ptr< StructuredValue > & sources | ); |
| PARAMETER | DESCRIPTION |
|---|---|
target_token |
|
sources |
method encodeconst
DEFINITION
| void encode | ( | std::string & bytes, | |
| const std::string & string | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
bytes |
|
string |
method encodeconst private
DEFINITION
| size_t encode | ( | std::string * bytes, | |
| const std::string & string | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
bytes |
|
string |
| RETURNS | DESCRIPTION |
|---|---|
size_t |
method encodeconst
DEFINITION
| void encode | ( | std::string & bytes, | |
| const Value & value, | |||
| std::optional< size_t > size = {} | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
bytes |
|
value |
|
size |
method encodeconst private
DEFINITION
| std::optional< uint8_t > encode | ( | char32_t codepoint | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
codepoint |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< uint8_t > |
method encoded_sizeconst
DEFINITION
| size_t encoded_size | ( | const std::string & string | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
string |
| RETURNS | DESCRIPTION |
|---|---|
size_t |
method encoded_sizeconst
DEFINITION
| size_t encoded_size | ( | const Value & value | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
value |
| RETURNS | DESCRIPTION |
|---|---|
size_t |
method get_char32static private
DEFINITION
| static char32_t get_char32 | ( | const Token & token | ); |
| PARAMETER | DESCRIPTION |
|---|---|
token |
| RETURNS | DESCRIPTION |
|---|---|
char32_t |
method get_char32static private
DEFINITION
| static char32_t get_char32 | ( | Tokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
|---|---|
tokenizer |
| RETURNS | DESCRIPTION |
|---|---|
char32_t |
method get_uint8static private
DEFINITION
| static uint8_t get_uint8 | ( | const Token & token | ); |
| PARAMETER | DESCRIPTION |
|---|---|
token |
| RETURNS | DESCRIPTION |
|---|---|
uint8_t |
method get_uint8static private
DEFINITION
| static uint8_t get_uint8 | ( | Tokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
|---|---|
tokenizer |
| RETURNS | DESCRIPTION |
|---|---|
uint8_t |
method has_namedconst private
DEFINITION
| bool has_named | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method import_baseprivate
DEFINITION
| void import_base | ( | const Token & base_name, | |
| const std::shared_ptr< StructuredValue > & base_parameters, | |||
| const Target & target | ); |
| PARAMETER | DESCRIPTION |
|---|---|
base_name |
|
base_parameters |
|
target |
method import_base_rangeprivate
DEFINITION
| void import_base_range | ( | const StringEncoding * base, | |
| uint8_t start, | |||
| uint8_t end, | |||
| uint8_t offset | ); |
| PARAMETER | DESCRIPTION |
|---|---|
base |
|
start |
|
end |
|
offset |
method is_in_rangestatic private
DEFINITION
| static bool is_in_range | ( | uint8_t value, | |
| uint8_t start, | |||
| uint8_t end | ); |
| PARAMETER | DESCRIPTION |
|---|---|
value |
|
start |
|
end |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method serializeconst
DEFINITION
| void serialize | ( | std::ostream & stream | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
stream |
method set_name_delimitersprivate
DEFINITION
| void set_name_delimiters | ( | const std::shared_ptr< StructuredValue > & delimiters | ); |
| PARAMETER | DESCRIPTION |
|---|---|
delimiters |
member group_char32static private
DEFINITION
static const TokenGroup group_char32;
member nameprivate
DEFINITION
std::string name;
member namedprivate
DEFINITION
std::unordered_map< std::u32string, uint8_t > named;
member named_closeprivate
DEFINITION
std::u32string named_close;
member named_openprivate
DEFINITION
std::u32string named_open;
member rangesprivate
DEFINITION
std::vector< CharacterRange > ranges;
member singletonsprivate
DEFINITION
std::unordered_map< char32_t, uint8_t > singletons;
member token_basestatic private
DEFINITION
static const Token token_base;
member token_name_delimitersstatic private
DEFINITION
static const Token token_name_delimiters;
member token_namedstatic private
DEFINITION
static const Token token_named;
member token_named_rangesstatic private
DEFINITION
static const Token token_named_ranges;
member token_rangesstatic private
DEFINITION
static const Token token_ranges;
member token_singletonsstatic private
DEFINITION
static const Token token_singletons;
member token_usestatic private
DEFINITION
static const Token token_use;
class CharacterRangeprivate
DEFINITION
class CharacterRange;
constructor CharacterRange
DEFINITION
| CharacterRange | ( | char32_t source_start, | |
| uint8_t target_start, | |||
| uint8_t length | ); |
| PARAMETER | DESCRIPTION |
|---|---|
source_start |
|
target_start |
|
length |
method encodeconst
DEFINITION
| std::optional< uint8_t > encode | ( | char32_t codepoint | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
codepoint |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< uint8_t > |
method operator<const
DEFINITION
| bool operator< | ( | const CharacterRange & other | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
other |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method overlapsconst
DEFINITION
| bool overlaps | ( | const CharacterRange & other | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
other |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method source_endconst
DEFINITION
| char32_t source_end | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
char32_t |
method target_endconst
DEFINITION
| uint8_t target_end | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
uint8_t |
member length
DEFINITION
uint8_t length;
member source_start
DEFINITION
char32_t source_start;
member target_start
DEFINITION
uint8_t target_start;