\hypertarget{classkdb_1_1tools_1_1PluginDatabase}{}\section{kdb\+::tools\+::Plugin\+Database Class Reference}
\label{classkdb_1_1tools_1_1PluginDatabase}\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}


Loads all plugins and allows us to query them.  




{\ttfamily \#include $<$plugindatabase.\+hpp$>$}



Inheritance diagram for kdb\+::tools\+::Plugin\+Database\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=253pt]{classkdb_1_1tools_1_1PluginDatabase__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601}{Status}} \{ \mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601a73ff10d6a07213c277db4326b3df6c4b}{provides}}, 
\mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601a2b7279a50ed80231a60b0435340c31a8}{real}}, 
\mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601ae789aaff1847ebb77eecb027c5ee0401}{missing}}
 \}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual std\+::vector$<$ std\+::string $>$ \mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_adc1f43ccefdd7fc15a57db7571420642}{list\+All\+Plugins}} () const =0
\begin{DoxyCompactList}\small\item\em list all plugins \end{DoxyCompactList}\item 
virtual std\+::string \mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_ac0af2ec31a98f4176c19eaf34977abbe}{lookup\+Info}} (\mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} const \&whichplugin, std\+::string const \&which) const =0
\begin{DoxyCompactList}\small\item\em lookup contract clauses or dynamic information \end{DoxyCompactList}\item 
virtual func\+\_\+t \mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_a87b5ef6ee66ce1ad46cc590a2b60b9fa}{get\+Symbol}} (\mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} const \&whichplugin, std\+::string const \&which) const =0
\begin{DoxyCompactList}\small\item\em get exported plugin symbol \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} \mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_a03a416f66d6525f46929e5a68d9db3f7}{lookup\+Metadata}} (std\+::string const \&which) const =0
\begin{DoxyCompactList}\small\item\em lookup which plugin handles metadata \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} \mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_a43abe56a024218ecee48526ced699f05}{lookup\+Provides}} (std\+::string const \&\mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601a73ff10d6a07213c277db4326b3df6c4b}{provides}}) const =0
\begin{DoxyCompactList}\small\item\em lookup which plugin is a provider for that plugin \end{DoxyCompactList}\item 
virtual std\+::map$<$ int, \mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} $>$ \mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_aa918b547973f627a5604fa3b2b3faf30}{lookup\+All\+Provides\+With\+Status}} (std\+::string const \&\mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601a73ff10d6a07213c277db4326b3df6c4b}{provides}}) const =0
\begin{DoxyCompactList}\small\item\em looks up all plugins which are a suitable provider \end{DoxyCompactList}\item 
virtual std\+::vector$<$ \mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} $>$ \mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_a3ed261ad8562c423b64cf34cbc086161}{lookup\+All\+Provides}} (std\+::string const \&\mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601a73ff10d6a07213c277db4326b3df6c4b}{provides}}) const =0
\begin{DoxyCompactList}\small\item\em looks up all plugins which are a suitable provider \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static int \mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_ab901b98a6c7661bbccffa8ab9ff62dc6}{calculate\+Status}} (std\+::string status\+String)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Loads all plugins and allows us to query them. 

\subsection{Member Enumeration Documentation}
\mbox{\Hypertarget{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601}\label{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601}} 
\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}!Status@{Status}}
\index{Status@{Status}!kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}
\subsubsection{\texorpdfstring{Status}{Status}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601}{kdb\+::tools\+::\+Plugin\+Database\+::\+Status}}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{provides@{provides}!kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}!provides@{provides}}}\mbox{\Hypertarget{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601a73ff10d6a07213c277db4326b3df6c4b}\label{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601a73ff10d6a07213c277db4326b3df6c4b}} 
provides&does not directly, but can be loaded via provides \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{real@{real}!kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}!real@{real}}}\mbox{\Hypertarget{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601a2b7279a50ed80231a60b0435340c31a8}\label{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601a2b7279a50ed80231a60b0435340c31a8}} 
real&exists and working as given \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{missing@{missing}!kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}!missing@{missing}}}\mbox{\Hypertarget{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601ae789aaff1847ebb77eecb027c5ee0401}\label{classkdb_1_1tools_1_1PluginDatabase_afc91ff760616ee83c6afb70e5a2f0601ae789aaff1847ebb77eecb027c5ee0401}} 
missing&does not exist or cannot be loaded \\
\hline

\end{DoxyEnumFields}


