mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-07-03 11:53:41 +02:00
core/dictionary.h: Documentation
This commit is contained in:
parent
3505af5c1f
commit
fd91419642
1 changed files with 5 additions and 3 deletions
|
|
@ -34,7 +34,9 @@ namespace eoskeygen {
|
||||||
class Dictionary
|
class Dictionary
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
// index = position in the search string.
|
// Map that contains position and length for substrings.
|
||||||
|
//
|
||||||
|
// key = position in the search string.
|
||||||
// value = length of the word from this position.
|
// value = length of the word from this position.
|
||||||
typedef std::map< size_t, size_t > search_result_t;
|
typedef std::map< size_t, size_t > search_result_t;
|
||||||
|
|
||||||
|
|
@ -55,8 +57,8 @@ public :
|
||||||
bool contains(const std::string& word) const;
|
bool contains(const std::string& word) const;
|
||||||
|
|
||||||
// Searches the subject for words defined in the dictionary.
|
// Searches the subject for words defined in the dictionary.
|
||||||
// Returns a map with the word as key and a vector<int>
|
// Returns a search_result_t with the words found in subject.
|
||||||
// of each position the word was found.
|
// See search_result_t for more details.
|
||||||
search_result_t search(const std::string& subject) const;
|
search_result_t search(const std::string& subject) const;
|
||||||
|
|
||||||
protected :
|
protected :
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue