\hypertarget{classkdb_1_1tools_1_1Backend}{}\doxysection{kdb\+::tools\+::Backend Class Reference}
\label{classkdb_1_1tools_1_1Backend}\index{kdb::tools::Backend@{kdb::tools::Backend}}


A low-\/level representation of the backend (= set of plugins) that can be mounted.  




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



Inheritance diagram for kdb\+::tools\+::Backend\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classkdb_1_1tools_1_1Backend__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for kdb\+::tools\+::Backend\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classkdb_1_1tools_1_1Backend__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classkdb_1_1tools_1_1Backend_a1650b149ebf313ee8cd3472247212263}\label{classkdb_1_1tools_1_1Backend_a1650b149ebf313ee8cd3472247212263}} 
\mbox{\hyperlink{classkdb_1_1tools_1_1Backend_a1650b149ebf313ee8cd3472247212263}{Backend}} ()
\begin{DoxyCompactList}\small\item\em Creates a new empty backend. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classkdb_1_1tools_1_1Backend_ac61b2628800a6fd0a6620ff47bfb3be9}{set\+Mountpoint}} (\mbox{\hyperlink{classkdb_1_1Key}{Key}} mountpoint, \mbox{\hyperlink{classkdb_1_1KeySet}{Key\+Set}} mount\+Conf)
\begin{DoxyCompactList}\small\item\em Sets the mountpoint for the backend. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classkdb_1_1tools_1_1Backend_aa7aa17a1c97cdfa48bcebadb7bc00247}{set\+Backend\+Config}} (\mbox{\hyperlink{classkdb_1_1KeySet}{Key\+Set}} const \&ks)
\begin{DoxyCompactList}\small\item\em \mbox{\hyperlink{classkdb_1_1tools_1_1Backend}{Backend}} Config to add to. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classkdb_1_1tools_1_1Backend_a2cce1cc51617baa5431a6036f5cfe05b}{add\+Plugin}} (\mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} const \&spec)
\begin{DoxyCompactList}\small\item\em Add a plugin that can be loaded, meets all constraints. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classkdb_1_1tools_1_1Backend_a5c72747e5419d7802849cfc2eb4064d2}{use\+Config\+File}} (std\+::string file)
\item 
bool \mbox{\hyperlink{classkdb_1_1tools_1_1Backend_a7b28929231bc592c1a83f42121405496}{validated}} () const
\item 
void \mbox{\hyperlink{classkdb_1_1tools_1_1Backend_a93638ae12d8880bdb528ae709c857be7}{serialize}} (\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&ret)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A low-\/level representation of the backend (= set of plugins) that can be mounted. 

To build a backend, you should prefer \mbox{\hyperlink{classkdb_1_1tools_1_1BackendBuilder}{Backend\+Builder}}, which automatically fixes ordering and allows us to remove plugins. 

\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classkdb_1_1tools_1_1Backend_a2cce1cc51617baa5431a6036f5cfe05b}\label{classkdb_1_1tools_1_1Backend_a2cce1cc51617baa5431a6036f5cfe05b}} 
\index{kdb::tools::Backend@{kdb::tools::Backend}!addPlugin@{addPlugin}}
\index{addPlugin@{addPlugin}!kdb::tools::Backend@{kdb::tools::Backend}}
\doxysubsubsection{\texorpdfstring{addPlugin()}{addPlugin()}}
{\footnotesize\ttfamily void kdb\+::tools\+::\+Backend\+::add\+Plugin (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec}} const \&}]{plugin }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Add a plugin that can be loaded, meets all constraints. 

\begin{DoxyNote}{Note}
that this does not mean that the backend validates after it is added. It only means that the situation is not getting worse.
\end{DoxyNote}

\begin{DoxyExceptions}{Exceptions}
{\em Plugin\+Check\+Exception} & or its subclasses if it was not possible to load the plugin\\
\hline
\end{DoxyExceptions}
For validation \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{classkdb_1_1tools_1_1Backend_a7b28929231bc592c1a83f42121405496}{validated()}}. 
\end{DoxySeeAlso}


Implements \mbox{\hyperlink{classkdb_1_1tools_1_1BackendInterface}{kdb\+::tools\+::\+Backend\+Interface}}.

\mbox{\Hypertarget{classkdb_1_1tools_1_1Backend_a93638ae12d8880bdb528ae709c857be7}\label{classkdb_1_1tools_1_1Backend_a93638ae12d8880bdb528ae709c857be7}} 
\index{kdb::tools::Backend@{kdb::tools::Backend}!serialize@{serialize}}
\index{serialize@{serialize}!kdb::tools::Backend@{kdb::tools::Backend}}
\doxysubsubsection{\texorpdfstring{serialize()}{serialize()}}
{\footnotesize\ttfamily void kdb\+::tools\+::\+Backend\+::serialize (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&}]{ret }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}

\begin{DoxyPrecond}{Precondition}
name and mountpoint set Add plugin serialization into keyset ret.
\end{DoxyPrecond}
Only can be done once! (see first\+Ref in \mbox{\hyperlink{classkdb_1_1tools_1_1Plugin}{Plugin}}) 

Implements \mbox{\hyperlink{classkdb_1_1tools_1_1SerializeInterface}{kdb\+::tools\+::\+Serialize\+Interface}}.

