\hypertarget{group__Eina__Iterator__Group}{}\section{Iterator Functions}
\label{group__Eina__Iterator__Group}\index{Iterator Functions@{Iterator Functions}}


These functions manage iterators on containers.  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct__Eina__Iterator}{\+\_\+\+Eina\+\_\+\+Iterator}
\begin{DoxyCompactList}\small\item\em structure of an iterator \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Iterator__Group_gaec80e80b2867e391b0b27f5f20c3a5b3}{}\#define \hyperlink{group__Eina__Iterator__Group_gaec80e80b2867e391b0b27f5f20c3a5b3}{F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+N\+E\+X\+T}(Function)~((\hyperlink{group__Eina__Iterator__Group_ga773167f332514b82df20f40cb420175b}{Eina\+\_\+\+Iterator\+\_\+\+Next\+\_\+\+Callback})Function)\label{group__Eina__Iterator__Group_gaec80e80b2867e391b0b27f5f20c3a5b3}

\begin{DoxyCompactList}\small\item\em Helper macro to cast {\ttfamily Function} to a Eina\+\_\+\+Iterator\+\_\+\+Next\+\_\+\+Callback. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Iterator__Group_gab41f5a30f0a2030f4a832548d18332db}{}\#define \hyperlink{group__Eina__Iterator__Group_gab41f5a30f0a2030f4a832548d18332db}{F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+G\+E\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+E\+R}(Function)~((\hyperlink{group__Eina__Iterator__Group_ga57223f82bdfc6f6b3a998ab06fbe9e95}{Eina\+\_\+\+Iterator\+\_\+\+Get\+\_\+\+Container\+\_\+\+Callback})Function)\label{group__Eina__Iterator__Group_gab41f5a30f0a2030f4a832548d18332db}

\begin{DoxyCompactList}\small\item\em Helper macro to cast {\ttfamily Function} to a Eina\+\_\+\+Iterator\+\_\+\+Get\+\_\+\+Container\+\_\+\+Callback. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Iterator__Group_gad1ea4d3a7e58b47b23073a58e869d167}{}\#define \hyperlink{group__Eina__Iterator__Group_gad1ea4d3a7e58b47b23073a58e869d167}{F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+R\+E\+E}(Function)~((\hyperlink{group__Eina__Iterator__Group_gad93c2a23b15eb897e5b4a40a6bd993a7}{Eina\+\_\+\+Iterator\+\_\+\+Free\+\_\+\+Callback})Function)\label{group__Eina__Iterator__Group_gad1ea4d3a7e58b47b23073a58e869d167}

\begin{DoxyCompactList}\small\item\em Helper macro to cast {\ttfamily Function} to a Eina\+\_\+\+Iterator\+\_\+\+Free\+\_\+\+Callback. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Iterator__Group_ga71905e8fc8ce5d31aea26362da620eff}{}\#define \hyperlink{group__Eina__Iterator__Group_ga71905e8fc8ce5d31aea26362da620eff}{F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+L\+O\+C\+K}(Function)~((\hyperlink{group__Eina__Iterator__Group_ga49ccc56ba720e92fbe314b8eb6a87add}{Eina\+\_\+\+Iterator\+\_\+\+Lock\+\_\+\+Callback})Function)\label{group__Eina__Iterator__Group_ga71905e8fc8ce5d31aea26362da620eff}

\begin{DoxyCompactList}\small\item\em Helper macro to cast {\ttfamily Function} to a Eina\+\_\+\+Iterator\+\_\+\+Lock\+\_\+\+Callback. \end{DoxyCompactList}\item 
\#define \hyperlink{group__Eina__Iterator__Group_gad2f796ac4df0e500d25235c29821faa3}{E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H}(itr, data)
\begin{DoxyCompactList}\small\item\em Macro to iterate over all elements easily. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{}typedef struct \hyperlink{struct__Eina__Iterator}{\+\_\+\+Eina\+\_\+\+Iterator} \hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}\label{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}

\begin{DoxyCompactList}\small\item\em Abstract type for iterators. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Iterator__Group_ga773167f332514b82df20f40cb420175b}{}typedef \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}($\ast$ \hyperlink{group__Eina__Iterator__Group_ga773167f332514b82df20f40cb420175b}{Eina\+\_\+\+Iterator\+\_\+\+Next\+\_\+\+Callback}) (\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator} $\ast$it, void $\ast$$\ast$data)\label{group__Eina__Iterator__Group_ga773167f332514b82df20f40cb420175b}

