Elektra  0.9.3
Public Member Functions | List of all members
kdb::tools::BackendBuilder Class Reference

Highlevel interface to build a backend. More...

#include <backendbuilder.hpp>

Inheritance diagram for kdb::tools::BackendBuilder:
Inheritance graph
[legend]
Collaboration diagram for kdb::tools::BackendBuilder:
Collaboration graph
[legend]

Public Member Functions

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

Detailed Description

Highlevel interface to build a backend.

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

Member Function Documentation

◆ addPlugin()

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.

◆ resolveNeeds()

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
emptyif addRecommends was false
See also
addPlugin()

The documentation for this class was generated from the following files: