\hypertarget{group__Eina__Rbtree__Group}{\section{Red-\/\-Black tree}
\label{group__Eina__Rbtree__Group}\index{Red-\/\-Black tree@{Red-\/\-Black tree}}
}


These functions provide Red-\/\-Black trees management.  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct__Eina__Rbtree}{\-\_\-\-Eina\-\_\-\-Rbtree}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{group__Eina__Rbtree__Group_gae475680bfeddfae96f7b7ee3d805dd8a}{E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E}~\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} \-\_\-\-\_\-rbtree
\begin{DoxyCompactList}\small\item\em recommended way to declare the inlined Eina\-\_\-\-Rbtree in your type. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Rbtree__Group_ga83075a5d81b0eddfa2e27bec16b39187}{\#define \hyperlink{group__Eina__Rbtree__Group_ga83075a5d81b0eddfa2e27bec16b39187}{E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E\-\_\-\-G\-E\-T}(Rbtree)~(\&((Rbtree)-\/$>$\-\_\-\-\_\-rbtree))}\label{group__Eina__Rbtree__Group_ga83075a5d81b0eddfa2e27bec16b39187}

\begin{DoxyCompactList}\small\item\em access the inlined node if it was created with \hyperlink{group__Eina__Rbtree__Group_gae475680bfeddfae96f7b7ee3d805dd8a}{E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E}. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Rbtree__Group_ga4b8d74e991e3d8cb2b4d0e46e9f34266}{\#define \hyperlink{group__Eina__Rbtree__Group_ga4b8d74e991e3d8cb2b4d0e46e9f34266}{E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E\-\_\-\-C\-O\-N\-T\-A\-I\-N\-E\-R\-\_\-\-G\-E\-T}(Ptr, Type)~((Type $\ast$)((char $\ast$)Ptr -\/ offsetof(Type, \-\_\-\-\_\-rbtree)))}\label{group__Eina__Rbtree__Group_ga4b8d74e991e3d8cb2b4d0e46e9f34266}

\begin{DoxyCompactList}\small\item\em find back the container of an red black tree. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Rbtree__Group_ga7290200e4688bdb1bc0211d938fd1dee}{\#define \hyperlink{group__Eina__Rbtree__Group_ga7290200e4688bdb1bc0211d938fd1dee}{E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E\-\_\-\-C\-M\-P\-\_\-\-N\-O\-D\-E\-\_\-\-C\-B}(Function)~((\hyperlink{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{Eina\-\_\-\-Rbtree\-\_\-\-Cmp\-\_\-\-Node\-\_\-\-Cb})Function)}\label{group__Eina__Rbtree__Group_ga7290200e4688bdb1bc0211d938fd1dee}

\begin{DoxyCompactList}\small\item\em Cast using \hyperlink{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{Eina\-\_\-\-Rbtree\-\_\-\-Cmp\-\_\-\-Node\-\_\-\-Cb}. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Rbtree__Group_ga63dcb37d7929a2a73cb0239e9b53904b}{\#define \hyperlink{group__Eina__Rbtree__Group_ga63dcb37d7929a2a73cb0239e9b53904b}{E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E\-\_\-\-C\-M\-P\-\_\-\-K\-E\-Y\-\_\-\-C\-B}(Function)~((\hyperlink{group__Eina__Rbtree__Group_gae9b8fb600f7cd10a6e3a4a2def10ae0c}{Eina\-\_\-\-Rbtree\-\_\-\-Cmp\-\_\-\-Key\-\_\-\-Cb})Function)}\label{group__Eina__Rbtree__Group_ga63dcb37d7929a2a73cb0239e9b53904b}

\begin{DoxyCompactList}\small\item\em Cast using \hyperlink{group__Eina__Rbtree__Group_gae9b8fb600f7cd10a6e3a4a2def10ae0c}{Eina\-\_\-\-Rbtree\-\_\-\-Cmp\-\_\-\-Key\-\_\-\-Cb}. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Rbtree__Group_ga13ce93addd398ea1884bee8e6c62a6b4}{\#define \hyperlink{group__Eina__Rbtree__Group_ga13ce93addd398ea1884bee8e6c62a6b4}{E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E\-\_\-\-F\-R\-E\-E\-\_\-\-C\-B}(Function)~((\hyperlink{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}{Eina\-\_\-\-Rbtree\-\_\-\-Free\-\_\-\-Cb})Function)}\label{group__Eina__Rbtree__Group_ga13ce93addd398ea1884bee8e6c62a6b4}

\begin{DoxyCompactList}\small\item\em Cast using \hyperlink{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}{Eina\-\_\-\-Rbtree\-\_\-\-Free\-\_\-\-Cb}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \hyperlink{struct__Eina__Rbtree}{\-\_\-\-Eina\-\_\-\-Rbtree} \hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree}
\begin{DoxyCompactList}\small\item\em Type for a Red-\/\-Black tree node. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{typedef \hyperlink{group__Eina__Rbtree__Group_ga17e474e713fccc1a8909aa158e707a8d}{Eina\-\_\-\-Rbtree\-\_\-\-Direction}($\ast$ \hyperlink{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{Eina\-\_\-\-Rbtree\-\_\-\-Cmp\-\_\-\-Node\-\_\-\-Cb} )(const \hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$left, const \hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$right, void $\ast$data)}\label{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}

\begin{DoxyCompactList}\small\item\em Function used compare two nodes and see which direction to navigate. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Rbtree__Group_gae9b8fb600f7cd10a6e3a4a2def10ae0c}{typedef int($\ast$ \hyperlink{group__Eina__Rbtree__Group_gae9b8fb600f7cd10a6e3a4a2def10ae0c}{Eina\-\_\-\-Rbtree\-\_\-\-Cmp\-\_\-\-Key\-\_\-\-Cb} )(const \hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$node, const void $\ast$key, int length, void $\ast$data)}\label{group__Eina__Rbtree__Group_gae9b8fb600f7cd10a6e3a4a2def10ae0c}

\begin{DoxyCompactList}\small\item\em Function used compare node with a given key of specified length. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}{typedef void($\ast$ \hyperlink{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}{Eina\-\_\-\-Rbtree\-\_\-\-Free\-\_\-\-Cb} )(\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$node, void $\ast$data)}\label{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}

\begin{DoxyCompactList}\small\item\em Function used free a node. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{group__Eina__Rbtree__Group_gadd99cd6522173cd12cfb7001f8815751}{Eina\-\_\-\-Rbtree\-\_\-\-Color} \{ \\*
{\bfseries E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E\-\_\-\-R\-E\-D}, 
\\*
{\bfseries E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E\-\_\-\-B\-L\-A\-C\-K}
 \}
\begin{DoxyCompactList}\small\item\em node color. \end{DoxyCompactList}\item 
enum \hyperlink{group__Eina__Rbtree__Group_ga17e474e713fccc1a8909aa158e707a8d}{Eina\-\_\-\-Rbtree\-\_\-\-Direction} \{ \\*
{\bfseries E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E\-\_\-\-L\-E\-F\-T} = 0, 
\\*
{\bfseries E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E\-\_\-\-R\-I\-G\-H\-T} = 1
 \}
\begin{DoxyCompactList}\small\item\em walk direction. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Rbtree__Group_gac309abaa1e268cc67279443068311fde}{static \hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$ {\bfseries eina\-\_\-rbtree\-\_\-inline\-\_\-lookup} (const \hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$root, const void $\ast$key, int length, \hyperlink{group__Eina__Rbtree__Group_gae9b8fb600f7cd10a6e3a4a2def10ae0c}{Eina\-\_\-\-Rbtree\-\_\-\-Cmp\-\_\-\-Key\-\_\-\-Cb} cmp, const void $\ast$data)}\label{group__Eina__Rbtree__Group_gac309abaa1e268cc67279443068311fde}

