\hypertarget{classkdb_1_1tools_1_1Plugin}{\section{kdb\-:\-:tools\-:\-:Plugin Class Reference}
\label{classkdb_1_1tools_1_1Plugin}\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}}
}


{\ttfamily \#include $<$plugin.\-hpp$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classkdb_1_1tools_1_1Plugin_a3a0c6a956d1714002ef9baf8c9d99167}{load\-Info} ()
\item 
void \hyperlink{classkdb_1_1tools_1_1Plugin_adfcba2fbdeb436a1083410df804d5fb0}{parse} ()
\item 
void \hyperlink{classkdb_1_1tools_1_1Plugin_a5bb3db65b9d87d18787da8cc65eaca65}{check} (std\-::vector$<$ std\-::string $>$ \&warnings)
\item 
std\-::string \hyperlink{classkdb_1_1tools_1_1Plugin_a5f1dc42adda8340f330eb902812e667d}{lookup\-Info} (std\-::string item, std\-::string section=\char`\"{}infos\char`\"{})
\item 
bool \hyperlink{classkdb_1_1tools_1_1Plugin_a7911f8c46aea6fe4ec6fcb4788b77beb}{find\-Info} (std\-::string \hyperlink{classkdb_1_1tools_1_1Plugin_a5bb3db65b9d87d18787da8cc65eaca65}{check}, std\-::string item, std\-::string section=\char`\"{}infos\char`\"{})
\item 
\hyperlink{classkdb_1_1KeySet}{kdb\-::\-Key\-Set} \hyperlink{classkdb_1_1tools_1_1Plugin_aa4eac3b2b515104a0d595c717c546ec0}{get\-Info} ()
\item 
\hyperlink{classkdb_1_1KeySet}{kdb\-::\-Key\-Set} \hyperlink{classkdb_1_1tools_1_1Plugin_ad2a0a4a64d17c479e7cd8b1402275cc7}{get\-Needed\-Config} ()
\item 
func\-\_\-t \hyperlink{classkdb_1_1tools_1_1Plugin_aca31140802ab463d5bddd95dee73194d}{get\-Symbol} (std\-::string which)
\item 
int \hyperlink{classkdb_1_1tools_1_1Plugin_a680a490123b5290441d76ef2c1e3f1fa}{open} (\hyperlink{classkdb_1_1Key}{kdb\-::\-Key} \&error\-Key)
\item 
int \hyperlink{classkdb_1_1tools_1_1Plugin_a40b5fd413f3f6da735680ed8d7c8a6a2}{close} (\hyperlink{classkdb_1_1Key}{kdb\-::\-Key} \&error\-Key)
\item 
int \hyperlink{classkdb_1_1tools_1_1Plugin_a2aa6ff55f9cf81a59d2a8d271fe68e0f}{get} (\hyperlink{classkdb_1_1KeySet}{kdb\-::\-Key\-Set} \&ks, \hyperlink{classkdb_1_1Key}{kdb\-::\-Key} \&parent\-Key)
\item 
int \hyperlink{classkdb_1_1tools_1_1Plugin_abf84d512b48f6fa1b89636217537cde0}{set} (\hyperlink{classkdb_1_1KeySet}{kdb\-::\-Key\-Set} \&ks, \hyperlink{classkdb_1_1Key}{kdb\-::\-Key} \&parent\-Key)
\item 
int \hyperlink{classkdb_1_1tools_1_1Plugin_a8ec348b49a34ef17fda64cb289b8cf64}{error} (\hyperlink{classkdb_1_1KeySet}{kdb\-::\-Key\-Set} \&ks, \hyperlink{classkdb_1_1Key}{kdb\-::\-Key} \&parent\-Key)
\item 
std\-::string \hyperlink{classkdb_1_1tools_1_1Plugin_ae4b82f943d0cdb0dd355924aa3201d6f}{name} ()
\item 
std\-::string \hyperlink{classkdb_1_1tools_1_1Plugin_af2fa892b6a8861419b1c1c2b3d39ed1e}{refname} ()
\end{DoxyCompactItemize}


\subsection{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 \hyperlink{classkdb_1_1tools_1_1Plugin_a3a0c6a956d1714002ef9baf8c9d99167}{load\-Info()}, \hyperlink{classkdb_1_1tools_1_1Plugin_adfcba2fbdeb436a1083410df804d5fb0}{parse()} and check. Symbols can then be retrieved with \hyperlink{classkdb_1_1tools_1_1Plugin_aca31140802ab463d5bddd95dee73194d}{get\-Symbol()}.

Or you can use the normal \hyperlink{classkdb_1_1tools_1_1Plugin_a680a490123b5290441d76ef2c1e3f1fa}{open()}, \hyperlink{classkdb_1_1tools_1_1Plugin_a40b5fd413f3f6da735680ed8d7c8a6a2}{close()}, \hyperlink{classkdb_1_1tools_1_1Plugin_a2aa6ff55f9cf81a59d2a8d271fe68e0f}{get()}, \hyperlink{classkdb_1_1tools_1_1Plugin_abf84d512b48f6fa1b89636217537cde0}{set()} and \hyperlink{classkdb_1_1tools_1_1Plugin_a8ec348b49a34ef17fda64cb289b8cf64}{error()} A\-P\-I which every plugin exports. 

\subsection{Member Function Documentation}
\hypertarget{classkdb_1_1tools_1_1Plugin_a5bb3db65b9d87d18787da8cc65eaca65}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!check@{check}}
\index{check@{check}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{check}]{\setlength{\rightskip}{0pt plus 5cm}void kdb\-::tools\-::\-Plugin\-::check (
\begin{DoxyParamCaption}
\item[{std\-::vector$<$ std\-::string $>$ \&}]{warnings}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_a5bb3db65b9d87d18787da8cc65eaca65}
Does various checks on the \hyperlink{classkdb_1_1tools_1_1Plugin}{Plugin} and throws exceptions if something is not ok.


\begin{DoxyItemize}
\item Check if \hyperlink{classkdb_1_1tools_1_1Plugin}{Plugin} is compatible to current Version of Backend-\/\-A\-P\-I.
\end{DoxyItemize}


\begin{DoxyExceptions}{Exceptions}
{\em Plugin\-Check\-Exception} & if there are errors \\
\hline
\end{DoxyExceptions}

\begin{DoxyParams}{Parameters}
{\em warnings} & for warnings\\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
\hyperlink{classkdb_1_1tools_1_1Plugin_adfcba2fbdeb436a1083410df804d5fb0}{parse()} 
\end{DoxyPrecond}
\hypertarget{classkdb_1_1tools_1_1Plugin_a40b5fd413f3f6da735680ed8d7c8a6a2}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!close@{close}}
\index{close@{close}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{close}]{\setlength{\rightskip}{0pt plus 5cm}int kdb\-::tools\-::\-Plugin\-::close (
\begin{DoxyParamCaption}
\item[{{\bf kdb\-::\-Key} \&}]{error\-Key}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_a40b5fd413f3f6da735680ed8d7c8a6a2}
Calls the close function of the plugin \begin{DoxyPrecond}{Precondition}
\hyperlink{classkdb_1_1tools_1_1Plugin_adfcba2fbdeb436a1083410df804d5fb0}{parse()} 
\end{DoxyPrecond}
\hypertarget{classkdb_1_1tools_1_1Plugin_a8ec348b49a34ef17fda64cb289b8cf64}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!error@{error}}
\index{error@{error}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{error}]{\setlength{\rightskip}{0pt plus 5cm}int kdb\-::tools\-::\-Plugin\-::error (
\begin{DoxyParamCaption}
\item[{{\bf kdb\-::\-Key\-Set} \&}]{ks, }
\item[{{\bf kdb\-::\-Key} \&}]{parent\-Key}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_a8ec348b49a34ef17fda64cb289b8cf64}
Calls the error function of the plugin \begin{DoxyPrecond}{Precondition}
\hyperlink{classkdb_1_1tools_1_1Plugin_adfcba2fbdeb436a1083410df804d5fb0}{parse()} 
\end{DoxyPrecond}
\hypertarget{classkdb_1_1tools_1_1Plugin_a7911f8c46aea6fe4ec6fcb4788b77beb}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!find\-Info@{find\-Info}}
\index{find\-Info@{find\-Info}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{find\-Info}]{\setlength{\rightskip}{0pt plus 5cm}bool kdb\-::tools\-::\-Plugin\-::find\-Info (
\begin{DoxyParamCaption}
\item[{std\-::string}]{check, }
\item[{std\-::string}]{item, }
\item[{std\-::string}]{section = {\ttfamily \char`\"{}infos\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_a7911f8c46aea6fe4ec6fcb4788b77beb}
Searches within a string of an information item. \begin{DoxyPrecond}{Precondition}
\hyperlink{classkdb_1_1tools_1_1Plugin_a3a0c6a956d1714002ef9baf8c9d99167}{load\-Info()} 
\end{DoxyPrecond}
\hypertarget{classkdb_1_1tools_1_1Plugin_a2aa6ff55f9cf81a59d2a8d271fe68e0f}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!get@{get}}
\index{get@{get}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{get}]{\setlength{\rightskip}{0pt plus 5cm}int kdb\-::tools\-::\-Plugin\-::get (
\begin{DoxyParamCaption}
\item[{{\bf kdb\-::\-Key\-Set} \&}]{ks, }
\item[{{\bf kdb\-::\-Key} \&}]{parent\-Key}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_a2aa6ff55f9cf81a59d2a8d271fe68e0f}
Calls the get function of the plugin \begin{DoxyPrecond}{Precondition}
\hyperlink{classkdb_1_1tools_1_1Plugin_adfcba2fbdeb436a1083410df804d5fb0}{parse()} 
\end{DoxyPrecond}
\hypertarget{classkdb_1_1tools_1_1Plugin_aa4eac3b2b515104a0d595c717c546ec0}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!get\-Info@{get\-Info}}
\index{get\-Info@{get\-Info}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{get\-Info}]{\setlength{\rightskip}{0pt plus 5cm}{\bf kdb\-::\-Key\-Set} kdb\-::tools\-::\-Plugin\-::get\-Info (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classkdb_1_1tools_1_1Plugin_aa4eac3b2b515104a0d595c717c546ec0}
Returns the whole keyset of information. \begin{DoxyPrecond}{Precondition}
\hyperlink{classkdb_1_1tools_1_1Plugin_a3a0c6a956d1714002ef9baf8c9d99167}{load\-Info()} 
\end{DoxyPrecond}
\hypertarget{classkdb_1_1tools_1_1Plugin_ad2a0a4a64d17c479e7cd8b1402275cc7}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!get\-Needed\-Config@{get\-Needed\-Config}}
\index{get\-Needed\-Config@{get\-Needed\-Config}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{get\-Needed\-Config}]{\setlength{\rightskip}{0pt plus 5cm}{\bf kdb\-::\-Key\-Set} kdb\-::tools\-::\-Plugin\-::get\-Needed\-Config (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_ad2a0a4a64d17c479e7cd8b1402275cc7}
In the plugin's contract there is a description of which config is needed in order to work together with a backend properly.

\begin{DoxyReturn}{Returns}
the keyset with the config needed for the backend. 
\end{DoxyReturn}
\begin{DoxyPrecond}{Precondition}
\hyperlink{classkdb_1_1tools_1_1Plugin_a3a0c6a956d1714002ef9baf8c9d99167}{load\-Info()} 
\end{DoxyPrecond}
\hypertarget{classkdb_1_1tools_1_1Plugin_aca31140802ab463d5bddd95dee73194d}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!get\-Symbol@{get\-Symbol}}
\index{get\-Symbol@{get\-Symbol}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{get\-Symbol}]{\setlength{\rightskip}{0pt plus 5cm}func\-\_\-t kdb\-::tools\-::\-Plugin\-::get\-Symbol (
\begin{DoxyParamCaption}
\item[{std\-::string}]{which}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classkdb_1_1tools_1_1Plugin_aca31140802ab463d5bddd95dee73194d}
Returns symbol to a function. \begin{DoxyPrecond}{Precondition}
\hyperlink{classkdb_1_1tools_1_1Plugin_adfcba2fbdeb436a1083410df804d5fb0}{parse()} 
\end{DoxyPrecond}
\hypertarget{classkdb_1_1tools_1_1Plugin_a3a0c6a956d1714002ef9baf8c9d99167}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!load\-Info@{load\-Info}}
\index{load\-Info@{load\-Info}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{load\-Info}]{\setlength{\rightskip}{0pt plus 5cm}void kdb\-::tools\-::\-Plugin\-::load\-Info (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_a3a0c6a956d1714002ef9baf8c9d99167}
Gets the configuration for the plugin. \hypertarget{classkdb_1_1tools_1_1Plugin_a5f1dc42adda8340f330eb902812e667d}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!lookup\-Info@{lookup\-Info}}
\index{lookup\-Info@{lookup\-Info}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{lookup\-Info}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string kdb\-::tools\-::\-Plugin\-::lookup\-Info (
\begin{DoxyParamCaption}
\item[{std\-::string}]{item, }
\item[{std\-::string}]{section = {\ttfamily \char`\"{}infos\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_a5f1dc42adda8340f330eb902812e667d}
Gets the whole string of an information item. \begin{DoxyPrecond}{Precondition}
\hyperlink{classkdb_1_1tools_1_1Plugin_a3a0c6a956d1714002ef9baf8c9d99167}{load\-Info()} 
\end{DoxyPrecond}
\hypertarget{classkdb_1_1tools_1_1Plugin_ae4b82f943d0cdb0dd355924aa3201d6f}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!name@{name}}
\index{name@{name}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{name}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string kdb\-::tools\-::\-Plugin\-::name (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_ae4b82f943d0cdb0dd355924aa3201d6f}
\begin{DoxyReturn}{Returns}
the name of the plugin 
\end{DoxyReturn}
\hypertarget{classkdb_1_1tools_1_1Plugin_a680a490123b5290441d76ef2c1e3f1fa}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!open@{open}}
\index{open@{open}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}int kdb\-::tools\-::\-Plugin\-::open (
\begin{DoxyParamCaption}
\item[{{\bf kdb\-::\-Key} \&}]{error\-Key}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_a680a490123b5290441d76ef2c1e3f1fa}
Calls the open function of the plugin \begin{DoxyPrecond}{Precondition}
\hyperlink{classkdb_1_1tools_1_1Plugin_adfcba2fbdeb436a1083410df804d5fb0}{parse()} 
\end{DoxyPrecond}
\hypertarget{classkdb_1_1tools_1_1Plugin_adfcba2fbdeb436a1083410df804d5fb0}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!parse@{parse}}
\index{parse@{parse}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{parse}]{\setlength{\rightskip}{0pt plus 5cm}void kdb\-::tools\-::\-Plugin\-::parse (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_adfcba2fbdeb436a1083410df804d5fb0}
Creates symbol and info table. \hypertarget{classkdb_1_1tools_1_1Plugin_af2fa892b6a8861419b1c1c2b3d39ed1e}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!refname@{refname}}
\index{refname@{refname}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{refname}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string kdb\-::tools\-::\-Plugin\-::refname (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_af2fa892b6a8861419b1c1c2b3d39ed1e}
\begin{DoxyReturn}{Returns}
the name how it would be referred to in mountpoint 
\end{DoxyReturn}
\hypertarget{classkdb_1_1tools_1_1Plugin_abf84d512b48f6fa1b89636217537cde0}{\index{kdb\-::tools\-::\-Plugin@{kdb\-::tools\-::\-Plugin}!set@{set}}
\index{set@{set}!kdb::tools::Plugin@{kdb\-::tools\-::\-Plugin}}
\subsubsection[{set}]{\setlength{\rightskip}{0pt plus 5cm}int kdb\-::tools\-::\-Plugin\-::set (
\begin{DoxyParamCaption}
\item[{{\bf kdb\-::\-Key\-Set} \&}]{ks, }
\item[{{\bf kdb\-::\-Key} \&}]{parent\-Key}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Plugin_abf84d512b48f6fa1b89636217537cde0}
Calls the set function of the plugin \begin{DoxyPrecond}{Precondition}
\hyperlink{classkdb_1_1tools_1_1Plugin_adfcba2fbdeb436a1083410df804d5fb0}{parse()} 
\end{DoxyPrecond}


The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\hyperlink{plugin_8hpp}{plugin.\-hpp}\item 
\hyperlink{plugin_8cpp}{plugin.\-cpp}\end{DoxyCompactItemize}
