|
Electroneum
|
A base language class which all languages have to inherit from for Polymorphism. More...
#include <language_base.h>


Public Member Functions | |
| Base (const char *language_name, const char *english_language_name, const std::vector< std::string > &words, uint32_t prefix_length) | |
| virtual | ~Base () |
| void | set_words (const char *const words[]) |
| const std::vector< std::string > & | get_word_list () const |
| Returns a pointer to the word list. More... | |
| const std::unordered_map< epee::wipeable_string, uint32_t, WordHash, WordEqual > & | get_word_map () const |
| Returns a pointer to the word map. More... | |
| const std::unordered_map< epee::wipeable_string, uint32_t, WordHash, WordEqual > & | get_trimmed_word_map () const |
| Returns a pointer to the trimmed word map. More... | |
| const std::string & | get_language_name () const |
| Returns the name of the language. More... | |
| const std::string & | get_english_language_name () const |
| Returns the name of the language in English. More... | |
| uint32_t | get_unique_prefix_length () const |
| Returns the number of unique starting characters to be used for matching. More... | |
Protected Types | |
| enum | { ALLOW_SHORT_WORDS = 1<<0, ALLOW_DUPLICATE_PREFIXES = 1<<1 } |
| enum | { NWORDS = 1626 } |
Protected Member Functions | |
| void | populate_maps (uint32_t flags=0) |
| Populates the word maps after the list is ready. More... | |
Protected Attributes | |
| std::vector< std::string > | word_list |
| std::unordered_map< epee::wipeable_string, uint32_t, WordHash, WordEqual > | word_map |
| std::unordered_map< epee::wipeable_string, uint32_t, WordHash, WordEqual > | trimmed_word_map |
| std::string | language_name |
| std::string | english_language_name |
| uint32_t | unique_prefix_length |
A base language class which all languages have to inherit from for Polymorphism.
Definition at line 168 of file language_base.h.
|
protected |
| Enumerator | |
|---|---|
| ALLOW_SHORT_WORDS | |
| ALLOW_DUPLICATE_PREFIXES | |
Definition at line 171 of file language_base.h.
|
protected |
| Enumerator | |
|---|---|
| NWORDS | |
Definition at line 175 of file language_base.h.
|
inline |
Definition at line 223 of file language_base.h.
|
inlinevirtual |
Definition at line 230 of file language_base.h.
|
inline |
Returns the name of the language in English.
Definition at line 275 of file language_base.h.
|
inline |
Returns the name of the language.
Definition at line 267 of file language_base.h.

|
inline |
Returns a pointer to the trimmed word map.
Definition at line 259 of file language_base.h.
|
inline |
Returns the number of unique starting characters to be used for matching.
Definition at line 283 of file language_base.h.
|
inline |
Returns a pointer to the word list.
Definition at line 243 of file language_base.h.

|
inline |
Returns a pointer to the word map.
Definition at line 251 of file language_base.h.
|
inlineprotected |
Populates the word maps after the list is ready.
Definition at line 187 of file language_base.h.
|
inline |
Definition at line 233 of file language_base.h.
|
protected |
Name of language
Definition at line 182 of file language_base.h.
|
protected |
Name of language
Definition at line 181 of file language_base.h.
|
protected |
hash table to find word's trimmed index
Definition at line 180 of file language_base.h.
|
protected |
Number of unique starting characters to trim the wordlist to when matching
Definition at line 183 of file language_base.h.
|
protected |
A pointer to the array of words
Definition at line 178 of file language_base.h.
|
protected |
hash table to find word's index
Definition at line 179 of file language_base.h.