|
crawlserv++
[under development]
Application for crawling and analyzing textual content of websites.
|
RAII wrapper for aspell configurations.
More...
#include <AspellConfig.hpp>
Classes | |
| class | Exception |
Class for aspell configuration-specific exceptions. More... | |
Construction and Destruction | |
| AspellConfig () | |
| Constructor creating a new configuration. More... | |
| virtual | ~AspellConfig () |
| Destructor deleting the configuration, if necessary. More... | |
Getters | |
| ::AspellConfig * | get () |
| Gets a pointer to the underlying configuration. More... | |
| const ::AspellConfig * | getc () const |
| Gets a constant pointer to the underlying configuration. More... | |
| bool | valid () const |
| Gets whether the configuration is valid. More... | |
Setter | |
| void | setOption (const std::string &name, const std::string &value) |
| Sets an option in the configuration. More... | |
Cleanup | |
| void | clear () |
| Deletes the configuration, if necessary. More... | |
Copy and Move | |
| AspellConfig (const AspellConfig &other) | |
| Copy constructor. More... | |
| AspellConfig (AspellConfig &&other) noexcept | |
| Move constructor. More... | |
| AspellConfig & | operator= (const AspellConfig &other) |
| Copy assignment operator. More... | |
| AspellConfig & | operator= (AspellConfig &&other) noexcept |
| Move assignment operator. More... | |
RAII wrapper for aspell configurations.
Creates the configuration on construction and deletes it on destruction, if still necessary, avoiding memory leaks.
|
inline |
Constructor creating a new configuration.
|
inlinevirtual |
|
inline |
Copy constructor.
Creates a copy of the underlying configuration in the given instance, saving it in this instance.
If the other configuration is invalid, the current instance will also be invalid.
| other | The configuration to copy from. |
|
inlinenoexcept |
Move constructor.
Moves the configuration from the specified location into this instance of the class.
| other | The configuration to move from. |
|
inline |
Deletes the configuration, if necessary.
Referenced by operator=(), and ~AspellConfig().
|
inline |
Gets a pointer to the underlying configuration.
nullptr if the configuration is not valid.Referenced by crawlservpp::Wrapper::AspellChecker::create().
|
inline |
|
inline |
Copy assignment operator.
Clears the existing configuration if necessary and creates a copy of the underlying configuration in the given instance, saving it in this instance.
| other | The configuration to copy from. |
*this). References clear().
|
inlinenoexcept |
Move assignment operator.
Moves the configuration from the specified location into this instance of the class.
| other | The configuration to move from. |
*this).References clear().
|
inline |
Sets an option in the configuration.
The previous value of the option will be overwritten.
| name | Name of the aspell configuration option. |
| value | New value of the option. |
| AspellConfig::Exception | if the current configuration, the name or the value of the option are not valid, or if its value could not be changed. |
Referenced by crawlservpp::Data::TokenCorrect::TokenCorrect().
|
inline |
Gets whether the configuration is valid.
Referenced by crawlservpp::Wrapper::AspellChecker::create().