From fd914196422d7afd68d89f46830d80bf73818d2f Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 26 Feb 2020 15:23:38 +0100 Subject: [PATCH] core/dictionary.h: Documentation --- src/core/dictionary.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/dictionary.h b/src/core/dictionary.h index f3cbe60..903b3a5 100644 --- a/src/core/dictionary.h +++ b/src/core/dictionary.h @@ -34,7 +34,9 @@ namespace eoskeygen { class Dictionary { 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. typedef std::map< size_t, size_t > search_result_t; @@ -55,8 +57,8 @@ public : bool contains(const std::string& word) const; // Searches the subject for words defined in the dictionary. - // Returns a map with the word as key and a vector - // of each position the word was found. + // Returns a search_result_t with the words found in subject. + // See search_result_t for more details. search_result_t search(const std::string& subject) const; protected :