table of contents
kdb::tools::Plugin(3elektra) | Elektra | kdb::tools::Plugin(3elektra) |
NAME¶
kdb::tools::Plugin - This is a C++ representation of a plugin.
SYNOPSIS¶
#include <plugin.hpp>
Public Member Functions¶
void loadInfo ()
Gets the configuration for the plugin. void parse ()
Creates symbol and info table. void check (std::vector<
std::string > &warnings)
Does various checks on the Plugin and throws exceptions if
something is not ok. std::string lookupInfo (std::string
item, std::string section='infos')
Gets the whole string of an information item. bool findInfo
(std::string check, std::string item, std::string section='infos')
Searches within a string of an information item. kdb::KeySet
getInfo ()
Returns the whole keyset of information. kdb::KeySet
getNeededConfig ()
In the plugin's contract there is a description of which config is needed
in order to work together with a backend properly. kdb::KeySet
getConfig ()
return the plugin config func_t getSymbol (std::string which)
Returns symbol to a function. int open (kdb::Key
&errorKey)
Calls the open function of the plugin. int close
(kdb::Key &errorKey)
Calls the close function of the plugin. int get
(kdb::KeySet &ks, kdb::Key &parentKey)
Calls the get function of the plugin. int set
(kdb::KeySet &ks, kdb::Key &parentKey)
Calls the set function of the plugin. int error
(kdb::KeySet &ks, kdb::Key &parentKey)
Calls the error function of the plugin. std::string name ()
std::string refname ()
Data Fields¶
bool firstRef
Is toggled during serialization.
Detailed Description¶
This is a C++ representation of a plugin.
It will load an Elektra plugin using the module loader from Elektra.
Then you can either check the plugins configuration using loadInfo(), parse() and check. Symbols can then be retrieved with getSymbol().
Or you can use the normal open(), close(), get(), set() and error() API which every plugin exports.
Member Function Documentation¶
void kdb::tools::Plugin::check (std::vector< std::string > & warnings)¶
Does various checks on the Plugin and throws exceptions if something is not ok.
- •
- Check if Plugin is compatible to current Version of Backend-API.
Exceptions:
Parameters:
Precondition:
int kdb::tools::Plugin::close (kdb::Key & errorKey)¶
Calls the close function of the plugin.
Precondition:
int kdb::tools::Plugin::error (kdb::KeySet & ks, kdb::Key & parentKey)¶
Calls the error function of the plugin.
Precondition:
bool kdb::tools::Plugin::findInfo (std::string check, std::string item, std::string section = 'infos')¶
Searches within a string of an information item.
Precondition:
int kdb::tools::Plugin::get (kdb::KeySet & ks, kdb::Key & parentKey)¶
Calls the get function of the plugin.
Precondition:
kdb::KeySet kdb::tools::Plugin::getConfig ()¶
return the plugin config
Returns:
See also:
kdb::KeySet kdb::tools::Plugin::getInfo () [inline]¶
Returns the whole keyset of information.
Precondition:
kdb::KeySet kdb::tools::Plugin::getNeededConfig ()¶
In the plugin's contract there is a description of which config is needed in order to work together with a backend properly.
Returns:
See also:
Precondition:
func_t kdb::tools::Plugin::getSymbol (std::string which) [inline]¶
Returns symbol to a function.
Precondition:
std::string kdb::tools::Plugin::lookupInfo (std::string item, std::string section = 'infos')¶
Gets the whole string of an information item.
Precondition:
std::string kdb::tools::Plugin::name ()¶
Returns:
int kdb::tools::Plugin::open (kdb::Key & errorKey)¶
Calls the open function of the plugin.
Precondition:
std::string kdb::tools::Plugin::refname ()¶
Returns:
int kdb::tools::Plugin::set (kdb::KeySet & ks, kdb::Key & parentKey)¶
Calls the set function of the plugin.
Precondition:
Field Documentation¶
bool kdb::tools::Plugin::firstRef¶
Is toggled during serialization. (is a hack, only allows a single serialization!)
Author¶
Generated automatically by Doxygen for Elektra from the source code.
Sun May 29 2016 | Version 0.8.14 |