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


A representation of the backend (= set of plugins) that can be mounted.  




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

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classkdb_1_1tools_1_1Backend_a1650b149ebf313ee8cd3472247212263}{Backend} ()
\begin{DoxyCompactList}\small\item\em Creates a new backend with a given name and mountpoint. \end{DoxyCompactList}\item 
void \hyperlink{classkdb_1_1tools_1_1Backend_ac61b2628800a6fd0a6620ff47bfb3be9}{set\+Mountpoint} (\hyperlink{classkdb_1_1Key}{Key} mountpoint, \hyperlink{classkdb_1_1KeySet}{Key\+Set} mount\+Conf)
\begin{DoxyCompactList}\small\item\em Sets the mountpoint for the backend. \end{DoxyCompactList}\item 
void \hyperlink{classkdb_1_1tools_1_1Backend_aa7aa17a1c97cdfa48bcebadb7bc00247}{set\+Backend\+Config} (\hyperlink{classkdb_1_1KeySet}{Key\+Set} const \&ks)
\begin{DoxyCompactList}\small\item\em \hyperlink{classkdb_1_1tools_1_1Backend}{Backend} Config to add to. \end{DoxyCompactList}\item 
void \hyperlink{classkdb_1_1tools_1_1Backend_ab9926bd1bbbc095b09a0a6666058cd05}{add\+Plugin} (std\+::string name, \hyperlink{classkdb_1_1KeySet}{Key\+Set} plugin\+Conf=\hyperlink{classkdb_1_1KeySet}{Key\+Set}())
\begin{DoxyCompactList}\small\item\em Add a plugin that can be loaded, meets all constraints. \end{DoxyCompactList}\item 
void \hyperlink{classkdb_1_1tools_1_1Backend_a5c72747e5419d7802849cfc2eb4064d2}{use\+Config\+File} (std\+::string file)
\item 
bool \hyperlink{classkdb_1_1tools_1_1Backend_ad2b145e2ac9a4f276714d0d982583e03}{validated} () const 
\item 
void \hyperlink{classkdb_1_1tools_1_1Backend_a93638ae12d8880bdb528ae709c857be7}{serialize} (\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set} \&ret)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
A representation of the backend (= set of plugins) that can be mounted. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classkdb_1_1tools_1_1Backend_a1650b149ebf313ee8cd3472247212263}{\index{kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}!Backend@{Backend}}
\index{Backend@{Backend}!kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}}
\subsubsection[{Backend}]{\setlength{\rightskip}{0pt plus 5cm}kdb\+::tools\+::\+Backend\+::\+Backend (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Backend_a1650b149ebf313ee8cd3472247212263}


Creates a new backend with a given name and mountpoint. 

Parameters are needed for serialisation only, so you can keep them empty if you do not want to serialise. 

\subsection{Member Function Documentation}
\hypertarget{classkdb_1_1tools_1_1Backend_ab9926bd1bbbc095b09a0a6666058cd05}{\index{kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}!add\+Plugin@{add\+Plugin}}
\index{add\+Plugin@{add\+Plugin}!kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}}
\subsubsection[{add\+Plugin}]{\setlength{\rightskip}{0pt plus 5cm}void kdb\+::tools\+::\+Backend\+::add\+Plugin (
\begin{DoxyParamCaption}
\item[{std\+::string}]{plugin\+Name, }
\item[{{\bf Key\+Set}}]{plugin\+Conf = {\ttfamily {\bf Key\+Set}()}}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Backend_ab9926bd1bbbc095b09a0a6666058cd05}


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}
\hyperlink{classkdb_1_1tools_1_1Backend_ad2b145e2ac9a4f276714d0d982583e03}{validated()}. 
\end{DoxySeeAlso}
\hypertarget{classkdb_1_1tools_1_1Backend_a93638ae12d8880bdb528ae709c857be7}{\index{kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}!serialize@{serialize}}
\index{serialize@{serialize}!kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}}
\subsubsection[{serialize}]{\setlength{\rightskip}{0pt plus 5cm}void kdb\+::tools\+::\+Backend\+::serialize (
\begin{DoxyParamCaption}
\item[{{\bf kdb\+::\+Key\+Set} \&}]{ret}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Backend_a93638ae12d8880bdb528ae709c857be7}
\begin{DoxyPrecond}{Precondition}
name and mountpoint set Add plugin serialization into keyset ret.
\end{DoxyPrecond}
Only can be done once! (see first\+Ref in \hyperlink{classkdb_1_1tools_1_1Plugin}{Plugin}) \hypertarget{classkdb_1_1tools_1_1Backend_aa7aa17a1c97cdfa48bcebadb7bc00247}{\index{kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}!set\+Backend\+Config@{set\+Backend\+Config}}
\index{set\+Backend\+Config@{set\+Backend\+Config}!kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}}
\subsubsection[{set\+Backend\+Config}]{\setlength{\rightskip}{0pt plus 5cm}void kdb\+::tools\+::\+Backend\+::set\+Backend\+Config (
\begin{DoxyParamCaption}
\item[{{\bf Key\+Set} const \&}]{ks}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Backend_aa7aa17a1c97cdfa48bcebadb7bc00247}


\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}
\hypertarget{classkdb_1_1tools_1_1Backend_ac61b2628800a6fd0a6620ff47bfb3be9}{\index{kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}!set\+Mountpoint@{set\+Mountpoint}}
\index{set\+Mountpoint@{set\+Mountpoint}!kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}}
\subsubsection[{set\+Mountpoint}]{\setlength{\rightskip}{0pt plus 5cm}void kdb\+::tools\+::\+Backend\+::set\+Mountpoint (
\begin{DoxyParamCaption}
\item[{{\bf Key}}]{mountpoint, }
\item[{{\bf Key\+Set}}]{mount\+Conf}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Backend_ac61b2628800a6fd0a6620ff47bfb3be9}


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 K\+E\+Y\+\_\+\+C\+A\+S\+C\+A\+D\+I\+N\+G\+\_\+\+N\+A\+M\+E\\
\hline
{\em mount\+Conf} & needs to include the keys below system/elektra/mountpoints \\
\hline
\end{DoxyParams}
\hypertarget{classkdb_1_1tools_1_1Backend_a5c72747e5419d7802849cfc2eb4064d2}{\index{kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}!use\+Config\+File@{use\+Config\+File}}
\index{use\+Config\+File@{use\+Config\+File}!kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}}
\subsubsection[{use\+Config\+File}]{\setlength{\rightskip}{0pt plus 5cm}void kdb\+::tools\+::\+Backend\+::use\+Config\+File (
\begin{DoxyParamCaption}
\item[{std\+::string}]{file}
\end{DoxyParamCaption}
)}}\label{classkdb_1_1tools_1_1Backend_a5c72747e5419d7802849cfc2eb4064d2}
\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
\end{DoxyExceptions}
\hypertarget{classkdb_1_1tools_1_1Backend_ad2b145e2ac9a4f276714d0d982583e03}{\index{kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}!validated@{validated}}
\index{validated@{validated}!kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}}
\subsubsection[{validated}]{\setlength{\rightskip}{0pt plus 5cm}bool kdb\+::tools\+::\+Backend\+::validated (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}\label{classkdb_1_1tools_1_1Backend_ad2b145e2ac9a4f276714d0d982583e03}
\begin{DoxyReturn}{Returns}
true if backend is validated 

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


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