|
Monero
|
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. | |
| const std::unordered_map< epee::wipeable_string, uint32_t, WordHash, WordEqual > & | get_word_map () const |
| Returns a pointer to the word map. | |
| const std::unordered_map< epee::wipeable_string, uint32_t, WordHash, WordEqual > & | get_trimmed_word_map () const |
| Returns a pointer to the trimmed word map. | |
| const std::string & | get_language_name () const |
| Returns the name of the language. | |
| const std::string & | get_english_language_name () const |
| Returns the name of the language in English. | |
| uint32_t | get_unique_prefix_length () const |
| Returns the number of unique starting characters to be used for matching. | |
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. | |
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.
|
inline |
|
inlinevirtual |
|
inline |
Returns the name of the language in English.
|
inline |
Returns the name of the language.
|
inline |
Returns a pointer to the trimmed word map.
|
inline |
Returns the number of unique starting characters to be used for matching.
|
inline |
Returns a pointer to the word list.
|
inline |
Returns a pointer to the word map.
|
inlineprotected |
Populates the word maps after the list is ready.
|
protected |
Name of language
|
protected |
Name of language
|
protected |
hash table to find word's trimmed index
|
protected |
Number of unique starting characters to trim the wordlist to when matching
|
protected |
A pointer to the array of words
|
protected |
hash table to find word's index