\begin{DoxyCompactList}\small\item\em Type for a callback that returns the next element in a container. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Iterator__Group_ga57223f82bdfc6f6b3a998ab06fbe9e95}{}typedef void $\ast$($\ast$ \hyperlink{group__Eina__Iterator__Group_ga57223f82bdfc6f6b3a998ab06fbe9e95}{Eina\+\_\+\+Iterator\+\_\+\+Get\+\_\+\+Container\+\_\+\+Callback}) (\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator} $\ast$it)\label{group__Eina__Iterator__Group_ga57223f82bdfc6f6b3a998ab06fbe9e95}

\begin{DoxyCompactList}\small\item\em Type for a callback that returns the container. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Iterator__Group_gad93c2a23b15eb897e5b4a40a6bd993a7}{}typedef void($\ast$ \hyperlink{group__Eina__Iterator__Group_gad93c2a23b15eb897e5b4a40a6bd993a7}{Eina\+\_\+\+Iterator\+\_\+\+Free\+\_\+\+Callback}) (\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator} $\ast$it)\label{group__Eina__Iterator__Group_gad93c2a23b15eb897e5b4a40a6bd993a7}

\begin{DoxyCompactList}\small\item\em Type for a callback that frees the container. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Iterator__Group_ga49ccc56ba720e92fbe314b8eb6a87add}{}typedef \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}($\ast$ \hyperlink{group__Eina__Iterator__Group_ga49ccc56ba720e92fbe314b8eb6a87add}{Eina\+\_\+\+Iterator\+\_\+\+Lock\+\_\+\+Callback}) (\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator} $\ast$it)\label{group__Eina__Iterator__Group_ga49ccc56ba720e92fbe314b8eb6a87add}

\begin{DoxyCompactList}\small\item\em Type for a callback that lock the container. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__Eina__Iterator__Group_gaf9261991a4b05dc63e3401278a3281f8}{eina\+\_\+iterator\+\_\+free} (\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator} $\ast$iterator)
\begin{DoxyCompactList}\small\item\em Free an iterator. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Eina__Iterator__Group_ga5583ab703b156f74f0c2a74875c95cc2}{eina\+\_\+iterator\+\_\+container\+\_\+get} (\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator} $\ast$iterator)
\begin{DoxyCompactList}\small\item\em Return the container of an iterator. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\+\_\+iterator\+\_\+next} (\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator} $\ast$iterator, void $\ast$$\ast$data)
\begin{DoxyCompactList}\small\item\em Return the value of the current element and go to the next one. \end{DoxyCompactList}\item 
void \hyperlink{group__Eina__Iterator__Group_gad9b7adc8db40a640d03e9bc4a5d52370}{eina\+\_\+iterator\+\_\+foreach} (\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator} $\ast$iterator, \hyperlink{group__Eina__Types__Group_gab115f6c19b6641ab5ba22ed45d9b7aa4}{Eina\+\_\+\+Each\+\_\+\+Cb} callback, const void $\ast$fdata)
\begin{DoxyCompactList}\small\item\em Iterate over the container and execute a callback on each element. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Iterator__Group_ga8eaa65229852ee6bae9ef2f05c2cd2ec}{eina\+\_\+iterator\+\_\+lock} (\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator} $\ast$iterator)
\begin{DoxyCompactList}\small\item\em Lock the container of the iterator. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Iterator__Group_gac29534bd3b27947d560890a4d2fb6fcd}{eina\+\_\+iterator\+\_\+unlock} (\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator} $\ast$iterator)
\begin{DoxyCompactList}\small\item\em Unlock the container of the iterator. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
These functions manage iterators on containers. 

These functions allow to access elements of a container in a generic way, without knowing which container is used (a bit like iterators in the C++ S\+T\+L). Iterators only allows sequential access (that is, from an element to the next one). For random access, see \hyperlink{group__Eina__Accessor__Group}{Accessor Functions}.

Getting an iterator to access elements of a given container is done through the functions of that particular container. There is no function to create a generic iterator as iterators absolutely depend on the container. This means you won\textquotesingle{}t find iterator creation function here, those can be found on the documentation of the container type you\textquotesingle{}re using. Though created with container specific functions iterators are always deleted with the same function\+: \hyperlink{group__Eina__Iterator__Group_gaf9261991a4b05dc63e3401278a3281f8}{eina\+\_\+iterator\+\_\+free()}.