\subsection{Member Function Documentation}
\mbox{\Hypertarget{classkdb_1_1tools_1_1PluginDatabase_ab901b98a6c7661bbccffa8ab9ff62dc6}\label{classkdb_1_1tools_1_1PluginDatabase_ab901b98a6c7661bbccffa8ab9ff62dc6}} 
\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}!calculateStatus@{calculateStatus}}
\index{calculateStatus@{calculateStatus}!kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}
\subsubsection{\texorpdfstring{calculateStatus()}{calculateStatus()}}
{\footnotesize\ttfamily int kdb\+::tools\+::\+Plugin\+Database\+::calculate\+Status (\begin{DoxyParamCaption}\item[{std\+::string}]{status\+String }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}


\begin{DoxyParams}{Parameters}
{\em status\+String} & the string encoding the status\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The representing number for a given status. 
\end{DoxyReturn}
\mbox{\Hypertarget{classkdb_1_1tools_1_1PluginDatabase_a87b5ef6ee66ce1ad46cc590a2b60b9fa}\label{classkdb_1_1tools_1_1PluginDatabase_a87b5ef6ee66ce1ad46cc590a2b60b9fa}} 
\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}!getSymbol@{getSymbol}}
\index{getSymbol@{getSymbol}!kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}
\subsubsection{\texorpdfstring{getSymbol()}{getSymbol()}}
{\footnotesize\ttfamily virtual func\+\_\+t kdb\+::tools\+::\+Plugin\+Database\+::get\+Symbol (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} const \&}]{whichplugin,  }\item[{std\+::string const \&}]{which }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



get exported plugin symbol 


\begin{DoxyParams}{Parameters}
{\em whichplugin} & from which plugin? \\
\hline
{\em which} & which symbol would you like to look up?\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the function pointer to the exported symbol or N\+U\+LL if the symbol was not found 
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{classkdb_1_1tools_1_1MockPluginDatabase_a5a701fd310be0e9f7d14a865c0226517}{kdb\+::tools\+::\+Mock\+Plugin\+Database}}, and \mbox{\hyperlink{classkdb_1_1tools_1_1ModulesPluginDatabase_a0e81e1b7b296a52f8040fd966b461c3a}{kdb\+::tools\+::\+Modules\+Plugin\+Database}}.

\mbox{\Hypertarget{classkdb_1_1tools_1_1PluginDatabase_adc1f43ccefdd7fc15a57db7571420642}\label{classkdb_1_1tools_1_1PluginDatabase_adc1f43ccefdd7fc15a57db7571420642}} 
\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}!listAllPlugins@{listAllPlugins}}
\index{listAllPlugins@{listAllPlugins}!kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}
\subsubsection{\texorpdfstring{listAllPlugins()}{listAllPlugins()}}
{\footnotesize\ttfamily virtual std\+::vector$<$std\+::string$>$ kdb\+::tools\+::\+Plugin\+Database\+::list\+All\+Plugins (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



list all plugins 

If Elektra is compiled with plugins, it will search for shared libraries. In any case, if no shared libraries were found it will fallback to an internal list (plugins that were compiled together with Elektra).

\begin{DoxyReturn}{Returns}
a list of all available plugins 
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{classkdb_1_1tools_1_1MockPluginDatabase_a3663848683953bfad7123c48c00ab404}{kdb\+::tools\+::\+Mock\+Plugin\+Database}}, and \mbox{\hyperlink{classkdb_1_1tools_1_1ModulesPluginDatabase_a3fa5a08caf47cb79f9889641a96f197b}{kdb\+::tools\+::\+Modules\+Plugin\+Database}}.

\mbox{\Hypertarget{classkdb_1_1tools_1_1PluginDatabase_a3ed261ad8562c423b64cf34cbc086161}\label{classkdb_1_1tools_1_1PluginDatabase_a3ed261ad8562c423b64cf34cbc086161}} 
\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}!lookupAllProvides@{lookupAllProvides}}
\index{lookupAllProvides@{lookupAllProvides}!kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}
\subsubsection{\texorpdfstring{lookupAllProvides()}{lookupAllProvides()}}
{\footnotesize\ttfamily virtual std\+::vector$<$\mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}}$>$ kdb\+::tools\+::\+Plugin\+Database\+::lookup\+All\+Provides (\begin{DoxyParamCaption}\item[{std\+::string const \&}]{provides }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



looks up all plugins which are a suitable provider 

\begin{DoxyNote}{Note}
in case a plugin name is provided, the plugin with the name will also be part of the result. But if there are other plugins providing the requirement, then they will also be part of the result. The ordering of the resulting vector has no special meaning.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em provides} & is the provider to find\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a vector of plugins offering the requirement or are named after it 
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{classkdb_1_1tools_1_1ModulesPluginDatabase_a306384e88f9cf2874f6ba9ce28973a26}{kdb\+::tools\+::\+Modules\+Plugin\+Database}}.

