Scroll to navigation

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

NAME

kdb::tools::BackendBuilder - Highlevel interface to build a backend.

SYNOPSIS

#include <backendbuilder.hpp>

Inherits kdb::tools::BackendInterface.

Inherited by kdb::tools::GlobalPluginsBuilder, and kdb::tools::MountBackendBuilder.

Public Member Functions


void addPlugin (PluginSpec const &plugin)
Add a plugin. std::vector< std::string > resolveNeeds (bool addRecommends=true)
resolve all needs that were not resolved by adding plugins.

Detailed Description

Highlevel interface to build a backend.

Automatically reorders plugins and has different modes which Backend should be built.

Member Function Documentation

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

Add a plugin.

Precondition:

Needs to be a unique new name (use refname if you want to add the same module multiple times)

Will automatically resolve virtual plugins to actual plugins.

Also calls the checkconf function if provided by the plugin. The checkconf function has the following signature: int checkconf (Key * errorKey, KeySet * config) and allows a plugin to verify its configuration at mount time.

See also:

resolveNeeds()

Parameters:

plugin

Implements kdb::tools::BackendInterface.

Reimplemented in kdb::tools::MountBackendBuilder.

std::vector< std::string > kdb::tools::BackendBuilder::resolveNeeds (bool addRecommends = true)

resolve all needs that were not resolved by adding plugins.

Warning:

Must only be used once after all plugins/recommends are added.

Returns:

the missing recommended plugins

Return values:

empty if addRecommends was false

See also:

addPlugin()

Author

Generated automatically by Doxygen for Elektra from the source code.

Mon Jan 15 2018 Version 0.8.20