<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\hypertarget{namespacekdb}{}\doxysection{kdb Namespace Reference}
\label{namespacekdb}\index{kdb@{kdb}}


This is the main namespace for the C++ binding and libraries.  


\doxysubsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
 \mbox{\hyperlink{namespacekdb_1_1tools}{tools}}
\begin{DoxyCompactList}\small\item\em This namespace is for the libtool library. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \mbox{\hyperlink{classkdb_1_1ElektraDiff}{Elektra\+Diff}}
\begin{DoxyCompactList}\small\item\em This class is a wrapper around the \mbox{\hyperlink{classkdb_1_1ElektraDiff}{Elektra\+Diff}} C struct. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1KDB}{KDB}}
\begin{DoxyCompactList}\small\item\em Constructs a class \mbox{\hyperlink{classkdb_1_1KDB}{KDB}}. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1Context}{Context}}
\begin{DoxyCompactList}\small\item\em Provides a context for configuration. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1ThreadSubject}{Thread\+Subject}}
\begin{DoxyCompactList}\small\item\em Subject from Observer pattern for Thread\+Context. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structkdb_1_1PerContext}{Per\+Context}}
\begin{DoxyCompactList}\small\item\em A data structure that is stored by context inside the \mbox{\hyperlink{classkdb_1_1Coordinator}{Coordinator}}. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1Coordinator}{Coordinator}}
\begin{DoxyCompactList}\small\item\em Thread safe coordination of Thread\+Context per Threads. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1none__t}{none\+\_\+t}}
\begin{DoxyCompactList}\small\item\em This type is being used as bottom type that always fails. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1Layer}{Layer}}
\begin{DoxyCompactList}\small\item\em Base class for all layers. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1Wrapped}{Wrapped}}
\begin{DoxyCompactList}\small\item\em Everything implementing this interface can be used as layer. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1ValueObserver}{Value\+Observer}}
\begin{DoxyCompactList}\small\item\em Base class for values to be observed. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structkdb_1_1Command}{Command}}
\begin{DoxyCompactList}\small\item\em Used by contexts for callbacks (to run code using a mutex). \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1DefaultGetPolicy}{Default\+Get\+Policy}}
\begin{DoxyCompactList}\small\item\em Implements lookup with spec. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1DefaultSetPolicy}{Default\+Set\+Policy}}
\begin{DoxyCompactList}\small\item\em Implements creating user\+:/ key when key is not found. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1GetPolicyIs}{Get\+Policy\+Is}}
\begin{DoxyCompactList}\small\item\em Needed by the user to set one of the policies. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1SetPolicyIs}{Set\+Policy\+Is}}
\begin{DoxyCompactList}\small\item\em Needed by the user to set one of the policies. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1ContextPolicyIs}{Context\+Policy\+Is}}
\begin{DoxyCompactList}\small\item\em Needed by the user to set one of the policies. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1WritePolicyIs}{Write\+Policy\+Is}}
\begin{DoxyCompactList}\small\item\em Needed by the user to set one of the policies. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1ObserverPolicyIs}{Observer\+Policy\+Is}}
\begin{DoxyCompactList}\small\item\em Needed by the user to set one of the policies. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1LockPolicyIs}{Lock\+Policy\+Is}}
\begin{DoxyCompactList}\small\item\em Needed by the user to set one of the policies. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1Key}{Key}}
\begin{DoxyCompactList}\small\item\em \mbox{\hyperlink{classkdb_1_1Key}{Key}} is an essential class that encapsulates key \mbox{\hyperlink{group__keyname}{name }}, \mbox{\hyperlink{group__keyvalue}{value }} and \mbox{\hyperlink{group__keymeta}{metainfo }}. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1NameIterator}{Name\+Iterator}}
\begin{DoxyCompactList}\small\item\em For C++ forward Iteration over Names. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1NameReverseIterator}{Name\+Reverse\+Iterator}}
\begin{DoxyCompactList}\small\item\em For C++ reverse Iteration over Names. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structkdb_1_1VaAlloc}{Va\+Alloc}}
\begin{DoxyCompactList}\small\item\em Needed to avoid constructor ambiguity. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1KeySet}{Key\+Set}}
\begin{DoxyCompactList}\small\item\em A keyset holds together a set of keys. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1KeySetIterator}{Key\+Set\+Iterator}}
\begin{DoxyCompactList}\small\item\em For C++ forward Iteration over Key\+Sets. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classkdb_1_1KeySetReverseIterator}{Key\+Set\+Reverse\+Iterator}}
\begin{DoxyCompactList}\small\item\em For C++ reverse Iteration over Key\+Sets. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{namespacekdb_ac389d72a0c7be0c026628870f81148fe}\label{namespacekdb_ac389d72a0c7be0c026628870f81148fe}} 
typedef std\+::unordered\+\_\+map$&lt;$ std\+::string, Layer\+Action $&gt;$ \mbox{\hyperlink{namespacekdb_ac389d72a0c7be0c026628870f81148fe}{Layer\+Map}}
\begin{DoxyCompactList}\small\item\em A vector of layers. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{namespacekdb_afc8477f4bb768ada40b8e4b82d9fcaf0}{gopts\+Contract}} (\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;contract, int argc, const char $\ast$const $\ast$argv, const char $\ast$const $\ast$envp, const \mbox{\hyperlink{classkdb_1_1Key}{kdb\+::\+Key}} \&amp;parent\+Key, \mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;gopts\+Config)
\item 
int \mbox{\hyperlink{namespacekdb_a90e4547be745a211a4ad95bdd27d0254}{gopts\+Contract}} (\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;contract, const std\+::string \&amp;args\+String, const std\+::string \&amp;env\+String, const \mbox{\hyperlink{classkdb_1_1Key}{kdb\+::\+Key}} \&amp;parent\+Key, \mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;gopts\+Config)
\begin{DoxyCompactList}\small\item\em Prefer to use gopts\+Contract with argc, argv and envp if possible (especially when you are calling this in your main function) \end{DoxyCompactList}\item 
int \mbox{\hyperlink{namespacekdb_afa8d46930ac176c22c7f4e77c776d08e}{gopts\+Contract}} (\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;contract, const std\+::vector$&lt;$ std\+::string $&gt;$ \&amp;args, const std\+::vector$&lt;$ std\+::string $&gt;$ \&amp;env, const \mbox{\hyperlink{classkdb_1_1Key}{kdb\+::\+Key}} \&amp;parent\+Key, \mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;gopts\+Config)
\begin{DoxyCompactList}\small\item\em Prefer to use gopts\+Contract with argc, argv and envp if possible (especially when you are calling this in your main function) \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{namespacekdb_a53a162c7ff73150a3f6e6ab9d191aab0}{operator$&lt;$}} (\mbox{\hyperlink{classkdb_1_1ValueObserver}{Value\+Observer}} const \&amp;lhs, \mbox{\hyperlink{classkdb_1_1ValueObserver}{Value\+Observer}} const \&amp;rhs)
\begin{DoxyCompactList}\small\item\em Needed to put a \mbox{\hyperlink{classkdb_1_1ValueObserver}{Value\+Observer}} in a map. \end{DoxyCompactList}\item 
std\+::ostream \&amp; \mbox{\hyperlink{namespacekdb_ac004b5ba79154cbba02d5e5d83337e47}{operator$&lt;$$&lt;$}} (std\+::ostream \&amp;os, \mbox{\hyperlink{classkdb_1_1Key}{kdb\+::\+Key}} const \&amp;k)
\begin{DoxyCompactList}\small\item\em Stream the name of a key. \end{DoxyCompactList}\item 
std\+::istream \&amp; \mbox{\hyperlink{namespacekdb_a66342865d6cdbb19075f52d92e7a61b1}{operator$&gt;$$&gt;$}} (std\+::istream \&amp;is, \mbox{\hyperlink{classkdb_1_1Key}{kdb\+::\+Key}} \&amp;k)
\begin{DoxyCompactList}\small\item\em Reads a line with a keys name. \end{DoxyCompactList}\item 
std\+::ostream \&amp; \mbox{\hyperlink{namespacekdb_afd28754a48d420d2f2a41c5d8242f3fb}{operator$&lt;$$&lt;$}} (std\+::ostream \&amp;os, \mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} const \&amp;cks)
\begin{DoxyCompactList}\small\item\em Outputs line per line the keynames. \end{DoxyCompactList}\item 
std\+::istream \&amp; \mbox{\hyperlink{namespacekdb_ac4479a9f39ed65ffd251161bcaf8ea89}{operator$&gt;$$&gt;$}} (std\+::istream \&amp;is, \mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;ks)
\begin{DoxyCompactList}\small\item\em Reads line per line key names and appends those keys to ks. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This is the main namespace for the C++ binding and libraries. 