\mbox{\Hypertarget{classkdb_1_1tools_1_1PluginDatabase_aa918b547973f627a5604fa3b2b3faf30}\label{classkdb_1_1tools_1_1PluginDatabase_aa918b547973f627a5604fa3b2b3faf30}} 
\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}!lookupAllProvidesWithStatus@{lookupAllProvidesWithStatus}}
\index{lookupAllProvidesWithStatus@{lookupAllProvidesWithStatus}!kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}
\subsubsection{\texorpdfstring{lookupAllProvidesWithStatus()}{lookupAllProvidesWithStatus()}}
{\footnotesize\ttfamily virtual std\+::map$<$int, \mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}}$>$ kdb\+::tools\+::\+Plugin\+Database\+::lookup\+All\+Provides\+With\+Status (\begin{DoxyParamCaption}\item[{std\+::string const \&}]{provides }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



looks up all plugins which are a suitable provider 

\begin{DoxyNote}{Note}
in case a plugin name is provided, the plugin with the name will also be part of the result. But if there are other plugins providing the requirement, then they will also be part of the result.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em provides} & is the provider to find\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a map of plugins with their status offering the requirement or are named after it 
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{classkdb_1_1tools_1_1ModulesPluginDatabase_abe19487ff2a2e0548288dfa2a5678ae1}{kdb\+::tools\+::\+Modules\+Plugin\+Database}}.

\mbox{\Hypertarget{classkdb_1_1tools_1_1PluginDatabase_ac0af2ec31a98f4176c19eaf34977abbe}\label{classkdb_1_1tools_1_1PluginDatabase_ac0af2ec31a98f4176c19eaf34977abbe}} 
\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}!lookupInfo@{lookupInfo}}
\index{lookupInfo@{lookupInfo}!kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}
\subsubsection{\texorpdfstring{lookupInfo()}{lookupInfo()}}
{\footnotesize\ttfamily virtual std\+::string kdb\+::tools\+::\+Plugin\+Database\+::lookup\+Info (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} const \&}]{whichplugin,  }\item[{std\+::string const \&}]{which }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



lookup contract clauses or dynamic information 


\begin{DoxyParams}{Parameters}
{\em whichplugin} & about which plugin? \\
\hline
{\em which} & about which clause in the contract?\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the clause of the contract 
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{classkdb_1_1tools_1_1MockPluginDatabase_ae352c27aa51bc8c2ea8c708d14f6fc76}{kdb\+::tools\+::\+Mock\+Plugin\+Database}}, and \mbox{\hyperlink{classkdb_1_1tools_1_1ModulesPluginDatabase_a3f51beee8aecb4371e7d12e98958f875}{kdb\+::tools\+::\+Modules\+Plugin\+Database}}.

\mbox{\Hypertarget{classkdb_1_1tools_1_1PluginDatabase_a03a416f66d6525f46929e5a68d9db3f7}\label{classkdb_1_1tools_1_1PluginDatabase_a03a416f66d6525f46929e5a68d9db3f7}} 
\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}!lookupMetadata@{lookupMetadata}}
\index{lookupMetadata@{lookupMetadata}!kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}
\subsubsection{\texorpdfstring{lookupMetadata()}{lookupMetadata()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} kdb\+::tools\+::\+Plugin\+Database\+::lookup\+Metadata (\begin{DoxyParamCaption}\item[{std\+::string const \&}]{which }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



lookup which plugin handles metadata 


\begin{DoxyParams}{Parameters}
{\em which} & the metadata of interest\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the best suited plugin specification which provides it 
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{classkdb_1_1tools_1_1ModulesPluginDatabase_aa7f244f0271ea9b2a3f5b52779167f55}{kdb\+::tools\+::\+Modules\+Plugin\+Database}}.

\mbox{\Hypertarget{classkdb_1_1tools_1_1PluginDatabase_a43abe56a024218ecee48526ced699f05}\label{classkdb_1_1tools_1_1PluginDatabase_a43abe56a024218ecee48526ced699f05}} 
\index{kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}!lookupProvides@{lookupProvides}}
\index{lookupProvides@{lookupProvides}!kdb::tools::PluginDatabase@{kdb::tools::PluginDatabase}}
\subsubsection{\texorpdfstring{lookupProvides()}{lookupProvides()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} kdb\+::tools\+::\+Plugin\+Database\+::lookup\+Provides (\begin{DoxyParamCaption}\item[{std\+::string const \&}]{provides }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



lookup which plugin is a provider for that plugin 

\begin{DoxyNote}{Note}
will return a \mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} with get\+Name() == provides if the string provides actually is a plugin name.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em provides} & is the provider to find\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em No\+Plugin} & if no plugin that provides the functionality could be found\\
\hline
\end{DoxyExceptions}
\begin{DoxyReturn}{Returns}
the plugin itself or the best suited plugin specification which provides it 
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{classkdb_1_1tools_1_1ModulesPluginDatabase_acdb15c10fc34f74687ecbbf8bac526f6}{kdb\+::tools\+::\+Modules\+Plugin\+Database}}.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{plugindatabase_8hpp}{plugindatabase.\+hpp}}\item 
\mbox{\hyperlink{plugindatabase_8cpp}{plugindatabase.\+cpp}}\end{DoxyCompactItemize}