\item 
\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$ \hyperlink{group__Eina__Rbtree__Group_gabc714e2530e2169a35a2eb666653bd13}{eina\-\_\-rbtree\-\_\-inline\-\_\-insert} (\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$root, \hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$node, \hyperlink{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{Eina\-\_\-\-Rbtree\-\_\-\-Cmp\-\_\-\-Node\-\_\-\-Cb} cmp, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Insert a new node inside an existing red black tree. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$ \hyperlink{group__Eina__Rbtree__Group_ga5f908888587facf1af373ff0484a81ad}{eina\-\_\-rbtree\-\_\-inline\-\_\-remove} (\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$root, \hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$node, \hyperlink{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{Eina\-\_\-\-Rbtree\-\_\-\-Cmp\-\_\-\-Node\-\_\-\-Cb} cmp, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Remove a node from an existing red black tree. \end{DoxyCompactList}\item 
void \hyperlink{group__Eina__Rbtree__Group_gac27dbcc7fc8196c00a7c93dbae58f329}{eina\-\_\-rbtree\-\_\-delete} (\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$root, \hyperlink{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}{Eina\-\_\-\-Rbtree\-\_\-\-Free\-\_\-\-Cb} func, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Delete all nodes from a valid red black tree. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\-\_\-\-Iterator} $\ast$ \hyperlink{group__Eina__Rbtree__Group_ga5f6b5907defe228cc6995e6594aee55b}{eina\-\_\-rbtree\-\_\-iterator\-\_\-prefix} (const \hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$root)
\begin{DoxyCompactList}\small\item\em Returned a new prefix iterator associated to a rbtree. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\-\_\-\-Iterator} $\ast$ \hyperlink{group__Eina__Rbtree__Group_ga3ac2c32d8c63ace63d0d75d20dec8ccd}{eina\-\_\-rbtree\-\_\-iterator\-\_\-infix} (const \hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$root)
\begin{DoxyCompactList}\small\item\em Returned a new prefix iterator associated to a rbtree. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\-\_\-\-Iterator} $\ast$ \hyperlink{group__Eina__Rbtree__Group_gade021eeec2b67bdaf5b63744dbca9012}{eina\-\_\-rbtree\-\_\-iterator\-\_\-postfix} (const \hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\-\_\-\-Rbtree} $\ast$root)
\begin{DoxyCompactList}\small\item\em Returned a new prefix iterator associated to a rbtree. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
These functions provide Red-\/\-Black trees management. For a brief description look at \href{http://en.wikipedia.org/wiki/Red-black_tree}{\tt http\-://en.\-wikipedia.\-org/wiki/\-Red-\/black\-\_\-tree} . This code is largely inspired from a tutorial written by Julienne Walker at \-: \href{http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_rbtree.aspx}{\tt http\-://eternallyconfuzzled.\-com/tuts/datastructures/jsw\-\_\-tut\-\_\-rbtree.\-aspx} . The main difference is that this set of function never allocate any data, making them particularly useful for memory management. 

\subsection{Macro Definition Documentation}
\hypertarget{group__Eina__Rbtree__Group_gae475680bfeddfae96f7b7ee3d805dd8a}{\index{Red-\/\-Black tree@{Red-\/\-Black tree}!E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E@{E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E}}
\index{E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E@{E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E}!Red-Black tree@{Red-\/\-Black tree}}
\subsubsection[{E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E~{\bf Eina\-\_\-\-Rbtree} \-\_\-\-\_\-rbtree}}\label{group__Eina__Rbtree__Group_gae475680bfeddfae96f7b7ee3d805dd8a}


recommended way to declare the inlined Eina\-\_\-\-Rbtree in your type. 


\begin{DoxyCode}
\textcolor{keyword}{struct }my\_type \{
   \hyperlink{group__Eina__Rbtree__Group_gae475680bfeddfae96f7b7ee3d805dd8a}{EINA\_RBTREE};
   \textcolor{keywordtype}{int} my\_value;
   \textcolor{keywordtype}{char} *my\_name;
\};
\end{DoxyCode}


\begin{DoxySeeAlso}{See Also}
\hyperlink{group__Eina__Rbtree__Group_ga83075a5d81b0eddfa2e27bec16b39187}{E\-I\-N\-A\-\_\-\-R\-B\-T\-R\-E\-E\-\_\-\-G\-E\-T()} 
\end{DoxySeeAlso}


\subsection{Typedef Documentation}
\hypertarget{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{\index{Red-\/\-Black tree@{Red-\/\-Black tree}!Eina\-\_\-\-Rbtree@{Eina\-\_\-\-Rbtree}}
\index{Eina\-\_\-\-Rbtree@{Eina\-\_\-\-Rbtree}!Red-Black tree@{Red-\/\-Black tree}}
\subsubsection[{Eina\-\_\-\-Rbtree}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\-\_\-\-Rbtree}}}\label{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}


Type for a Red-\/\-Black tree node. 

It should be inlined into user's type. 

\subsection{Function Documentation}
\hypertarget{group__Eina__Rbtree__Group_gabc714e2530e2169a35a2eb666653bd13}{\index{Red-\/\-Black tree@{Red-\/\-Black tree}!eina\-\_\-rbtree\-\_\-inline\-\_\-insert@{eina\-\_\-rbtree\-\_\-inline\-\_\-insert}}
\index{eina\-\_\-rbtree\-\_\-inline\-\_\-insert@{eina\-\_\-rbtree\-\_\-inline\-\_\-insert}!Red-Black tree@{Red-\/\-Black tree}}
\subsubsection[{eina\-\_\-rbtree\-\_\-inline\-\_\-insert}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\-\_\-\-Rbtree}$\ast$ eina\-\_\-rbtree\-\_\-inline\-\_\-insert (
\begin{DoxyParamCaption}
\item[{{\bf Eina\-\_\-\-Rbtree} $\ast$}]{root, }
\item[{{\bf Eina\-\_\-\-Rbtree} $\ast$}]{node, }
\item[{{\bf Eina\-\_\-\-Rbtree\-\_\-\-Cmp\-\_\-\-Node\-\_\-\-Cb}}]{cmp, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Eina__Rbtree__Group_gabc714e2530e2169a35a2eb666653bd13}


Insert a new node inside an existing red black tree. 


\begin{DoxyParams}{Parameters}
{\em root} & The root of an exisiting valid red black tree. \\
\hline
{\em node} & The new node to insert. \\
\hline
{\em cmp} & The callback that is able to compare two nodes. \\
\hline
{\em data} & Private data to help the compare function. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The new root of the red black tree.
\end{DoxyReturn}
This function insert a new node in a valid red black tree. {\ttfamily N\-U\-L\-L} is an empty valid red black tree. The resulting new tree is a valid red black tree. This function doesn't allocate any data. 

Referenced by edje\-\_\-box\-\_\-layout\-\_\-register().

\hypertarget{group__Eina__Rbtree__Group_ga5f908888587facf1af373ff0484a81ad}{\index{Red-\/\-Black tree@{Red-\/\-Black tree}!eina\-\_\-rbtree\-\_\-inline\-\_\-remove@{eina\-\_\-rbtree\-\_\-inline\-\_\-remove}}
\index{eina\-\_\-rbtree\-\_\-inline\-\_\-remove@{eina\-\_\-rbtree\-\_\-inline\-\_\-remove}!Red-Black tree@{Red-\/\-Black tree}}
\subsubsection[{eina\-\_\-rbtree\-\_\-inline\-\_\-remove}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\-\_\-\-Rbtree}$\ast$ eina\-\_\-rbtree\-\_\-inline\-\_\-remove (
\begin{DoxyParamCaption}
\item[{{\bf Eina\-\_\-\-Rbtree} $\ast$}]{root, }
\item[{{\bf Eina\-\_\-\-Rbtree} $\ast$}]{node, }
\item[{{\bf Eina\-\_\-\-Rbtree\-\_\-\-Cmp\-\_\-\-Node\-\_\-\-Cb}}]{cmp, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Eina__Rbtree__Group_ga5f908888587facf1af373ff0484a81ad}


Remove a node from an existing red black tree. 


\begin{DoxyParams}{Parameters}
{\em root} & The root of a valid red black tree. \\
\hline
{\em node} & The node to remove from the tree. \\
\hline
{\em cmp} & The callback that is able to compare two nodes. \\
\hline
{\em data} & Private data to help the compare function. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The new root of the red black tree.
\end{DoxyReturn}
This function remove a new node in a valid red black tree that should contain the node that you are removing. This function will return {\ttfamily N\-U\-L\-L} when the red black tree got empty. This function doesn't free any data. 

Referenced by edje\-\_\-box\-\_\-layout\-\_\-register().

\hypertarget{group__Eina__Rbtree__Group_gac27dbcc7fc8196c00a7c93dbae58f329}{\index{Red-\/\-Black tree@{Red-\/\-Black tree}!eina\-\_\-rbtree\-\_\-delete@{eina\-\_\-rbtree\-\_\-delete}}
\index{eina\-\_\-rbtree\-\_\-delete@{eina\-\_\-rbtree\-\_\-delete}!Red-Black tree@{Red-\/\-Black tree}}
\subsubsection[{eina\-\_\-rbtree\-\_\-delete}]{\setlength{\rightskip}{0pt plus 5cm}void eina\-\_\-rbtree\-\_\-delete (
\begin{DoxyParamCaption}
\item[{{\bf Eina\-\_\-\-Rbtree} $\ast$}]{root, }
\item[{{\bf Eina\-\_\-\-Rbtree\-\_\-\-Free\-\_\-\-Cb}}]{func, }
\item[{void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Eina__Rbtree__Group_gac27dbcc7fc8196c00a7c93dbae58f329}


Delete all nodes from a valid red black tree. 


\begin{DoxyParams}{Parameters}
{\em root} & The root of a valid red black tree. \\
\hline
{\em func} & The callback that will free each node. \\
\hline
{\em data} & Private data to help the compare function. \\
\hline
\end{DoxyParams}


References eina\-\_\-rbtree\-\_\-delete().



Referenced by eina\-\_\-hash\-\_\-free(), eina\-\_\-hash\-\_\-free\-\_\-buckets(), and eina\-\_\-rbtree\-\_\-delete().

\hypertarget{group__Eina__Rbtree__Group_ga5f6b5907defe228cc6995e6594aee55b}{\index{Red-\/\-Black tree@{Red-\/\-Black tree}!eina\-\_\-rbtree\-\_\-iterator\-\_\-prefix@{eina\-\_\-rbtree\-\_\-iterator\-\_\-prefix}}
\index{eina\-\_\-rbtree\-\_\-iterator\-\_\-prefix@{eina\-\_\-rbtree\-\_\-iterator\-\_\-prefix}!Red-Black tree@{Red-\/\-Black tree}}
\subsubsection[{eina\-\_\-rbtree\-\_\-iterator\-\_\-prefix}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\-\_\-\-Iterator}$\ast$ eina\-\_\-rbtree\-\_\-iterator\-\_\-prefix (
\begin{DoxyParamCaption}
\item[{const {\bf Eina\-\_\-\-Rbtree} $\ast$}]{root}
\end{DoxyParamCaption}
)}}\label{group__Eina__Rbtree__Group_ga5f6b5907defe228cc6995e6594aee55b}


Returned a new prefix iterator associated to a rbtree. 


\begin{DoxyParams}{Parameters}
{\em root} & The root of rbtree. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new iterator.
\end{DoxyReturn}
This function returns a newly allocated iterator associated to {\ttfamily root}. It will iterate the tree using prefix walk. If {\ttfamily root} is {\ttfamily N\-U\-L\-L}, this function still returns a valid iterator that will always return false on \hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\-\_\-iterator\-\_\-next()}, thus keeping A\-P\-I sane.

If the memory can not be allocated, {\ttfamily N\-U\-L\-L} is returned. Otherwise, a valid iterator is returned.

\begin{DoxyWarning}{Warning}
if the rbtree structure changes then the iterator becomes invalid! That is, if you add or remove nodes this iterator behavior is undefined and your program may crash! 
\end{DoxyWarning}
\hypertarget{group__Eina__Rbtree__Group_ga3ac2c32d8c63ace63d0d75d20dec8ccd}{\index{Red-\/\-Black tree@{Red-\/\-Black tree}!eina\-\_\-rbtree\-\_\-iterator\-\_\-infix@{eina\-\_\-rbtree\-\_\-iterator\-\_\-infix}}
\index{eina\-\_\-rbtree\-\_\-iterator\-\_\-infix@{eina\-\_\-rbtree\-\_\-iterator\-\_\-infix}!Red-Black tree@{Red-\/\-Black tree}}
\subsubsection[{eina\-\_\-rbtree\-\_\-iterator\-\_\-infix}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\-\_\-\-Iterator}$\ast$ eina\-\_\-rbtree\-\_\-iterator\-\_\-infix (
\begin{DoxyParamCaption}
\item[{const {\bf Eina\-\_\-\-Rbtree} $\ast$}]{root}
\end{DoxyParamCaption}
)}}\label{group__Eina__Rbtree__Group_ga3ac2c32d8c63ace63d0d75d20dec8ccd}


Returned a new prefix iterator associated to a rbtree. 


\begin{DoxyParams}{Parameters}
{\em root} & The root of rbtree. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new iterator.
\end{DoxyReturn}
This function returns a newly allocated iterator associated to {\ttfamily root}. It will iterate the tree using infix walk. If {\ttfamily root} is {\ttfamily N\-U\-L\-L}, this function still returns a valid iterator that will always return false on \hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\-\_\-iterator\-\_\-next()}, thus keeping A\-P\-I sane.

If the memory can not be allocated, {\ttfamily N\-U\-L\-L} is returned. Otherwise, a valid iterator is returned.

\begin{DoxyWarning}{Warning}
if the rbtree structure changes then the iterator becomes invalid! That is, if you add or remove nodes this iterator behavior is undefined and your program may crash! 
\end{DoxyWarning}
\hypertarget{group__Eina__Rbtree__Group_gade021eeec2b67bdaf5b63744dbca9012}{\index{Red-\/\-Black tree@{Red-\/\-Black tree}!eina\-\_\-rbtree\-\_\-iterator\-\_\-postfix@{eina\-\_\-rbtree\-\_\-iterator\-\_\-postfix}}
\index{eina\-\_\-rbtree\-\_\-iterator\-\_\-postfix@{eina\-\_\-rbtree\-\_\-iterator\-\_\-postfix}!Red-Black tree@{Red-\/\-Black tree}}
\subsubsection[{eina\-\_\-rbtree\-\_\-iterator\-\_\-postfix}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\-\_\-\-Iterator}$\ast$ eina\-\_\-rbtree\-\_\-iterator\-\_\-postfix (
\begin{DoxyParamCaption}
\item[{const {\bf Eina\-\_\-\-Rbtree} $\ast$}]{root}
\end{DoxyParamCaption}
)}}\label{group__Eina__Rbtree__Group_gade021eeec2b67bdaf5b63744dbca9012}


Returned a new prefix iterator associated to a rbtree. 


\begin{DoxyParams}{Parameters}
{\em root} & The root of rbtree. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new iterator.
\end{DoxyReturn}
This function returns a newly allocated iterator associated to {\ttfamily root}. It will iterate the tree using postfix walk. If {\ttfamily root} is {\ttfamily N\-U\-L\-L}, this function still returns a valid iterator that will always return false on \hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\-\_\-iterator\-\_\-next()}, thus keeping A\-P\-I sane.

If the memory can not be allocated, {\ttfamily N\-U\-L\-L} is returned. Otherwise, a valid iterator is returned.

\begin{DoxyWarning}{Warning}
if the rbtree structure changes then the iterator becomes invalid! That is, if you add or remove nodes this iterator behavior is undefined and your program may crash! 
\end{DoxyWarning}
