\hypertarget{keyset_8c}{}\doxysection{keyset.\+c File Reference}
\label{keyset_8c}\index{keyset.c@{keyset.c}}


Methods for key sets.  


{\ttfamily \#include \char`\"{}kdbprivate.\+h\char`\"{}}\newline
{\ttfamily \#include $<$kdb.\+h$>$}\newline
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$kdbtypes.\+h$>$}\newline
{\ttfamily \#include \char`\"{}kdbinternal.\+h\char`\"{}}\newline
{\ttfamily \#include $<$kdbassert.\+h$>$}\newline
{\ttfamily \#include $<$kdbrand.\+h$>$}\newline
Include dependency graph for keyset.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{keyset_8c__incl}
\end{center}
\end{figure}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
Key\+Set $\ast$ \mbox{\hyperlink{group__keyset_ga671e1aaee3ae9dc13b4834a4ddbd2c3c}{ks\+New}} (size\+\_\+t alloc,...)
\begin{DoxyCompactList}\small\item\em Allocate, initialize and return a new Key\+Set object. \end{DoxyCompactList}\item 
Key\+Set $\ast$ \mbox{\hyperlink{group__keyset_ga4ff760f56693b51ab785ed7ce628e649}{ks\+VNew}} (size\+\_\+t alloc, va\+\_\+list va)
\begin{DoxyCompactList}\small\item\em Allocate, initialize and return a new Key\+Set object. \end{DoxyCompactList}\item 
Key\+Set $\ast$ \mbox{\hyperlink{group__keyset_gac59e4b328245463f1451f68d5106151c}{ks\+Dup}} (const Key\+Set $\ast$source)
\begin{DoxyCompactList}\small\item\em Return a duplicate of a Key\+Set. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__keyset_gaba1f1dbea191f4d7e7eb3e4296ae7d5e}{ks\+Copy}} (Key\+Set $\ast$dest, const Key\+Set $\ast$source)
\begin{DoxyCompactList}\small\item\em Replace the content of a Key\+Set with another one. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__keyset_ga27e5c16473b02a422238c8d970db7ac8}{ks\+Del}} (Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em A destructor for Key\+Set objects. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__keyset_ga304d5770a30ef760d1b6d4bcd13f1ece}{ks\+Clear}} (Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Empties a Key\+Set. \end{DoxyCompactList}\item 
uint16\+\_\+t \mbox{\hyperlink{group__keyset_ga5a656d35588d0c2f35c1e58653e46791}{ks\+Inc\+Ref}} (Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Increment the reference counter of a Key\+Set object. \end{DoxyCompactList}\item 
uint16\+\_\+t \mbox{\hyperlink{group__keyset_gae27a4c9538a99d9de30f57ef6a8f3fc2}{ks\+Dec\+Ref}} (Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Decrement the reference counter of a Key\+Set object. \end{DoxyCompactList}\item 
uint16\+\_\+t \mbox{\hyperlink{group__keyset_gad40b98651a293a255cd6a7b9e4bd7b71}{ks\+Get\+Ref}} (const Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Return the current reference counter value of a Key\+Set object. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__keytest_gaf6e66e12fe04d535a5d1c8218ced803e}{key\+Cmp}} (const Key $\ast$k1, const Key $\ast$k2)
\begin{DoxyCompactList}\small\item\em Compare the name of two Keys. \end{DoxyCompactList}\item 
ssize\+\_\+t \mbox{\hyperlink{group__keyset_ga7474ad6b0a0fa969dbdf267ba5770eee}{ks\+Get\+Size}} (const Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Return the number of Keys that {\ttfamily ks} contains. \end{DoxyCompactList}\item 
ssize\+\_\+t \mbox{\hyperlink{group__keyset_gac59817ac58072708092fbeb87600beb1}{ks\+Search}} (const Key\+Set $\ast$ks, const Key $\ast$key)
\begin{DoxyCompactList}\small\item\em Search in a key set, either yielding the actual index of the key, if the ley has been found within the key set, or a negative value indicating the insertion index of the key, if the key would be inserted. \end{DoxyCompactList}\item 
ssize\+\_\+t \mbox{\hyperlink{group__keyset_gaa5a1d467a4d71041edce68ea7748ce45}{ks\+Append\+Key}} (Key\+Set $\ast$ks, Key $\ast$to\+Append)
\begin{DoxyCompactList}\small\item\em Appends a Key to the end of {\ttfamily ks}. \end{DoxyCompactList}\item 
ssize\+\_\+t \mbox{\hyperlink{group__keyset_ga21eb9c3a14a604ee3a8bdc779232e7b7}{ks\+Append}} (Key\+Set $\ast$ks, const Key\+Set $\ast$to\+Append)
\begin{DoxyCompactList}\small\item\em Append all Keys in {\ttfamily to\+Append} to the end of the Key\+Set {\ttfamily ks}. \end{DoxyCompactList}\item 
ssize\+\_\+t \mbox{\hyperlink{group__keyset_gaa9b59d3a7ccd58511b562755454d1fae}{ks\+Rename}} (Key\+Set $\ast$ks, const Key $\ast$root, const Key $\ast$new\+Root)
\begin{DoxyCompactList}\small\item\em Moves all keys below {\ttfamily root} to below {\ttfamily new\+Root}. \end{DoxyCompactList}\item 
elektra\+Cursor \mbox{\hyperlink{group__keyset_gaf29e567a3a733160303a452cc2366e69}{ks\+Find\+Hierarchy}} (const Key\+Set $\ast$ks, const Key $\ast$root, elektra\+Cursor $\ast$end)
\begin{DoxyCompactList}\small\item\em Searches for the start and optionally end of the key hierarchy rooted at {\ttfamily root} in {\ttfamily ks}. \end{DoxyCompactList}\item 
Key\+Set $\ast$ \mbox{\hyperlink{group__keyset_ga44563782d2aa169ce3f4926332792423}{ks\+Below}} (const Key\+Set $\ast$ks, const Key $\ast$root)
\begin{DoxyCompactList}\small\item\em Retrieves all Keys from Key\+Set {\ttfamily ks} that are below or at {\ttfamily root}. \end{DoxyCompactList}\item 
Key\+Set $\ast$ \mbox{\hyperlink{group__keyset_ga6b00cf82b59af4d883a9bad6cf4a4a4a}{ks\+Cut}} (Key\+Set $\ast$ks, const Key $\ast$cutpoint)
\begin{DoxyCompactList}\small\item\em Cuts out all Keys from Key\+Set {\ttfamily ks} that are below or at {\ttfamily cutpoint}. \end{DoxyCompactList}\item 
Key $\ast$ \mbox{\hyperlink{group__keyset_gae42530b04defb772059de0600159cf69}{ks\+Pop}} (Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Remove and return the last Key of {\ttfamily ks}. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__keyset_gabe793ff51f1728e3429c84a8a9086b70}{ks\+Rewind}} (Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Rewinds the Key\+Set internal cursor. \end{DoxyCompactList}\item 
Key $\ast$ \mbox{\hyperlink{group__keyset_ga317321c9065b5a4b3e33fe1c399bcec9}{ks\+Next}} (Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Returns the next Key in a Key\+Set. \end{DoxyCompactList}\item 
Key $\ast$ \mbox{\hyperlink{group__keyset_ga4287b9416912c5f2ab9c195cb74fb094}{ks\+Current}} (const Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Return the current Key. \end{DoxyCompactList}\item 
elektra\+Cursor \mbox{\hyperlink{group__keyset_gace0444eb8ec958a429794f8586fc72e7}{ks\+Get\+Cursor}} (const Key\+Set $\ast$ks)
\begin{DoxyCompactList}\small\item\em Get the internal cursor of the Key\+Set. \end{DoxyCompactList}\item 
Key $\ast$ \mbox{\hyperlink{group__keyset_gab3fb5e067c672d9fd60a4022b2ae9dd1}{ks\+At\+Cursor}} (const Key\+Set $\ast$ks, elektra\+Cursor pos)
\begin{DoxyCompactList}\small\item\em Return Key at given position {\ttfamily pos}. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__keyset_ga28b2a7d13c620b3c9d4815a0608c738f}{ks\+Set\+Cursor}} (Key\+Set $\ast$ks, elektra\+Cursor cursor)
\begin{DoxyCompactList}\small\item\em Set the Key\+Set internal cursor to {\ttfamily cursor}. \end{DoxyCompactList}\item 
Key $\ast$ \mbox{\hyperlink{group__keyset_ga60f1ddcf23272f2b29b90e92ebe9b56f}{ks\+Lookup}} (Key\+Set $\ast$ks, Key $\ast$key, \mbox{\hyperlink{group__keyset_gada05f4bbf46fde81d0d57df86e73d914}{elektra\+Lookup\+Flags}} options)
\begin{DoxyCompactList}\small\item\em Look for a Key contained in {\ttfamily ks} that matches the name of the {\ttfamily key}. \end{DoxyCompactList}\item 
Key $\ast$ \mbox{\hyperlink{group__keyset_gad65d2cdcbb5381194a1688e169af8a83}{ks\+Lookup\+By\+Name}} (Key\+Set $\ast$ks, const char $\ast$name, \mbox{\hyperlink{group__keyset_gada05f4bbf46fde81d0d57df86e73d914}{elektra\+Lookup\+Flags}} options)
\begin{DoxyCompactList}\small\item\em Convenience method to look for a Key contained in {\ttfamily ks} with name {\ttfamily name}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Methods for key sets. 

\begin{DoxyCopyright}{Copyright}
BSD License (see LICENSE.\+md or \href{https://www.libelektra.org}{\texttt{ https\+://www.\+libelektra.\+org}}) 
\end{DoxyCopyright}
