Scroll to navigation

kdb::tools::Backend(3elektra) Elektra kdb::tools::Backend(3elektra)

NAME

kdb::tools::Backend - A low-level representation of the backend (= set of plugins) that can be mounted.

SYNOPSIS

#include <backend.hpp>

Inherits kdb::tools::MountBackendInterface.

Public Member Functions


Backend ()
Creates a new empty backend. void setMountpoint (Key mountpoint, KeySet mountConf)
Sets the mountpoint for the backend. void setBackendConfig (KeySet const &ks)
Backend Config to add to. void addPlugin (PluginSpec const &spec)
Add a plugin that can be loaded, meets all constraints. void useConfigFile (std::string file)
bool validated () const
void serialize (kdb::KeySet &ret)

Detailed Description

A low-level representation of the backend (= set of plugins) that can be mounted.

To build a backend, you should prefer BackendBuilder, which automatically fixes ordering and allows us to remove plugins.

Member Function Documentation

void kdb::tools::Backend::addPlugin (PluginSpec const & plugin) [virtual]

Add a plugin that can be loaded, meets all constraints.

Note:

that this does not mean that the backend validates after it is added. It only means that the situation is not getting worse.

Exceptions:

PluginCheckException or its subclasses if it was not possible to load the plugin

For validation

See also:

validated().

Implements kdb::tools::BackendInterface.

void kdb::tools::Backend::serialize (kdb::KeySet & ret) [virtual]

Precondition:

name and mountpoint set Add plugin serialization into keyset ret.

Only can be done once! (see firstRef in Plugin)

Implements kdb::tools::SerializeInterface.

void kdb::tools::Backend::setBackendConfig (KeySet const & ks) [virtual]

Backend Config to add to.

Parameters:

ks the config to add, should be below system/

Implements kdb::tools::MountBackendInterface.

void kdb::tools::Backend::setMountpoint (Key mountpoint, KeySet mountConf) [virtual]

Sets the mountpoint for the backend.

Exceptions:

MountpointInvalidException
MountpointAlreadyInUseException

Parameters:

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

Implements kdb::tools::MountBackendInterface.

void kdb::tools::Backend::useConfigFile (std::string file) [virtual]

Precondition:

: resolver needs to be loaded first Will check the filename and use it as configFile for this backend.

Exceptions:

FileNotValidException if filename is not valid
MissingSymbol if plugin does not implement 'checkfile'

Implements kdb::tools::MountBackendInterface.

bool kdb::tools::Backend::validated () const [virtual]

Returns:

true if backend is validated

false if more plugins are needed to be valided

Implements kdb::tools::MountBackendInterface.

Author

Generated automatically by Doxygen for Elektra from the source code.

Mon Jan 15 2018 Version 0.8.20