32 #ifndef WRAPPER_ASPELLLIST_HPP_ 33 #define WRAPPER_ASPELLLIST_HPP_ 61 explicit AspellList(
const AspellWordList * source);
68 [[nodiscard]]
bool valid()
const;
74 bool next(std::string& nextTo);
101 AspellStringEnumeration * ptr{
nullptr};
119 if(source !=
nullptr) {
120 this->ptr = aspell_word_list_elements(source);
142 return this->ptr !=
nullptr;
162 const auto *
next{aspell_string_enumeration_next(this->ptr)};
164 if(
next ==
nullptr) {
168 nextTo = std::string(
next);
179 if(this->ptr !=
nullptr) {
180 delete_aspell_string_enumeration(this->ptr);
204 if(other.ptr !=
nullptr) {
205 aspell_string_enumeration_assign(this->ptr, other.ptr);
249 aspell_string_enumeration_assign(this->ptr, other.ptr);
280 this->ptr = other.ptr;
bool valid() const
Gets whether the word list is valid.
Definition: AspellList.hpp:141
AspellList(const AspellWordList *source)
Constructor creating a new word list.
Definition: AspellList.hpp:118
AspellList & operator=(const AspellList &other)
Copy assignment operator.
Definition: AspellList.hpp:245
MAIN_EXCEPTION_CLASS()
Class for aspell word list-specific exceptions.
Namespace for RAII wrappers and Wrapper::Database.
Definition: Database.hpp:109
RAII wrapper for aspell word lists.
Definition: AspellList.hpp:56
void clear()
Deletes the word list, if necessary.
Definition: AspellList.hpp:178
bool next(std::string &nextTo)
Checks for the next list element.
Definition: AspellList.hpp:161
virtual ~AspellList()
Destructor deleting the word list, if necessary.
Definition: AspellList.hpp:128