A base language class which all languages have to inherit from for Polymorphism.
More...
#include <language_base.h>
A base language class which all languages have to inherit from for Polymorphism.
◆ anonymous enum
| Enumerator |
|---|
| ALLOW_SHORT_WORDS | |
| ALLOW_DUPLICATE_PREFIXES | |
◆ anonymous enum
◆ Base()
| Language::Base::Base |
( |
const char * |
language_name, |
|
|
const char * |
english_language_name, |
|
|
const std::vector< std::string > & |
words, |
|
|
uint32_t |
prefix_length |
|
) |
| |
|
inline |
◆ ~Base()
| virtual Language::Base::~Base |
( |
| ) |
|
|
inlinevirtual |
◆ get_english_language_name()
| const std::string& Language::Base::get_english_language_name |
( |
| ) |
const |
|
inline |
Returns the name of the language in English.
- Returns
- Name of the language.
◆ get_language_name()
| const std::string& Language::Base::get_language_name |
( |
| ) |
const |
|
inline |
Returns the name of the language.
- Returns
- Name of the language.
◆ get_trimmed_word_map()
| const std::unordered_map<epee::wipeable_string, uint32_t, WordHash, WordEqual>& Language::Base::get_trimmed_word_map |
( |
| ) |
const |
|
inline |
Returns a pointer to the trimmed word map.
- Returns
- A pointer to the trimmed word map.
◆ get_unique_prefix_length()
| uint32_t Language::Base::get_unique_prefix_length |
( |
| ) |
const |
|
inline |
Returns the number of unique starting characters to be used for matching.
- Returns
- Number of unique starting characters.
◆ get_word_list()
| const std::vector<std::string>& Language::Base::get_word_list |
( |
| ) |
const |
|
inline |
Returns a pointer to the word list.
- Returns
- A pointer to the word list.
◆ get_word_map()
| const std::unordered_map<epee::wipeable_string, uint32_t, WordHash, WordEqual>& Language::Base::get_word_map |
( |
| ) |
const |
|
inline |
Returns a pointer to the word map.
- Returns
- A pointer to the word map.
◆ populate_maps()
| void Language::Base::populate_maps |
( |
uint32_t |
flags = 0 | ) |
|
|
inlineprotected |
Populates the word maps after the list is ready.
◆ set_words()
| void Language::Base::set_words |
( |
const char *const |
words[] | ) |
|
|
inline |
◆ english_language_name
| std::string Language::Base::english_language_name |
|
protected |
◆ language_name
| std::string Language::Base::language_name |
|
protected |
◆ trimmed_word_map
| std::unordered_map<epee::wipeable_string, uint32_t, WordHash, WordEqual> Language::Base::trimmed_word_map |
|
protected |
hash table to find word's trimmed index
◆ unique_prefix_length
| uint32_t Language::Base::unique_prefix_length |
|
protected |
Number of unique starting characters to trim the wordlist to when matching
◆ word_list
| std::vector<std::string> Language::Base::word_list |
|
protected |
A pointer to the array of words
◆ word_map
| std::unordered_map<epee::wipeable_string, uint32_t, WordHash, WordEqual> Language::Base::word_map |
|
protected |
hash table to find word's index
The documentation for this class was generated from the following file: