32 #ifndef WRAPPER_ASPELLCONFIG_HPP_ 33 #define WRAPPER_ASPELLCONFIG_HPP_ 35 #include "../Main/Exception.hpp" 71 [[nodiscard]] const ::AspellConfig *
getc()
const;
72 [[nodiscard]]
bool valid()
const;
78 void setOption(
const std::string& name,
const std::string& value);
118 this->ptr = new_aspell_config();
164 return this->ptr !=
nullptr;
187 if(this->ptr ==
nullptr) {
189 "AspellConfig::setOption():" 190 " The configuration is not valid" 194 if(aspell_config_replace(this->ptr, name.c_str(), value.c_str()) == 0) {
196 "AspellConfig::setOption():" 198 + std::to_string(aspell_config_error_number(this->ptr))
200 + aspell_config_error_message(this->ptr)
211 if(this->ptr !=
nullptr) {
212 delete_aspell_config(this->ptr);
237 if(other.ptr !=
nullptr) {
238 aspell_config_assign(this->ptr, other.ptr);
282 aspell_config_assign(this->ptr, other.ptr);
313 this->ptr = other.ptr;
::AspellConfig * get()
Gets a pointer to the underlying configuration.
Definition: AspellConfig.hpp:141
bool valid() const
Gets whether the configuration is valid.
Definition: AspellConfig.hpp:163
RAII wrapper for aspell configurations.
Definition: AspellConfig.hpp:58
#define MAIN_EXCEPTION_CLASS()
Macro used to easily define classes for general exceptions.
Definition: Exception.hpp:50
AspellConfig & operator=(const AspellConfig &other)
Copy assignment operator.
Definition: AspellConfig.hpp:278
const ::AspellConfig * getc() const
Gets a constant pointer to the underlying configuration.
Definition: AspellConfig.hpp:154
Class for aspell configuration-specific exceptions.
Definition: AspellConfig.hpp:101
virtual ~AspellConfig()
Destructor deleting the configuration, if necessary.
Definition: AspellConfig.hpp:125
void clear()
Deletes the configuration, if necessary.
Definition: AspellConfig.hpp:210
Namespace for RAII wrappers and Wrapper::Database.
Definition: Database.hpp:109
void setOption(const std::string &name, const std::string &value)
Sets an option in the configuration.
Definition: AspellConfig.hpp:186
AspellConfig()
Constructor creating a new configuration.
Definition: AspellConfig.hpp:117