Classes or Functions directly below this namespace are header-\/only. Sub namespaces are intended for libraries and you need to link the library if you want to use them.
\begin{DoxyItemize}
\item \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{namespacekdb_1_1tools}{kdb\+::tools}} 
\end{DoxySeeAlso}

\end{DoxyItemize}

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{namespacekdb_a90e4547be745a211a4ad95bdd27d0254}\label{namespacekdb_a90e4547be745a211a4ad95bdd27d0254}} 
\index{kdb@{kdb}!goptsContract@{goptsContract}}
\index{goptsContract@{goptsContract}!kdb@{kdb}}
\doxysubsubsection{\texorpdfstring{goptsContract()}{goptsContract()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily int kdb\+::gopts\+Contract (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;}]{contract,  }\item[{const std\+::string \&amp;}]{args\+String,  }\item[{const std\+::string \&amp;}]{env\+String,  }\item[{const \mbox{\hyperlink{classkdb_1_1Key}{kdb\+::\+Key}} \&amp;}]{parent\+Key,  }\item[{\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;}]{gopts\+Config }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Prefer to use gopts\+Contract with argc, argv and envp if possible (especially when you are calling this in your main function) 

This function mainly exists for use from language bindings.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{kdbgopts_8h_ade81f23438c00b284247955e8b4b207d}{elektra\+GOpts\+Contract\+From\+Strings}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{namespacekdb_afa8d46930ac176c22c7f4e77c776d08e}\label{namespacekdb_afa8d46930ac176c22c7f4e77c776d08e}} 
\index{kdb@{kdb}!goptsContract@{goptsContract}}
\index{goptsContract@{goptsContract}!kdb@{kdb}}
\doxysubsubsection{\texorpdfstring{goptsContract()}{goptsContract()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily int kdb\+::gopts\+Contract (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;}]{contract,  }\item[{const std\+::vector$&lt;$ std\+::string $&gt;$ \&amp;}]{args,  }\item[{const std\+::vector$&lt;$ std\+::string $&gt;$ \&amp;}]{env,  }\item[{const \mbox{\hyperlink{classkdb_1_1Key}{kdb\+::\+Key}} \&amp;}]{parent\+Key,  }\item[{\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;}]{gopts\+Config }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Prefer to use gopts\+Contract with argc, argv and envp if possible (especially when you are calling this in your main function) 

This function mainly exists for use from language bindings.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{kdbgopts_8h_ade81f23438c00b284247955e8b4b207d}{elektra\+GOpts\+Contract\+From\+Strings}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{namespacekdb_afc8477f4bb768ada40b8e4b82d9fcaf0}\label{namespacekdb_afc8477f4bb768ada40b8e4b82d9fcaf0}} 
\index{kdb@{kdb}!goptsContract@{goptsContract}}
\index{goptsContract@{goptsContract}!kdb@{kdb}}
\doxysubsubsection{\texorpdfstring{goptsContract()}{goptsContract()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily int kdb\+::gopts\+Contract (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;}]{contract,  }\item[{int}]{argc,  }\item[{const char $\ast$const $\ast$}]{argv,  }\item[{const char $\ast$const $\ast$}]{envp,  }\item[{const \mbox{\hyperlink{classkdb_1_1Key}{kdb\+::\+Key}} \&amp;}]{parent\+Key,  }\item[{\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;}]{gopts\+Config }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{kdbgopts_8h_af4f606fc2179e917a10c77dab576d648}{elektra\+GOpts\+Contract}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{namespacekdb_a53a162c7ff73150a3f6e6ab9d191aab0}\label{namespacekdb_a53a162c7ff73150a3f6e6ab9d191aab0}} 
\index{kdb@{kdb}!operator$&lt;$@{operator$&lt;$}}
\index{operator$&lt;$@{operator$&lt;$}!kdb@{kdb}}
\doxysubsubsection{\texorpdfstring{operator$&lt;$()}{operator&lt;()}}
{\footnotesize\ttfamily bool kdb\+::operator$&lt;$ (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classkdb_1_1ValueObserver}{Value\+Observer}} const \&amp;}]{lhs,  }\item[{\mbox{\hyperlink{classkdb_1_1ValueObserver}{Value\+Observer}} const \&amp;}]{rhs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Needed to put a \mbox{\hyperlink{classkdb_1_1ValueObserver}{Value\+Observer}} in a map. 

\begin{DoxyReturn}{Returns}
Comparison result 
\end{DoxyReturn}
\mbox{\Hypertarget{namespacekdb_ac004b5ba79154cbba02d5e5d83337e47}\label{namespacekdb_ac004b5ba79154cbba02d5e5d83337e47}} 
\index{kdb@{kdb}!operator$&lt;$$&lt;$@{operator$&lt;$$&lt;$}}
\index{operator$&lt;$$&lt;$@{operator$&lt;$$&lt;$}!kdb@{kdb}}
\doxysubsubsection{\texorpdfstring{operator$&lt;$$&lt;$()}{operator&lt;&lt;()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily std\+::ostream\&amp; kdb\+::operator$&lt;$$&lt;$ (\begin{DoxyParamCaption}\item[{std\+::ostream \&amp;}]{os,  }\item[{\mbox{\hyperlink{classkdb_1_1Key}{kdb\+::\+Key}} const \&amp;}]{k }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Stream the name of a key. 

Use setf(std\+::ios\+\_\+base\+::showbase) on the stream if you want to also output all metakeys (warning, cannot be parsed back!)

If you also want to stream the value, use the plugin framework.


\begin{DoxyParams}{Parameters}
{\em os} &amp; the stream to write to \\
\hline
{\em k} &amp; the key which name should be streamed\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the stream 
\end{DoxyReturn}
\mbox{\Hypertarget{namespacekdb_afd28754a48d420d2f2a41c5d8242f3fb}\label{namespacekdb_afd28754a48d420d2f2a41c5d8242f3fb}} 
\index{kdb@{kdb}!operator$&lt;$$&lt;$@{operator$&lt;$$&lt;$}}
\index{operator$&lt;$$&lt;$@{operator$&lt;$$&lt;$}!kdb@{kdb}}
\doxysubsubsection{\texorpdfstring{operator$&lt;$$&lt;$()}{operator&lt;&lt;()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily std\+::ostream\&amp; kdb\+::operator$&lt;$$&lt;$ (\begin{DoxyParamCaption}\item[{std\+::ostream \&amp;}]{os,  }\item[{\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} const \&amp;}]{cks }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Outputs line per line the keynames. 

To output values you should use the plugin framework.


\begin{DoxyParams}{Parameters}
{\em os} &amp; the stream to write to \\
\hline
{\em cks} &amp; the keyset which should be streamed\\
\hline
\end{DoxyParams}
Use unsetf(std\+::ios\+\_\+base\+::skipws) or use noskipws iomanip on the stream if you want a null terminated sequence of key names.

Use setf(std\+::ios\+\_\+base\+::unitbuf) on the stream if you want to flush the buffer after each key.

\begin{DoxyReturn}{Returns}
the stream 
\end{DoxyReturn}
\mbox{\Hypertarget{namespacekdb_a66342865d6cdbb19075f52d92e7a61b1}\label{namespacekdb_a66342865d6cdbb19075f52d92e7a61b1}} 
\index{kdb@{kdb}!operator$&gt;$$&gt;$@{operator$&gt;$$&gt;$}}
\index{operator$&gt;$$&gt;$@{operator$&gt;$$&gt;$}!kdb@{kdb}}
\doxysubsubsection{\texorpdfstring{operator$&gt;$$&gt;$()}{operator&gt;&gt;()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily std\+::istream\&amp; kdb\+::operator$&gt;$$&gt;$ (\begin{DoxyParamCaption}\item[{std\+::istream \&amp;}]{is,  }\item[{\mbox{\hyperlink{classkdb_1_1Key}{kdb\+::\+Key}} \&amp;}]{k }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Reads a line with a keys name. 


\begin{DoxyParams}{Parameters}
{\em is} &amp; the stream to read from \\
\hline
{\em k} &amp; the key whose name will be set\\
\hline
\end{DoxyParams}
Use unsetf(std\+::ios\+\_\+base\+::skipws) on the stream if the keyname is terminated with an null character and not a newline.

\begin{DoxyReturn}{Returns}
the stream 
\end{DoxyReturn}
\mbox{\Hypertarget{namespacekdb_ac4479a9f39ed65ffd251161bcaf8ea89}\label{namespacekdb_ac4479a9f39ed65ffd251161bcaf8ea89}} 
\index{kdb@{kdb}!operator$&gt;$$&gt;$@{operator$&gt;$$&gt;$}}
\index{operator$&gt;$$&gt;$@{operator$&gt;$$&gt;$}!kdb@{kdb}}
\doxysubsubsection{\texorpdfstring{operator$&gt;$$&gt;$()}{operator&gt;&gt;()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily std\+::istream\&amp; kdb\+::operator$&gt;$$&gt;$ (\begin{DoxyParamCaption}\item[{std\+::istream \&amp;}]{is,  }\item[{\mbox{\hyperlink{classkdb_1_1KeySet}{kdb\+::\+Key\+Set}} \&amp;}]{ks }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Reads line per line key names and appends those keys to ks. 

To input values you need to use the plugin framework.


\begin{DoxyParams}{Parameters}
{\em is} &amp; the stream to read from \\
\hline
{\em ks} &amp; the keyset to append to\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the stream 
\end{DoxyReturn}
</pre></body></html>