\mbox{\Hypertarget{classkdb_1_1tools_1_1Backend_aa7aa17a1c97cdfa48bcebadb7bc00247}\label{classkdb_1_1tools_1_1Backend_aa7aa17a1c97cdfa48bcebadb7bc00247}} 
\index{kdb::tools::Backend@{kdb::tools::Backend}!setBackendConfig@{setBackendConfig}}
\index{setBackendConfig@{setBackendConfig}!kdb::tools::Backend@{kdb::tools::Backend}}
\doxysubsubsection{\texorpdfstring{setBackendConfig()}{setBackendConfig()}}
{\footnotesize\ttfamily void kdb\+::tools\+::\+Backend\+::set\+Backend\+Config (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classkdb_1_1KeySet}{Key\+Set}} const \&}]{ks }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



\mbox{\hyperlink{classkdb_1_1tools_1_1Backend}{Backend}} Config to add to. 


\begin{DoxyParams}{Parameters}
{\em ks} & the config to add, should be below system\+:/ \\
\hline
\end{DoxyParams}


Implements \mbox{\hyperlink{classkdb_1_1tools_1_1MountBackendInterface}{kdb\+::tools\+::\+Mount\+Backend\+Interface}}.

\mbox{\Hypertarget{classkdb_1_1tools_1_1Backend_ac61b2628800a6fd0a6620ff47bfb3be9}\label{classkdb_1_1tools_1_1Backend_ac61b2628800a6fd0a6620ff47bfb3be9}} 
\index{kdb::tools::Backend@{kdb::tools::Backend}!setMountpoint@{setMountpoint}}
\index{setMountpoint@{setMountpoint}!kdb::tools::Backend@{kdb::tools::Backend}}
\doxysubsubsection{\texorpdfstring{setMountpoint()}{setMountpoint()}}
{\footnotesize\ttfamily void kdb\+::tools\+::\+Backend\+::set\+Mountpoint (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classkdb_1_1Key}{Key}}}]{mountpoint,  }\item[{\mbox{\hyperlink{classkdb_1_1KeySet}{Key\+Set}}}]{mount\+Conf }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Sets the mountpoint for the backend. 


\begin{DoxyExceptions}{Exceptions}
{\em Mountpoint\+Invalid\+Exception} & \\
\hline
{\em Mountpoint\+Already\+In\+Use\+Exception} & \\
\hline
\end{DoxyExceptions}

\begin{DoxyParams}{Parameters}
{\em mountpoint} & the key name will be used as mountpoint. It is allowed to pass a key with a cascading name.\\
\hline
{\em mount\+Conf} & needs to include the keys below system\+:/elektra/mountpoints \\
\hline
\end{DoxyParams}


Implements \mbox{\hyperlink{classkdb_1_1tools_1_1MountBackendInterface}{kdb\+::tools\+::\+Mount\+Backend\+Interface}}.

\mbox{\Hypertarget{classkdb_1_1tools_1_1Backend_a5c72747e5419d7802849cfc2eb4064d2}\label{classkdb_1_1tools_1_1Backend_a5c72747e5419d7802849cfc2eb4064d2}} 
\index{kdb::tools::Backend@{kdb::tools::Backend}!useConfigFile@{useConfigFile}}
\index{useConfigFile@{useConfigFile}!kdb::tools::Backend@{kdb::tools::Backend}}
\doxysubsubsection{\texorpdfstring{useConfigFile()}{useConfigFile()}}
{\footnotesize\ttfamily void kdb\+::tools\+::\+Backend\+::use\+Config\+File (\begin{DoxyParamCaption}\item[{std\+::string}]{file }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}

\begin{DoxyPrecond}{Precondition}
\+: resolver needs to be loaded first Will check the filename and use it as config\+File for this backend. 
\end{DoxyPrecond}

\begin{DoxyExceptions}{Exceptions}
{\em File\+Not\+Valid\+Exception} & if filename is not valid \\
\hline
{\em Missing\+Symbol} & if plugin does not implement \textquotesingle{}checkfile\textquotesingle{} \\
\hline
\end{DoxyExceptions}


Implements \mbox{\hyperlink{classkdb_1_1tools_1_1MountBackendInterface}{kdb\+::tools\+::\+Mount\+Backend\+Interface}}.

\mbox{\Hypertarget{classkdb_1_1tools_1_1Backend_a7b28929231bc592c1a83f42121405496}\label{classkdb_1_1tools_1_1Backend_a7b28929231bc592c1a83f42121405496}} 
\index{kdb::tools::Backend@{kdb::tools::Backend}!validated@{validated}}
\index{validated@{validated}!kdb::tools::Backend@{kdb::tools::Backend}}
\doxysubsubsection{\texorpdfstring{validated()}{validated()}}
{\footnotesize\ttfamily bool kdb\+::tools\+::\+Backend\+::validated (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}

\begin{DoxyReturn}{Returns}
true if backend is validated 

false if more plugins are needed to be valided 
\end{DoxyReturn}


Implements \mbox{\hyperlink{classkdb_1_1tools_1_1MountBackendInterface}{kdb\+::tools\+::\+Mount\+Backend\+Interface}}.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{backend_8hpp}{backend.\+hpp}}\item 
\mbox{\hyperlink{src_2backend_8cpp}{src/backend.\+cpp}}\end{DoxyCompactItemize}
