Elektra  0.8.21
Classes | Functions
kdb::tools Namespace Reference

This namespace is for the libtool library. More...

Classes

class  Backend
 A low-level representation of the backend (= set of plugins) that can be mounted. More...
 
class  BackendBuilder
 Highlevel interface to build a backend. More...
 
class  BackendBuilderInit
 Used as argument of constructor of *BackendBuilder. More...
 
class  BackendFactory
 Factory for MountBackendInterface. More...
 
struct  BackendInfo
 Info about a backend. More...
 
class  BackendInterface
 Minimal interface to add plugins. More...
 
class  Backends
 Allows one to list backends. More...
 
class  ErrorPlugins
 Plugins to handle errors during configuration access. More...
 
class  GetPlugins
 Plugins to get configuration. More...
 
class  GlobalPlugins
 Low level representation of global plugins. More...
 
class  GlobalPluginsBuilder
 Build global plugins. More...
 
class  ImportExportBackend
 Backend for import/export functionality. More...
 
class  MockPluginDatabase
 A plugin database that works with added fake data. More...
 
class  Modules
 Allows one to load plugins. More...
 
class  ModulesPluginDatabase
 A plugin database that works with installed modules. More...
 
class  MountBackendBuilder
 High-level functionality to build a mountpoint. More...
 
class  MountBackendInterface
 Interface to work with mountpoints (backends) for factory. More...
 
class  Plugin
 This is a C++ representation of a plugin. More...
 
class  PluginAdder
 Adds plugins in a generic map. More...
 
class  PluginDatabase
 Loads all plugins and allows us to query them. More...
 
class  Plugins
 A collection of plugins (either get, set or error) More...
 
class  PluginSpec
 Specifies a plugin by its name and configuration. More...
 
struct  PluginSpecHash
 Only to be used with PluginSpecName! More...
 
class  SerializeInterface
 Interface to serialize a backend. More...
 
class  SetPlugins
 Plugins to set configuration. More...
 
class  SpecBackendBuilder
 Build individual backend while reading specification. More...
 
class  SpecReader
 Highlevel interface to build a backend from specification. More...
 
struct  ToolException
 All exceptions from the elektratools library are derived from this exception. More...
 

Functions

std::ostream & operator<< (std::ostream &os, Backend const &b)
 Prints the current status. More...
 
kdb::KeySet parsePluginArguments (std::string const &pluginArguments, std::string const &basepath)
 Parse a string containing information to create a KeySet. More...
 
PluginSpecVector parseArguments (std::string const &cmdline)
 Parse a complete commandline. More...
 
template<typename Iterator >
PluginSpecVector parseArguments (Iterator first, Iterator last)
 Parse a complete commandline that is already tokenized in pluginname pluginconfig. More...
 
std::ostream & operator<< (std::ostream &os, PluginSpec const &spec)
 Output the name, refname and size of config.
 
bool operator== (PluginSpec const &self, PluginSpec const &other)
 Compare two pluginspec if their value is equal. More...
 
bool operator!= (PluginSpec const &self, PluginSpec const &other)
 Compare two pluginspec if their value is not equal. More...
 

Detailed Description

This namespace is for the libtool library.

Note
You have to link against libelektratools if you want to use functionality from it. Contrary to classes in namespace kdb it is not header-only.
See also
Backend for an entry point

Function Documentation

◆ operator!=()

bool kdb::tools::operator!= ( PluginSpec const &  self,
PluginSpec const &  other 
)

Compare two pluginspec if their value is not equal.

Note
the content of getConfig() will be only compared with keynames, not content!

◆ operator<<()

std::ostream & kdb::tools::operator<< ( std::ostream &  os,
Backend const &  b 
)

Prints the current status.

Parameters
osstream to print to
bbackend to get status from
Returns
ref to stream

◆ operator==()

bool kdb::tools::operator== ( PluginSpec const &  self,
PluginSpec const &  other 
)

Compare two pluginspec if their value is equal.

Note
the content of getConfig() will be only compared with keynames, not content!

◆ parseArguments() [1/2]

PluginSpecVector kdb::tools::parseArguments ( std::string const &  cmdline)

Parse a complete commandline.

Parameters
cmdlinecontains space separated plugins with optional plugin configurations
Note
currently whitespaces are not allowed within pluginname or config, use iterator interface parseArguments() if you need it.
See also
parseArguments()
Returns
a parsed PluginSpecVector

◆ parseArguments() [2/2]

template<typename Iterator >
PluginSpecVector kdb::tools::parseArguments ( Iterator  first,
Iterator  last 
)

Parse a complete commandline that is already tokenized in pluginname pluginconfig.

Template Parameters
Iteratorforward iterator type
Parameters
cmdlinecontains space separated plugins with optional plugin configurations
Returns
a parsed PluginSpecVector

◆ parsePluginArguments()

KeySet kdb::tools::parsePluginArguments ( std::string const &  pluginArguments,
std::string const &  basepath 
)

Parse a string containing information to create a KeySet.

Parameters
pluginArgumentscomma (,) to separate key=value, contains no whitespaces
Returns
newly created keyset with the information found in the string