Elektra
0.8.12
|
A representation of the backend (= set of plugins) that can be mounted. More...
#include <backend.hpp>
Public Member Functions | |
Backend () | |
Creates a new backend with a given name and mountpoint. | |
void | setMountpoint (Key mountpoint, KeySet mountConf) |
Sets the mountpoint for the backend. | |
void | setBackendConfig (KeySet const &ks) |
Backend Config to add to. | |
void | addPlugin (std::string name, KeySet pluginConf=KeySet()) |
Add a plugin that can be loaded, meets all constraints. | |
void | useConfigFile (std::string file) |
bool | validated () const |
void | serialize (kdb::KeySet &ret) |
A representation of the backend (= set of plugins) that can be mounted.
Creates a new backend with a given name and mountpoint.
Parameters are needed for serialisation only, so you can keep them empty if you do not want to serialise.
void kdb::tools::Backend::addPlugin | ( | std::string | pluginName, |
KeySet | pluginConf = KeySet() |
||
) |
Add a plugin that can be loaded, meets all constraints.
PluginCheckException | or its subclasses if it was not possible to load the plugin |
For validation
void kdb::tools::Backend::serialize | ( | kdb::KeySet & | ret | ) |
Only can be done once! (see firstRef in Plugin)
void kdb::tools::Backend::setBackendConfig | ( | KeySet const & | ks | ) |
Backend Config to add to.
ks | the config to add, should be below system/ |
void kdb::tools::Backend::setMountpoint | ( | Key | mountpoint, |
KeySet | mountConf | ||
) |
Sets the mountpoint for the backend.
MountpointInvalidException | |
MountpointAlreadyInUseException |
mountpoint | the key name will be used as mountpoint. It is allowed to pass a key with a KEY_CASCADING_NAME |
mountConf | needs to include the keys below system/elektra/mountpoints |
void kdb::tools::Backend::useConfigFile | ( | std::string | file | ) |
FileNotValidException | if filename is not valid |
bool kdb::tools::Backend::validated | ( | ) | const |