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


These functions provide Red-\/\+Black tree management.  


\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct__Eina__Rbtree}{\+\_\+\+Eina\+\_\+\+Rbtree}}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__Eina__Rbtree__Group_gae475680bfeddfae96f7b7ee3d805dd8a}{EINA\+\_\+\+RBTREE}}~\mbox{\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 
\mbox{\Hypertarget{group__Eina__Rbtree__Group_ga83075a5d81b0eddfa2e27bec16b39187}\label{group__Eina__Rbtree__Group_ga83075a5d81b0eddfa2e27bec16b39187}} 
\#define \mbox{\hyperlink{group__Eina__Rbtree__Group_ga83075a5d81b0eddfa2e27bec16b39187}{EINA\+\_\+\+RBTREE\+\_\+\+GET}}(Rbtree)~(\&((Rbtree)-\/$>$\+\_\+\+\_\+rbtree))
\begin{DoxyCompactList}\small\item\em access the inlined node if it was created with \mbox{\hyperlink{group__Eina__Rbtree__Group_gae475680bfeddfae96f7b7ee3d805dd8a}{EINA\+\_\+\+RBTREE}}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Rbtree__Group_ga4b8d74e991e3d8cb2b4d0e46e9f34266}\label{group__Eina__Rbtree__Group_ga4b8d74e991e3d8cb2b4d0e46e9f34266}} 
\#define \mbox{\hyperlink{group__Eina__Rbtree__Group_ga4b8d74e991e3d8cb2b4d0e46e9f34266}{EINA\+\_\+\+RBTREE\+\_\+\+CONTAINER\+\_\+\+GET}}(Ptr,  Type)~((Type $\ast$)((char $\ast$)Ptr -\/ offsetof(Type, \+\_\+\+\_\+rbtree)))
\begin{DoxyCompactList}\small\item\em find back the container of a red black tree. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Rbtree__Group_ga7290200e4688bdb1bc0211d938fd1dee}\label{group__Eina__Rbtree__Group_ga7290200e4688bdb1bc0211d938fd1dee}} 
\#define \mbox{\hyperlink{group__Eina__Rbtree__Group_ga7290200e4688bdb1bc0211d938fd1dee}{EINA\+\_\+\+RBTREE\+\_\+\+CMP\+\_\+\+NODE\+\_\+\+CB}}(Function)~((\mbox{\hyperlink{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{Eina\+\_\+\+Rbtree\+\_\+\+Cmp\+\_\+\+Node\+\_\+\+Cb}})Function)
\begin{DoxyCompactList}\small\item\em Cast using \mbox{\hyperlink{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{Eina\+\_\+\+Rbtree\+\_\+\+Cmp\+\_\+\+Node\+\_\+\+Cb}}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Rbtree__Group_ga63dcb37d7929a2a73cb0239e9b53904b}\label{group__Eina__Rbtree__Group_ga63dcb37d7929a2a73cb0239e9b53904b}} 
\#define \mbox{\hyperlink{group__Eina__Rbtree__Group_ga63dcb37d7929a2a73cb0239e9b53904b}{EINA\+\_\+\+RBTREE\+\_\+\+CMP\+\_\+\+KEY\+\_\+\+CB}}(Function)~((\mbox{\hyperlink{group__Eina__Rbtree__Group_gae9b8fb600f7cd10a6e3a4a2def10ae0c}{Eina\+\_\+\+Rbtree\+\_\+\+Cmp\+\_\+\+Key\+\_\+\+Cb}})Function)
\begin{DoxyCompactList}\small\item\em Cast using \mbox{\hyperlink{group__Eina__Rbtree__Group_gae9b8fb600f7cd10a6e3a4a2def10ae0c}{Eina\+\_\+\+Rbtree\+\_\+\+Cmp\+\_\+\+Key\+\_\+\+Cb}}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Rbtree__Group_ga13ce93addd398ea1884bee8e6c62a6b4}\label{group__Eina__Rbtree__Group_ga13ce93addd398ea1884bee8e6c62a6b4}} 
\#define \mbox{\hyperlink{group__Eina__Rbtree__Group_ga13ce93addd398ea1884bee8e6c62a6b4}{EINA\+\_\+\+RBTREE\+\_\+\+FREE\+\_\+\+CB}}(Function)~((\mbox{\hyperlink{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}{Eina\+\_\+\+Rbtree\+\_\+\+Free\+\_\+\+Cb}})Function)
\begin{DoxyCompactList}\small\item\em Cast using \mbox{\hyperlink{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}{Eina\+\_\+\+Rbtree\+\_\+\+Free\+\_\+\+Cb}}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \mbox{\hyperlink{struct__Eina__Rbtree}{\+\_\+\+Eina\+\_\+\+Rbtree}} \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}}
\begin{DoxyCompactList}\small\item\em Type for a Red-\/\+Black tree node. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}\label{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}} 
typedef \mbox{\hyperlink{group__Eina__Rbtree__Group_ga17e474e713fccc1a8909aa158e707a8d}{Eina\+\_\+\+Rbtree\+\_\+\+Direction}}($\ast$ \mbox{\hyperlink{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{Eina\+\_\+\+Rbtree\+\_\+\+Cmp\+\_\+\+Node\+\_\+\+Cb}}) (const \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$left, const \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$right, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Function used to compare two nodes and see which direction to navigate. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Rbtree__Group_gae9b8fb600f7cd10a6e3a4a2def10ae0c}\label{group__Eina__Rbtree__Group_gae9b8fb600f7cd10a6e3a4a2def10ae0c}} 
typedef int($\ast$ \mbox{\hyperlink{group__Eina__Rbtree__Group_gae9b8fb600f7cd10a6e3a4a2def10ae0c}{Eina\+\_\+\+Rbtree\+\_\+\+Cmp\+\_\+\+Key\+\_\+\+Cb}}) (const \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$node, const void $\ast$key, int length, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Function used compare node with a given key of specified length. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}\label{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}} 
typedef void($\ast$ \mbox{\hyperlink{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}{Eina\+\_\+\+Rbtree\+\_\+\+Free\+\_\+\+Cb}}) (\mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$node, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Function used to free a node. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Rbtree__Group_gadd99cd6522173cd12cfb7001f8815751}\label{group__Eina__Rbtree__Group_gadd99cd6522173cd12cfb7001f8815751}} 
enum \mbox{\hyperlink{group__Eina__Rbtree__Group_gadd99cd6522173cd12cfb7001f8815751}{Eina\+\_\+\+Rbtree\+\_\+\+Color}} \{ \newline
{\bfseries EINA\+\_\+\+RBTREE\+\_\+\+RED}
, \newline
{\bfseries EINA\+\_\+\+RBTREE\+\_\+\+BLACK}
 \}
