Molybden API
Loading...
Searching...
No Matches
dictionary.hpp
1// Copyright (c) 2000-2024 TeamDev. All rights reserved.
2// TeamDev PROPRIETARY and CONFIDENTIAL.
3// Use is subject to license terms.
4
5#ifndef MOLYBDEN_DICTIONARY_HPP
6#define MOLYBDEN_DICTIONARY_HPP
7
8#include <vector>
9#include <string>
10
11namespace molybden {
12
17 public:
22 virtual std::vector<std::string> words() = 0;
23
27 virtual bool addWord(const std::string& word) = 0;
28
32 virtual bool removeWord(const std::string& word) = 0;
33
37 virtual bool hasWord(const std::string& word) = 0;
38
39 virtual ~Dictionary() = default;
40};
41} // namespace molybden
42
43#endif // MOLYBDEN_DICTIONARY_HPP
Provides functionality for working with a spell check dictionary.
Definition dictionary.hpp:16
virtual bool removeWord(const std::string &word)=0
Removes the given word from the dictionary and schedules a write to disk.
virtual bool addWord(const std::string &word)=0
Adds the given word to the dictionary and schedules a write to disk.
virtual std::vector< std::string > words()=0
The words in the current dictionary or an empty list if the dictionary does not have any word.
virtual bool hasWord(const std::string &word)=0
Indicates if the dictionary contains the given word.