To get the data and iterate, use \hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\+\_\+iterator\+\_\+next()}. To call a function on all the elements of a container, use \hyperlink{group__Eina__Iterator__Group_gad9b7adc8db40a640d03e9bc4a5d52370}{eina\+\_\+iterator\+\_\+foreach()}.

Here an \hyperlink{eina_iterator_example_page}{example} 

\subsection{Macro Definition Documentation}
\hypertarget{group__Eina__Iterator__Group_gad2f796ac4df0e500d25235c29821faa3}{}\index{Iterator Functions@{Iterator Functions}!E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H@{E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H}}
\index{E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H@{E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H}!Iterator Functions@{Iterator Functions}}
\subsubsection[{E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H(
\begin{DoxyParamCaption}
\item[{}]{itr, }
\item[{}]{data}
\end{DoxyParamCaption}
)}\label{group__Eina__Iterator__Group_gad2f796ac4df0e500d25235c29821faa3}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{while} (\hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\_iterator\_next}((itr), \(\backslash\)
                                                              (\textcolor{keywordtype}{void} **)(\textcolor{keywordtype}{void} *)&(data)))
\end{DoxyCode}


Macro to iterate over all elements easily. 


\begin{DoxyParams}{Parameters}
{\em itr} & The iterator to use. \\
\hline
{\em data} & Where to store $\ast$ data, must be a pointer support getting its address since $\ast$ \hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\+\_\+iterator\+\_\+next()} requires a pointer to pointer!\\
\hline
\end{DoxyParams}
This macro is a convenient way to use iterators, very similar to \hyperlink{group__Eina__List__Group_gad02f746a08ee0b12b7ed66d4bc0d71d8}{E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H()}.

This macro can be used for freeing the data of a list, like in the following example. It has the same goal as the one documented in \hyperlink{group__Eina__List__Group_gad02f746a08ee0b12b7ed66d4bc0d71d8}{E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H()}, but using iterators\+:


\begin{DoxyCode}
1 Eina\_List     *list;
2 Eina\_Iterator *itr;
3 char          *data;
4 
5 // list is already filled,
6 // its elements are just duplicated strings
7 
8 itr = eina\_list\_iterator\_new(list);
9 EINA\_ITERATOR\_FOREACH(itr, data)
10   free(data);
11 eina\_iterator\_free(itr);
12 eina\_list\_free(list);
\end{DoxyCode}


\begin{DoxyNote}{Note}
this example is not optimal algorithm to release a list since it will walk the list twice, but it serves as an example. For optimized version use \hyperlink{group__Eina__List__Group_gae27a2c686a0a11693f9b06957c9bba83}{E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+R\+E\+E()}
\end{DoxyNote}
\begin{DoxyWarning}{Warning}
The order in which the elements will be traversed depends on the underlying container and {\bfseries shouldn\textquotesingle{}t} be relied upon.

unless explicitly stated in functions returning iterators, do not modify the iterated object while you walk it, in this example using lists, do not remove list nodes or you might crash! This is not a limitiation of iterators themselves, rather in the iterators implementations to keep them as simple and fast as possible. 
\end{DoxyWarning}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_con_client_example_8c-example}{ecore\+\_\+con\+\_\+client\+\_\+example.\+c}, \hyperlink{eet-data-file_descriptor_01_8c-example}{eet-\/data-\/file\+\_\+descriptor\+\_\+01.\+c}, \hyperlink{eina_file_01_8c-example}{eina\+\_\+file\+\_\+01.\+c}, \hyperlink{eina_list_03_8c-example}{eina\+\_\+list\+\_\+03.\+c}, and \hyperlink{eina_tiler_01_8c-example}{eina\+\_\+tiler\+\_\+01.\+c}.\end{Desc}


Referenced by ecore\+\_\+file\+\_\+dir\+\_\+is\+\_\+empty(), ecore\+\_\+file\+\_\+ls(), ecore\+\_\+file\+\_\+recursive\+\_\+rm(), edje\+\_\+available\+\_\+modules\+\_\+get(), edje\+\_\+color\+\_\+class\+\_\+del(), edje\+\_\+color\+\_\+class\+\_\+set(), edje\+\_\+edit\+\_\+clean\+\_\+save\+\_\+as(), edje\+\_\+edit\+\_\+data\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+font\+\_\+path\+\_\+get(), edje\+\_\+edit\+\_\+fonts\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+group\+\_\+add(), edje\+\_\+edit\+\_\+group\+\_\+aliased\+\_\+get(), edje\+\_\+edit\+\_\+group\+\_\+aliases\+\_\+get(), edje\+\_\+edit\+\_\+group\+\_\+copy(), edje\+\_\+edit\+\_\+group\+\_\+data\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+image\+\_\+del(), edje\+\_\+edit\+\_\+image\+\_\+replace(), edje\+\_\+edit\+\_\+image\+\_\+usage\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+source\+\_\+generate(), edje\+\_\+mmap\+\_\+collection\+\_\+list(), edje\+\_\+mmap\+\_\+group\+\_\+exists(), edje\+\_\+text\+\_\+class\+\_\+del(), edje\+\_\+text\+\_\+class\+\_\+set(), eina\+\_\+file\+\_\+flush(), eina\+\_\+tiler\+\_\+subtract(), eina\+\_\+tiler\+\_\+union(), and eldbus\+\_\+shutdown().



\subsection{Function Documentation}
\hypertarget{group__Eina__Iterator__Group_gaf9261991a4b05dc63e3401278a3281f8}{}\index{Iterator Functions@{Iterator Functions}!eina\+\_\+iterator\+\_\+free@{eina\+\_\+iterator\+\_\+free}}
\index{eina\+\_\+iterator\+\_\+free@{eina\+\_\+iterator\+\_\+free}!Iterator Functions@{Iterator Functions}}
\subsubsection[{eina\+\_\+iterator\+\_\+free(\+Eina\+\_\+\+Iterator $\ast$iterator)}]{\setlength{\rightskip}{0pt plus 5cm}void eina\+\_\+iterator\+\_\+free (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Iterator} $\ast$}]{iterator}
\end{DoxyParamCaption}
)}\label{group__Eina__Iterator__Group_gaf9261991a4b05dc63e3401278a3281f8}


Free an iterator. 


\begin{DoxyParams}{Parameters}
{\em iterator} & The iterator to free.\\
\hline
\end{DoxyParams}
This function frees {\ttfamily iterator} if it is not {\ttfamily N\+U\+L\+L}; 

References \+\_\+\+Eina\+\_\+\+Iterator\+::free.



Referenced by ecore\+\_\+file\+\_\+dir\+\_\+is\+\_\+empty(), ecore\+\_\+file\+\_\+ls(), ecore\+\_\+file\+\_\+recursive\+\_\+rm(), ecore\+\_\+wl\+\_\+window\+\_\+surface\+\_\+find(), edje\+\_\+available\+\_\+modules\+\_\+get(), edje\+\_\+color\+\_\+class\+\_\+del(), edje\+\_\+color\+\_\+class\+\_\+set(), edje\+\_\+edit\+\_\+clean\+\_\+save\+\_\+as(), edje\+\_\+edit\+\_\+data\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+font\+\_\+path\+\_\+get(), edje\+\_\+edit\+\_\+fonts\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+group\+\_\+add(), edje\+\_\+edit\+\_\+group\+\_\+aliased\+\_\+get(), edje\+\_\+edit\+\_\+group\+\_\+aliases\+\_\+get(), edje\+\_\+edit\+\_\+group\+\_\+copy(), edje\+\_\+edit\+\_\+group\+\_\+data\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+image\+\_\+del(), edje\+\_\+edit\+\_\+image\+\_\+replace(), edje\+\_\+edit\+\_\+image\+\_\+usage\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+source\+\_\+generate(), edje\+\_\+mmap\+\_\+collection\+\_\+list(), edje\+\_\+mmap\+\_\+group\+\_\+exists(), edje\+\_\+text\+\_\+class\+\_\+del(), edje\+\_\+text\+\_\+class\+\_\+set(), eina\+\_\+cow\+\_\+gc(), eina\+\_\+file\+\_\+flush(), eina\+\_\+hash\+\_\+foreach(), eina\+\_\+tiler\+\_\+equal(), eina\+\_\+tiler\+\_\+intersection(), eina\+\_\+tiler\+\_\+subtract(), eina\+\_\+tiler\+\_\+union(), eldbus\+\_\+shutdown(), and efl\+::eina\+::\+\_\+common\+\_\+iterator\+\_\+base$<$ T const  $>$\+::$\sim$\+\_\+common\+\_\+iterator\+\_\+base().

\hypertarget{group__Eina__Iterator__Group_ga5583ab703b156f74f0c2a74875c95cc2}{}\index{Iterator Functions@{Iterator Functions}!eina\+\_\+iterator\+\_\+container\+\_\+get@{eina\+\_\+iterator\+\_\+container\+\_\+get}}
\index{eina\+\_\+iterator\+\_\+container\+\_\+get@{eina\+\_\+iterator\+\_\+container\+\_\+get}!Iterator Functions@{Iterator Functions}}
\subsubsection[{eina\+\_\+iterator\+\_\+container\+\_\+get(\+Eina\+\_\+\+Iterator $\ast$iterator)}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ eina\+\_\+iterator\+\_\+container\+\_\+get (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Iterator} $\ast$}]{iterator}
\end{DoxyParamCaption}
)}\label{group__Eina__Iterator__Group_ga5583ab703b156f74f0c2a74875c95cc2}


Return the container of an iterator. 


\begin{DoxyParams}{Parameters}
{\em iterator} & The iterator. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The container which created the iterator.
\end{DoxyReturn}
This function returns the container which created {\ttfamily iterator}. If {\ttfamily iterator} is {\ttfamily N\+U\+L\+L}, this function returns {\ttfamily N\+U\+L\+L}. 

References \+\_\+\+Eina\+\_\+\+Iterator\+::get\+\_\+container.

\hypertarget{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{}\index{Iterator Functions@{Iterator Functions}!eina\+\_\+iterator\+\_\+next@{eina\+\_\+iterator\+\_\+next}}
\index{eina\+\_\+iterator\+\_\+next@{eina\+\_\+iterator\+\_\+next}!Iterator Functions@{Iterator Functions}}
\subsubsection[{eina\+\_\+iterator\+\_\+next(\+Eina\+\_\+\+Iterator $\ast$iterator, void $\ast$$\ast$data)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Bool} eina\+\_\+iterator\+\_\+next (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Iterator} $\ast$}]{iterator, }
\item[{void $\ast$$\ast$}]{data}
\end{DoxyParamCaption}
)}\label{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}


Return the value of the current element and go to the next one. 


\begin{DoxyParams}{Parameters}
{\em iterator} & The iterator. \\
\hline
{\em data} & The data of the element. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function returns the value of the current element pointed by {\ttfamily iterator} in {\ttfamily data}, then goes to the next element. If {\ttfamily iterator} is {\ttfamily N\+U\+L\+L} or if a problem occurred, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} is returned, otherwise \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} is returned. 

References E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E, and \+\_\+\+Eina\+\_\+\+Iterator\+::next.



Referenced by ecore\+\_\+wl\+\_\+window\+\_\+surface\+\_\+find(), eina\+\_\+cow\+\_\+gc(), eina\+\_\+tiler\+\_\+equal(), eina\+\_\+tiler\+\_\+intersection(), and efl\+::eina\+::iterator$<$ T $>$\+::operator++().

\hypertarget{group__Eina__Iterator__Group_gad9b7adc8db40a640d03e9bc4a5d52370}{}\index{Iterator Functions@{Iterator Functions}!eina\+\_\+iterator\+\_\+foreach@{eina\+\_\+iterator\+\_\+foreach}}
\index{eina\+\_\+iterator\+\_\+foreach@{eina\+\_\+iterator\+\_\+foreach}!Iterator Functions@{Iterator Functions}}
\subsubsection[{eina\+\_\+iterator\+\_\+foreach(\+Eina\+\_\+\+Iterator $\ast$iterator, Eina\+\_\+\+Each\+\_\+\+Cb callback, const void $\ast$fdata)}]{\setlength{\rightskip}{0pt plus 5cm}void eina\+\_\+iterator\+\_\+foreach (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Iterator} $\ast$}]{iterator, }
\item[{{\bf Eina\+\_\+\+Each\+\_\+\+Cb}}]{callback, }
\item[{const void $\ast$}]{fdata}
\end{DoxyParamCaption}
)}\label{group__Eina__Iterator__Group_gad9b7adc8db40a640d03e9bc4a5d52370}


Iterate over the container and execute a callback on each element. 


\begin{DoxyParams}{Parameters}
{\em iterator} & The iterator. \\
\hline
{\em callback} & The callback called on each iteration. \\
\hline
{\em fdata} & The data passed to the callback.\\
\hline
\end{DoxyParams}
This function iterates over the elements pointed by {\ttfamily iterator}, beginning from the current element. For Each element, the callback {\ttfamily cb} is called with the data {\ttfamily fdata}. If {\ttfamily iterator} is {\ttfamily N\+U\+L\+L}, the function returns immediately. Also, if {\ttfamily cb} returns \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E}, the iteration stops at that point, if {\ttfamily cb} returns \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} the iteration continues. 

References eina\+\_\+iterator\+\_\+lock(), eina\+\_\+iterator\+\_\+unlock(), E\+I\+N\+A\+\_\+\+T\+R\+U\+E, \+\_\+\+Eina\+\_\+\+Iterator\+::get\+\_\+container, and \+\_\+\+Eina\+\_\+\+Iterator\+::next.



Referenced by eina\+\_\+hash\+\_\+foreach().

\hypertarget{group__Eina__Iterator__Group_ga8eaa65229852ee6bae9ef2f05c2cd2ec}{}\index{Iterator Functions@{Iterator Functions}!eina\+\_\+iterator\+\_\+lock@{eina\+\_\+iterator\+\_\+lock}}
\index{eina\+\_\+iterator\+\_\+lock@{eina\+\_\+iterator\+\_\+lock}!Iterator Functions@{Iterator Functions}}
\subsubsection[{eina\+\_\+iterator\+\_\+lock(\+Eina\+\_\+\+Iterator $\ast$iterator)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Bool} eina\+\_\+iterator\+\_\+lock (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Iterator} $\ast$}]{iterator}
\end{DoxyParamCaption}
)}\label{group__Eina__Iterator__Group_ga8eaa65229852ee6bae9ef2f05c2cd2ec}


Lock the container of the iterator. 


\begin{DoxyParams}{Parameters}
{\em iterator} & The iterator. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
If the container of the {\ttfamily iterator} permits it, it will be locked. When a container is locked calling \hyperlink{group__Eina__Iterator__Group_gad9b7adc8db40a640d03e9bc4a5d52370}{eina\+\_\+iterator\+\_\+foreach()} on it will return immediately. If {\ttfamily iterator} is {\ttfamily N\+U\+L\+L} or if a problem occurred, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} is returned, otherwise \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} is returned. If the container isn\textquotesingle{}t lockable, it will return \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E}.

\begin{DoxyWarning}{Warning}
None of the existing eina data structures are lockable. 
\end{DoxyWarning}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E, E\+I\+N\+A\+\_\+\+T\+R\+U\+E, and \+\_\+\+Eina\+\_\+\+Iterator\+::lock.



Referenced by eina\+\_\+iterator\+\_\+foreach().

\hypertarget{group__Eina__Iterator__Group_gac29534bd3b27947d560890a4d2fb6fcd}{}\index{Iterator Functions@{Iterator Functions}!eina\+\_\+iterator\+\_\+unlock@{eina\+\_\+iterator\+\_\+unlock}}
\index{eina\+\_\+iterator\+\_\+unlock@{eina\+\_\+iterator\+\_\+unlock}!Iterator Functions@{Iterator Functions}}
\subsubsection[{eina\+\_\+iterator\+\_\+unlock(\+Eina\+\_\+\+Iterator $\ast$iterator)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Bool} eina\+\_\+iterator\+\_\+unlock (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Iterator} $\ast$}]{iterator}
\end{DoxyParamCaption}
)}\label{group__Eina__Iterator__Group_gac29534bd3b27947d560890a4d2fb6fcd}


Unlock the container of the iterator. 


\begin{DoxyParams}{Parameters}
{\em iterator} & The iterator. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
If the container of the {\ttfamily iterator} permits it and was previously locked, it will be unlocked. If {\ttfamily iterator} is {\ttfamily N\+U\+L\+L} or if a problem occurred, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} is returned, otherwise \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} is returned. If the container is not lockable, it will return \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E}.

\begin{DoxyWarning}{Warning}
None of the existing eina data structures are lockable. 
\end{DoxyWarning}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E, E\+I\+N\+A\+\_\+\+T\+R\+U\+E, and \+\_\+\+Eina\+\_\+\+Iterator\+::unlock.



Referenced by eina\+\_\+iterator\+\_\+foreach().