\begin{DoxyCompactList}\small\item\em node color. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Rbtree__Group_ga17e474e713fccc1a8909aa158e707a8d}\label{group__Eina__Rbtree__Group_ga17e474e713fccc1a8909aa158e707a8d}} 
enum \mbox{\hyperlink{group__Eina__Rbtree__Group_ga17e474e713fccc1a8909aa158e707a8d}{Eina\+\_\+\+Rbtree\+\_\+\+Direction}} \{ \newline
{\bfseries EINA\+\_\+\+RBTREE\+\_\+\+LEFT} = 0
, \newline
{\bfseries EINA\+\_\+\+RBTREE\+\_\+\+RIGHT} = 1
 \}
\begin{DoxyCompactList}\small\item\em walk direction. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Rbtree__Group_gac309abaa1e268cc67279443068311fde}\label{group__Eina__Rbtree__Group_gac309abaa1e268cc67279443068311fde}} 
static \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$ {\bfseries eina\+\_\+rbtree\+\_\+inline\+\_\+lookup} (const \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$root, const void $\ast$key, int length, \mbox{\hyperlink{group__Eina__Rbtree__Group_gae9b8fb600f7cd10a6e3a4a2def10ae0c}{Eina\+\_\+\+Rbtree\+\_\+\+Cmp\+\_\+\+Key\+\_\+\+Cb}} cmp, const void $\ast$data)
\item 
\mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$ \mbox{\hyperlink{group__Eina__Rbtree__Group_gabc714e2530e2169a35a2eb666653bd13}{eina\+\_\+rbtree\+\_\+inline\+\_\+insert}} (\mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$root, \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$node, \mbox{\hyperlink{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{Eina\+\_\+\+Rbtree\+\_\+\+Cmp\+\_\+\+Node\+\_\+\+Cb}} cmp, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Inserts a new node inside an existing red black tree. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$ \mbox{\hyperlink{group__Eina__Rbtree__Group_ga5f908888587facf1af373ff0484a81ad}{eina\+\_\+rbtree\+\_\+inline\+\_\+remove}} (\mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$root, \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$node, \mbox{\hyperlink{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{Eina\+\_\+\+Rbtree\+\_\+\+Cmp\+\_\+\+Node\+\_\+\+Cb}} cmp, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Removes a node from an existing red black tree. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Rbtree__Group_gac27dbcc7fc8196c00a7c93dbae58f329}{eina\+\_\+rbtree\+\_\+delete}} (\mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$root, \mbox{\hyperlink{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}{Eina\+\_\+\+Rbtree\+\_\+\+Free\+\_\+\+Cb}} func, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Deletes all nodes from a valid red black tree. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$ \mbox{\hyperlink{group__Eina__Rbtree__Group_ga5f6b5907defe228cc6995e6594aee55b}{eina\+\_\+rbtree\+\_\+iterator\+\_\+prefix}} (const \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$root)
\begin{DoxyCompactList}\small\item\em Returns a new prefix iterator associated with a rbtree. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$ \mbox{\hyperlink{group__Eina__Rbtree__Group_ga3ac2c32d8c63ace63d0d75d20dec8ccd}{eina\+\_\+rbtree\+\_\+iterator\+\_\+infix}} (const \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$root)
\begin{DoxyCompactList}\small\item\em Returns a new prefix iterator associated with a rbtree. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$ \mbox{\hyperlink{group__Eina__Rbtree__Group_gade021eeec2b67bdaf5b63744dbca9012}{eina\+\_\+rbtree\+\_\+iterator\+\_\+postfix}} (const \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$root)
\begin{DoxyCompactList}\small\item\em Returns a new prefix iterator associated with a rbtree. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
These functions provide Red-\/\+Black tree management. 

For a brief description look at \href{http://en.wikipedia.org/wiki/Red-black_tree}{\texttt{ 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}{\texttt{ http\+://eternallyconfuzzled.\+com/tuts/datastructures/jsw\+\_\+tut\+\_\+rbtree.\+aspx}} . The main difference is that this set of functions never allocate any data, making them particularly useful for memory management. 

\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__Eina__Rbtree__Group_gae475680bfeddfae96f7b7ee3d805dd8a}\label{group__Eina__Rbtree__Group_gae475680bfeddfae96f7b7ee3d805dd8a}} 
\index{Red-\/Black tree@{Red-\/Black tree}!EINA\_RBTREE@{EINA\_RBTREE}}
\index{EINA\_RBTREE@{EINA\_RBTREE}!Red-\/Black tree@{Red-\/Black tree}}
\doxysubsubsection{\texorpdfstring{EINA\_RBTREE}{EINA\_RBTREE}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+RBTREE~\mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} \+\_\+\+\_\+rbtree}



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


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

\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Rbtree__Group_ga83075a5d81b0eddfa2e27bec16b39187}{EINA\+\_\+\+RBTREE\+\_\+\+GET()}} 
\end{DoxySeeAlso}


\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}\label{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}}
\doxysubsubsection{\texorpdfstring{Eina\_Rbtree}{Eina\_Rbtree}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}}}



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

It should be inlined into user\textquotesingle{}s type. 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Rbtree__Group_gabc714e2530e2169a35a2eb666653bd13}\label{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}}
\doxysubsubsection{\texorpdfstring{eina\_rbtree\_inline\_insert()}{eina\_rbtree\_inline\_insert()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}}$\ast$ eina\+\_\+rbtree\+\_\+inline\+\_\+insert (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$}]{root,  }\item[{\mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$}]{node,  }\item[{\mbox{\hyperlink{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{Eina\+\_\+\+Rbtree\+\_\+\+Cmp\+\_\+\+Node\+\_\+\+Cb}}}]{cmp,  }\item[{const void $\ast$}]{data }\end{DoxyParamCaption})}



Inserts a new node inside an existing red black tree. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em root} & The root of an existing valid red black tree. \\
\hline
\mbox{\texttt{ in}}  & {\em node} & The new node to insert. \\
\hline
\mbox{\texttt{ in}}  & {\em cmp} & The callback that is able to compare two nodes. \\
\hline
\mbox{\texttt{ in}}  & {\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 inserts a new node in a valid red black tree. {\ttfamily NULL} is an empty valid red black tree. The resulting new tree is a valid red black tree. This function doesn\textquotesingle{}t allocate any data. 

References EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL.



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

\mbox{\Hypertarget{group__Eina__Rbtree__Group_ga5f908888587facf1af373ff0484a81ad}\label{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}}
\doxysubsubsection{\texorpdfstring{eina\_rbtree\_inline\_remove()}{eina\_rbtree\_inline\_remove()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}}$\ast$ eina\+\_\+rbtree\+\_\+inline\+\_\+remove (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$}]{root,  }\item[{\mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$}]{node,  }\item[{\mbox{\hyperlink{group__Eina__Rbtree__Group_ga2d2361f39451ad005f1f2aa57091869f}{Eina\+\_\+\+Rbtree\+\_\+\+Cmp\+\_\+\+Node\+\_\+\+Cb}}}]{cmp,  }\item[{const void $\ast$}]{data }\end{DoxyParamCaption})}



Removes a node from an existing red black tree. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em root} & The root of a valid red black tree. \\
\hline
\mbox{\texttt{ in}}  & {\em node} & The node to remove from the tree. \\
\hline
\mbox{\texttt{ in}}  & {\em cmp} & The callback that is able to compare two nodes. \\
\hline
\mbox{\texttt{ in}}  & {\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 removes a new node in a valid red black tree that should contain the node that you are removing. This function will return {\ttfamily NULL} when the red black tree got empty. This function doesn\textquotesingle{}t free any data. 

References EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL.



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

\mbox{\Hypertarget{group__Eina__Rbtree__Group_gac27dbcc7fc8196c00a7c93dbae58f329}\label{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}}
\doxysubsubsection{\texorpdfstring{eina\_rbtree\_delete()}{eina\_rbtree\_delete()}}
{\footnotesize\ttfamily void eina\+\_\+rbtree\+\_\+delete (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$}]{root,  }\item[{\mbox{\hyperlink{group__Eina__Rbtree__Group_gafb59812628d25dc6b904438312e6051b}{Eina\+\_\+\+Rbtree\+\_\+\+Free\+\_\+\+Cb}}}]{func,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})}



Deletes all nodes from a valid red black tree. 


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


References EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN.



Referenced by eina\+\_\+hash\+\_\+free(), and eina\+\_\+hash\+\_\+free\+\_\+buckets().

\mbox{\Hypertarget{group__Eina__Rbtree__Group_ga5f6b5907defe228cc6995e6594aee55b}\label{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}}
\doxysubsubsection{\texorpdfstring{eina\_rbtree\_iterator\_prefix()}{eina\_rbtree\_iterator\_prefix()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}}$\ast$ eina\+\_\+rbtree\+\_\+iterator\+\_\+prefix (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$}]{root }\end{DoxyParamCaption})}



Returns a new prefix iterator associated with a rbtree. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\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 with {\ttfamily root}. It will iterate the tree using prefix walk. If {\ttfamily root} is {\ttfamily NULL}, this function still returns a valid iterator that will always return false on \mbox{\hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\+\_\+iterator\+\_\+next()}}, thus keeping API sane.

If the memory cannot be allocated, {\ttfamily NULL} 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}
\mbox{\Hypertarget{group__Eina__Rbtree__Group_ga3ac2c32d8c63ace63d0d75d20dec8ccd}\label{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}}
\doxysubsubsection{\texorpdfstring{eina\_rbtree\_iterator\_infix()}{eina\_rbtree\_iterator\_infix()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}}$\ast$ eina\+\_\+rbtree\+\_\+iterator\+\_\+infix (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$}]{root }\end{DoxyParamCaption})}



Returns a new prefix iterator associated with a rbtree. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\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 with {\ttfamily root}. It will iterate the tree using infix walk. If {\ttfamily root} is {\ttfamily NULL}, this function still returns a valid iterator that will always return false on \mbox{\hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\+\_\+iterator\+\_\+next()}}, thus keeping API sane.

If the memory cannot be allocated, {\ttfamily NULL} 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}
\mbox{\Hypertarget{group__Eina__Rbtree__Group_gade021eeec2b67bdaf5b63744dbca9012}\label{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}}
\doxysubsubsection{\texorpdfstring{eina\_rbtree\_iterator\_postfix()}{eina\_rbtree\_iterator\_postfix()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}}$\ast$ eina\+\_\+rbtree\+\_\+iterator\+\_\+postfix (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Rbtree__Group_gafa6fe42bbf09c210d2ad96b6141bedb0}{Eina\+\_\+\+Rbtree}} $\ast$}]{root }\end{DoxyParamCaption})}



Returns a new prefix iterator associated with a rbtree. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\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 with {\ttfamily root}. It will iterate the tree using postfix walk. If {\ttfamily root} is {\ttfamily NULL}, this function still returns a valid iterator that will always return false on \mbox{\hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\+\_\+iterator\+\_\+next()}}, thus keeping API sane.

If the memory cannot be allocated, {\ttfamily NULL} 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}
