<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\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 low-\/level representation of the backend (= set of plugins) that can be mounted.  




{\ttfamily \#include $&lt;$backend.\+hpp$&gt;$}



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}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classkdb_1_1tools_1_1Backend_a1650b149ebf313ee8cd3472247212263}\label{classkdb_1_1tools_1_1Backend_a1650b149ebf313ee8cd3472247212263}} 
\hyperlink{classkdb_1_1tools_1_1Backend_a1650b149ebf313ee8cd3472247212263}{Backend} ()
\begin{DoxyCompactList}\small\item\em Creates a new empty backend. \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 \&amp;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_a2cce1cc51617baa5431a6036f5cfe05b}{add\+Plugin} (\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec} const \&amp;spec)
\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_a7b28929231bc592c1a83f42121405496}{validated} () const
\item 
void \hyperlink{classkdb_1_1tools_1_1Backend_a93638ae12d8880bdb528ae709c857be7}{serialize} (\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set} \&amp;ret)
\end{DoxyCompactItemize}


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

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

\subsection{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}!add\+Plugin@{add\+Plugin}}
\index{add\+Plugin@{add\+Plugin}!kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}}
\subsubsection{\texorpdfstring{add\+Plugin()}{addPlugin()}}
{\footnotesize\ttfamily void kdb\+::tools\+::\+Backend\+::add\+Plugin (\begin{DoxyParamCaption}\item[{\hyperlink{classkdb_1_1tools_1_1PluginSpec}{Plugin\+Spec} const \&amp;}]{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} &amp; 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_a7b28929231bc592c1a83f42121405496}{validated()}. 
\end{DoxySeeAlso}


Implements \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}}
\subsubsection{\texorpdfstring{serialize()}{serialize()}}
{\footnotesize\ttfamily void kdb\+::tools\+::\+Backend\+::serialize (\begin{DoxyParamCaption}\item[{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set} \&amp;}]{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 \hyperlink{classkdb_1_1tools_1_1Plugin}{Plugin}) 

Implements \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}!set\+Backend\+Config@{set\+Backend\+Config}}
\index{set\+Backend\+Config@{set\+Backend\+Config}!kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}}
\subsubsection{\texorpdfstring{set\+Backend\+Config()}{setBackendConfig()}}
{\footnotesize\ttfamily void kdb\+::tools\+::\+Backend\+::set\+Backend\+Config (\begin{DoxyParamCaption}\item[{\hyperlink{classkdb_1_1KeySet}{Key\+Set} const \&amp;}]{ks }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



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


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


Implements \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}!set\+Mountpoint@{set\+Mountpoint}}
\index{set\+Mountpoint@{set\+Mountpoint}!kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}}
\subsubsection{\texorpdfstring{set\+Mountpoint()}{setMountpoint()}}
{\footnotesize\ttfamily void kdb\+::tools\+::\+Backend\+::set\+Mountpoint (\begin{DoxyParamCaption}\item[{\hyperlink{classkdb_1_1Key}{Key}}]{mountpoint,  }\item[{\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} &amp; \\
\hline
{\em Mountpoint\+Already\+In\+Use\+Exception} &amp; \\
\hline
\end{DoxyExceptions}

\begin{DoxyParams}{Parameters}
{\em mountpoint} &amp; 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\+ME\\
\hline
{\em mount\+Conf} &amp; needs to include the keys below system/elektra/mountpoints \\
\hline
\end{DoxyParams}


Implements \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}!use\+Config\+File@{use\+Config\+File}}
\index{use\+Config\+File@{use\+Config\+File}!kdb\+::tools\+::\+Backend@{kdb\+::tools\+::\+Backend}}
\subsubsection{\texorpdfstring{use\+Config\+File()}{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} &amp; if filename is not valid \\
\hline
{\em Missing\+Symbol} &amp; if plugin does not implement \textquotesingle{}checkfile\textquotesingle{} \\
\hline
\end{DoxyExceptions}


Implements \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}}
\subsubsection{\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 \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 
\hyperlink{backend_8hpp}{backend.\+hpp}\item 
\hyperlink{src_2backend_8cpp}{src/backend.\+cpp}\end{DoxyCompactItemize}
</pre></body></html>