From 3ca4631bbe2009d7cb040365012798d8b194c02f Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 14 Apr 2020 16:34:28 +0200 Subject: [PATCH] common/include/eoskeygen/core/dictionary.h: adding getWords() method. --- common/include/eoskeygen/core/dictionary.h | 3 +++ common/src/core/dictionary.cpp | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/common/include/eoskeygen/core/dictionary.h b/common/include/eoskeygen/core/dictionary.h index 3197108..bdd9cac 100644 --- a/common/include/eoskeygen/core/dictionary.h +++ b/common/include/eoskeygen/core/dictionary.h @@ -53,6 +53,9 @@ public : // Clear all words from the dictionary. void clear(); + // Returns the list of words in the dictionary. + const std::set& getWords() const; + // Returns true if word exists in the dictionary. bool contains(const std::string& word) const; diff --git a/common/src/core/dictionary.cpp b/common/src/core/dictionary.cpp index 0e74906..7446b34 100644 --- a/common/src/core/dictionary.cpp +++ b/common/src/core/dictionary.cpp @@ -79,6 +79,11 @@ void Dictionary::add(const Dictionary& dictionary) ); } +const std::set& Dictionary::getWords() const +{ + return m_words; +} + void Dictionary::clear() { m_words.clear();