\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 \mbox{\hyperlink{struct__Eina__Iterator}{\+\_\+\+Eina\+\_\+\+Iterator}}
\begin{DoxyCompactList}\small\item\em structure of an iterator \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Iterator__Group_gaec80e80b2867e391b0b27f5f20c3a5b3}\label{group__Eina__Iterator__Group_gaec80e80b2867e391b0b27f5f20c3a5b3}} 
\#define \mbox{\hyperlink{group__Eina__Iterator__Group_gaec80e80b2867e391b0b27f5f20c3a5b3}{F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+N\+E\+XT}}(Function)~((\mbox{\hyperlink{group__Eina__Iterator__Group_ga773167f332514b82df20f40cb420175b}{Eina\+\_\+\+Iterator\+\_\+\+Next\+\_\+\+Callback}})Function)
\begin{DoxyCompactList}\small\item\em Helper macro to cast {\ttfamily Function} to a Eina\+\_\+\+Iterator\+\_\+\+Next\+\_\+\+Callback. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Iterator__Group_gab41f5a30f0a2030f4a832548d18332db}\label{group__Eina__Iterator__Group_gab41f5a30f0a2030f4a832548d18332db}} 
\#define \mbox{\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\+ER}}(Function)~((\mbox{\hyperlink{group__Eina__Iterator__Group_ga57223f82bdfc6f6b3a998ab06fbe9e95}{Eina\+\_\+\+Iterator\+\_\+\+Get\+\_\+\+Container\+\_\+\+Callback}})Function)
\begin{DoxyCompactList}\small\item\em Helper macro to cast {\ttfamily Function} to a Eina\+\_\+\+Iterator\+\_\+\+Get\+\_\+\+Container\+\_\+\+Callback. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Iterator__Group_gad1ea4d3a7e58b47b23073a58e869d167}\label{group__Eina__Iterator__Group_gad1ea4d3a7e58b47b23073a58e869d167}} 
\#define \mbox{\hyperlink{group__Eina__Iterator__Group_gad1ea4d3a7e58b47b23073a58e869d167}{F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+R\+EE}}(Function)~((\mbox{\hyperlink{group__Eina__Iterator__Group_gad93c2a23b15eb897e5b4a40a6bd993a7}{Eina\+\_\+\+Iterator\+\_\+\+Free\+\_\+\+Callback}})Function)
\begin{DoxyCompactList}\small\item\em Helper macro to cast {\ttfamily Function} to a Eina\+\_\+\+Iterator\+\_\+\+Free\+\_\+\+Callback. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Iterator__Group_ga71905e8fc8ce5d31aea26362da620eff}\label{group__Eina__Iterator__Group_ga71905e8fc8ce5d31aea26362da620eff}} 
\#define \mbox{\hyperlink{group__Eina__Iterator__Group_ga71905e8fc8ce5d31aea26362da620eff}{F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+L\+O\+CK}}(Function)~((\mbox{\hyperlink{group__Eina__Iterator__Group_ga49ccc56ba720e92fbe314b8eb6a87add}{Eina\+\_\+\+Iterator\+\_\+\+Lock\+\_\+\+Callback}})Function)
\begin{DoxyCompactList}\small\item\em Helper macro to cast {\ttfamily Function} to a Eina\+\_\+\+Iterator\+\_\+\+Lock\+\_\+\+Callback. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Iterator__Group_gac7314580e18868ef229f5d2814562794}{E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+CH}}(itr,  data)
\begin{DoxyCompactList}\small\item\em Definition for the macro to iterate over all elements easily. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}\label{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}} 
typedef struct \mbox{\hyperlink{struct__Eina__Iterator}{\+\_\+\+Eina\+\_\+\+Iterator}} \mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}}
\begin{DoxyCompactList}\small\item\em Abstract type for iterators. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Iterator__Group_ga773167f332514b82df20f40cb420175b}\label{group__Eina__Iterator__Group_ga773167f332514b82df20f40cb420175b}} 
typedef \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}($\ast$ \mbox{\hyperlink{group__Eina__Iterator__Group_ga773167f332514b82df20f40cb420175b}{Eina\+\_\+\+Iterator\+\_\+\+Next\+\_\+\+Callback}}) (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$it, void $\ast$$\ast$data)
\begin{DoxyCompactList}\small\item\em Type for a callback that returns the next element in a container. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Iterator__Group_ga57223f82bdfc6f6b3a998ab06fbe9e95}\label{group__Eina__Iterator__Group_ga57223f82bdfc6f6b3a998ab06fbe9e95}} 
typedef void $\ast$($\ast$ \mbox{\hyperlink{group__Eina__Iterator__Group_ga57223f82bdfc6f6b3a998ab06fbe9e95}{Eina\+\_\+\+Iterator\+\_\+\+Get\+\_\+\+Container\+\_\+\+Callback}}) (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$it)
\begin{DoxyCompactList}\small\item\em Type for a callback that returns the container. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Iterator__Group_gad93c2a23b15eb897e5b4a40a6bd993a7}\label{group__Eina__Iterator__Group_gad93c2a23b15eb897e5b4a40a6bd993a7}} 
typedef void($\ast$ \mbox{\hyperlink{group__Eina__Iterator__Group_gad93c2a23b15eb897e5b4a40a6bd993a7}{Eina\+\_\+\+Iterator\+\_\+\+Free\+\_\+\+Callback}}) (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$it)
\begin{DoxyCompactList}\small\item\em Type for a callback that frees the container. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Iterator__Group_ga49ccc56ba720e92fbe314b8eb6a87add}\label{group__Eina__Iterator__Group_ga49ccc56ba720e92fbe314b8eb6a87add}} 
typedef \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}($\ast$ \mbox{\hyperlink{group__Eina__Iterator__Group_ga49ccc56ba720e92fbe314b8eb6a87add}{Eina\+\_\+\+Iterator\+\_\+\+Lock\+\_\+\+Callback}}) (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$it)
\begin{DoxyCompactList}\small\item\em Type for a callback that lock the container. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{group__Eina__Iterator__Group_gaf9261991a4b05dc63e3401278a3281f8}{eina\+\_\+iterator\+\_\+free}} (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$iterator)
\begin{DoxyCompactList}\small\item\em Frees an iterator. \end{DoxyCompactList}\item 
void $\ast$ \mbox{\hyperlink{group__Eina__Iterator__Group_ga5583ab703b156f74f0c2a74875c95cc2}{eina\+\_\+iterator\+\_\+container\+\_\+get}} (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$iterator)
\begin{DoxyCompactList}\small\item\em Returns the container of an iterator. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\+\_\+iterator\+\_\+next}} (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$iterator, void $\ast$$\ast$data)
\begin{DoxyCompactList}\small\item\em Returns the value of the current element and go to the next one. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Iterator__Group_gad9b7adc8db40a640d03e9bc4a5d52370}{eina\+\_\+iterator\+\_\+foreach}} (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$iterator, \mbox{\hyperlink{group__Eina__Types__Group_gab115f6c19b6641ab5ba22ed45d9b7aa4}{Eina\+\_\+\+Each\+\_\+\+Cb}} callback, const void $\ast$fdata)
\begin{DoxyCompactList}\small\item\em Iterates over the container and execute a callback on each element. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Iterator__Group_ga8eaa65229852ee6bae9ef2f05c2cd2ec}{eina\+\_\+iterator\+\_\+lock}} (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$iterator)
\begin{DoxyCompactList}\small\item\em Locks the container of the iterator. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Iterator__Group_gac29534bd3b27947d560890a4d2fb6fcd}{eina\+\_\+iterator\+\_\+unlock}} (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$iterator)
\begin{DoxyCompactList}\small\item\em Unlocks the container of the iterator. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$ \mbox{\hyperlink{group__Eina__Iterator__Group_ga41e5d347b3837f8ad3aa8913049fcc2e}{eina\+\_\+carray\+\_\+iterator\+\_\+new}} (void $\ast$$\ast$array)
\begin{DoxyCompactList}\small\item\em Creates an Eina\+\_\+\+Iterator that iterates through a N\+U\+L-\/terminated C array. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$ \mbox{\hyperlink{group__Eina__Iterator__Group_ga29f5d106f64a0af4b06e3f2035f3e355}{eina\+\_\+iterator\+\_\+filter\+\_\+new}} (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$original, \mbox{\hyperlink{group__Eina__Types__Group_gab115f6c19b6641ab5ba22ed45d9b7aa4}{Eina\+\_\+\+Each\+\_\+\+Cb}} filter, \mbox{\hyperlink{group__Eina__Types__Group_gadbac560ba2bca5c61d97bfbb542018f3}{Eina\+\_\+\+Free\+\_\+\+Cb}} free\+\_\+cb, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Creates a new iterator which which iterates through all elements with are accepted by the filter callback. \end{DoxyCompactList}\end{DoxyCompactItemize}


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

These functions allow accessing elements of a container in a generic way, without knowing which container is used (a bit like iterators in the C++ S\+TL). Iterators only allow sequential access (that is, from one element to the next one). For random access, see \mbox{\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 an iterator creation function here, those can be found with the documentation of the container type you\textquotesingle{}re using. Though created with container specific functions iterators are always deleted with the same function\+: \mbox{\hyperlink{group__Eina__Iterator__Group_gaf9261991a4b05dc63e3401278a3281f8}{eina\+\_\+iterator\+\_\+free()}}.

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

Here an \mbox{\hyperlink{eina_iterator_example_page}{example}} 

\subsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__Eina__Iterator__Group_gac7314580e18868ef229f5d2814562794}\label{group__Eina__Iterator__Group_gac7314580e18868ef229f5d2814562794}} 
\index{Iterator Functions@{Iterator Functions}!E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+CH@{E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+CH}}
\index{E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+CH@{E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+CH}!Iterator Functions@{Iterator Functions}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+CH}{EINA\_ITERATOR\_FOREACH}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+O\+R\+E\+A\+CH(\begin{DoxyParamCaption}\item[{}]{itr,  }\item[{}]{data }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{while} (\mbox{\hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\_iterator\_next}}((itr), \(\backslash\)
                                                              (\textcolor{keywordtype}{void} **)(\textcolor{keywordtype}{void} *)&(data)))
\end{DoxyCode}


Definition for the macro to iterate over all elements easily. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em itr} & The iterator to use. \\
\hline
\mbox{\tt out}  & {\em data} & Where to store $\ast$ data, must be a pointer support getting its address since $\ast$ \mbox{\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 \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{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 \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H()}}, but using iterators\+:


\begin{DoxyCode}
\mbox{\hyperlink{struct__Eina__List}{Eina\_List}}     *list;
\mbox{\hyperlink{struct__Eina__Iterator}{Eina\_Iterator}} *itr;
\textcolor{keywordtype}{char}          *data;

\textcolor{comment}{// list is already filled,}
\textcolor{comment}{// its elements are just duplicated strings}

itr = \mbox{\hyperlink{group__Eina__List__Group_gabcfb6a861aa7c0db0ee36252ac2a254d}{eina\_list\_iterator\_new}}(list);
\mbox{\hyperlink{group__Eina__Iterator__Group_gac7314580e18868ef229f5d2814562794}{EINA\_ITERATOR\_FOREACH}}(itr, data)
  free(data);
\mbox{\hyperlink{group__Eina__Iterator__Group_gaf9261991a4b05dc63e3401278a3281f8}{eina\_iterator\_free}}(itr);
\mbox{\hyperlink{group__Eina__List__Group_ga608bd2fbf06293a1b794648990703ab4}{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 \mbox{\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 limitation of iterators themselves, rather in the iterators implementations to keep them as simple and fast as possible. 
\end{DoxyWarning}
\begin{Desc}
\item[Examples\+: ]\par
\mbox{\hyperlink{ecore_con_client_example_8c-example}{ecore\+\_\+con\+\_\+client\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}}, \mbox{\hyperlink{eet-data-file_descriptor_01_8c-example}{eet-\/data-\/file\+\_\+descriptor\+\_\+01.\+c}}, \mbox{\hyperlink{eina_file_01_8c-example}{eina\+\_\+file\+\_\+01.\+c}}, \mbox{\hyperlink{eina_list_03_8c-example}{eina\+\_\+list\+\_\+03.\+c}}, and \mbox{\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\+\_\+edit\+\_\+clean\+\_\+save\+\_\+as(), edje\+\_\+edit\+\_\+data\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+data\+\_\+source\+\_\+generate(), 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\+\_\+replace(), edje\+\_\+edit\+\_\+image\+\_\+set\+\_\+del(), edje\+\_\+edit\+\_\+set\+\_\+usage\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+vector\+\_\+usage\+\_\+list\+\_\+get(), edje\+\_\+mmap\+\_\+collection\+\_\+list(), edje\+\_\+mmap\+\_\+group\+\_\+exists(), efl\+\_\+object\+\_\+shutdown(), eina\+\_\+file\+\_\+flush(), eina\+\_\+tiler\+\_\+subtract(), and elm\+\_\+color\+\_\+class\+\_\+editor\+\_\+add().



\subsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Iterator__Group_gaf9261991a4b05dc63e3401278a3281f8}\label{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{\texorpdfstring{eina\+\_\+iterator\+\_\+free()}{eina\_iterator\_free()}}
{\footnotesize\ttfamily void eina\+\_\+iterator\+\_\+free (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$}]{iterator }\end{DoxyParamCaption})}



Frees an iterator. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em iterator} & The iterator to free.\\
\hline
\end{DoxyParams}
This function frees {\ttfamily iterator} if it is not {\ttfamily N\+U\+LL}; 

Referenced by ecore\+\_\+file\+\_\+dir\+\_\+is\+\_\+empty(), ecore\+\_\+file\+\_\+ls(), ecore\+\_\+file\+\_\+recursive\+\_\+rm(), edje\+\_\+available\+\_\+modules\+\_\+get(), edje\+\_\+edit\+\_\+clean\+\_\+save\+\_\+as(), edje\+\_\+edit\+\_\+data\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+data\+\_\+source\+\_\+generate(), 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\+\_\+replace(), edje\+\_\+mmap\+\_\+collection\+\_\+list(), edje\+\_\+mmap\+\_\+group\+\_\+exists(), efl\+\_\+object\+\_\+shutdown(), eina\+\_\+cow\+\_\+gc(), eina\+\_\+file\+\_\+flush(), eina\+\_\+tiler\+\_\+equal(), eina\+\_\+tiler\+\_\+subtract(), and elm\+\_\+color\+\_\+class\+\_\+editor\+\_\+add().

\mbox{\Hypertarget{group__Eina__Iterator__Group_ga5583ab703b156f74f0c2a74875c95cc2}\label{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{\texorpdfstring{eina\+\_\+iterator\+\_\+container\+\_\+get()}{eina\_iterator\_container\_get()}}
{\footnotesize\ttfamily void$\ast$ eina\+\_\+iterator\+\_\+container\+\_\+get (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$}]{iterator }\end{DoxyParamCaption})}



Returns the container of an iterator. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\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\+LL}, this function returns {\ttfamily N\+U\+LL}. \mbox{\Hypertarget{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}\label{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{\texorpdfstring{eina\+\_\+iterator\+\_\+next()}{eina\_iterator\_next()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+iterator\+\_\+next (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$}]{iterator,  }\item[{void $\ast$$\ast$}]{data }\end{DoxyParamCaption})}



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


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em iterator} & The iterator. \\
\hline
\mbox{\tt out}  & {\em data} & The data of the element. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} 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\+LL} or if a problem occurred, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} is returned, otherwise \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} is returned. 

References E\+I\+N\+A\+\_\+\+F\+A\+L\+SE.



Referenced by eina\+\_\+cow\+\_\+gc(), eina\+\_\+tiler\+\_\+equal(), and eina\+\_\+tiler\+\_\+intersection().

\mbox{\Hypertarget{group__Eina__Iterator__Group_gad9b7adc8db40a640d03e9bc4a5d52370}\label{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{\texorpdfstring{eina\+\_\+iterator\+\_\+foreach()}{eina\_iterator\_foreach()}}
{\footnotesize\ttfamily void eina\+\_\+iterator\+\_\+foreach (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$}]{iterator,  }\item[{\mbox{\hyperlink{group__Eina__Types__Group_gab115f6c19b6641ab5ba22ed45d9b7aa4}{Eina\+\_\+\+Each\+\_\+\+Cb}}}]{callback,  }\item[{const void $\ast$}]{fdata }\end{DoxyParamCaption})}



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


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em iterator} & The iterator. \\
\hline
\mbox{\tt in}  & {\em callback} & The callback called on each iteration. \\
\hline
\mbox{\tt in}  & {\em fdata} & The data passed to the callback.\\
\hline
\end{DoxyParams}
This function iterates over the elements pointed by {\ttfamily iterator}, beginning with the current element. For each element, the callback {\ttfamily cb} is called with the data {\ttfamily fdata}. If {\ttfamily iterator} is {\ttfamily N\+U\+LL}, the function returns immediately. Also, if {\ttfamily cb} returns \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}}, the iteration stops at that point, if {\ttfamily cb} returns \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} the iteration continues. \mbox{\Hypertarget{group__Eina__Iterator__Group_ga8eaa65229852ee6bae9ef2f05c2cd2ec}\label{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{\texorpdfstring{eina\+\_\+iterator\+\_\+lock()}{eina\_iterator\_lock()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+iterator\+\_\+lock (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$}]{iterator }\end{DoxyParamCaption})}



Locks the container of the iterator. 


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

\begin{DoxyWarning}{Warning}
None of the existing eina data structures are lockable. 
\end{DoxyWarning}
\mbox{\Hypertarget{group__Eina__Iterator__Group_gac29534bd3b27947d560890a4d2fb6fcd}\label{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{\texorpdfstring{eina\+\_\+iterator\+\_\+unlock()}{eina\_iterator\_unlock()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+iterator\+\_\+unlock (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$}]{iterator }\end{DoxyParamCaption})}



Unlocks the container of the iterator. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em iterator} & The iterator. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} 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\+LL} or if a problem occurred, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} is returned, otherwise \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} is returned. If the container is not lockable, it will return \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}}.

\begin{DoxyWarning}{Warning}
None of the existing eina data structures are lockable. 
\end{DoxyWarning}
\mbox{\Hypertarget{group__Eina__Iterator__Group_ga41e5d347b3837f8ad3aa8913049fcc2e}\label{group__Eina__Iterator__Group_ga41e5d347b3837f8ad3aa8913049fcc2e}} 
\index{Iterator Functions@{Iterator Functions}!eina\+\_\+carray\+\_\+iterator\+\_\+new@{eina\+\_\+carray\+\_\+iterator\+\_\+new}}
\index{eina\+\_\+carray\+\_\+iterator\+\_\+new@{eina\+\_\+carray\+\_\+iterator\+\_\+new}!Iterator Functions@{Iterator Functions}}
\subsubsection{\texorpdfstring{eina\+\_\+carray\+\_\+iterator\+\_\+new()}{eina\_carray\_iterator\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}}$\ast$ eina\+\_\+carray\+\_\+iterator\+\_\+new (\begin{DoxyParamCaption}\item[{void $\ast$$\ast$}]{array }\end{DoxyParamCaption})}



Creates an Eina\+\_\+\+Iterator that iterates through a N\+U\+L-\/terminated C array. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em array} & The N\+U\+L-\/terminated array\\
\hline
\end{DoxyParams}
You can create it like this\+: int array\mbox{[}\mbox{]} = \{1, 2, 3, 4\}; int$\ast$ array2\mbox{[}\mbox{]} = \{\&array\mbox{[}0\mbox{]}, \&array\mbox{[}1\mbox{]}, \&array\mbox{[}2\mbox{]}, \&array\mbox{[}3\mbox{]}, N\+U\+LL\};

Eina\+\_\+\+Iterator$\ast$ iterator = eina\+\_\+carray\+\_\+iterator\+\_\+new((void$\ast$$\ast$)array);

\begin{DoxySince}{Since}
1.\+18 
\end{DoxySince}


References E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C\+\_\+\+S\+ET, F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+R\+EE, F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+G\+E\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+ER, and F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+N\+E\+XT.

\mbox{\Hypertarget{group__Eina__Iterator__Group_ga29f5d106f64a0af4b06e3f2035f3e355}\label{group__Eina__Iterator__Group_ga29f5d106f64a0af4b06e3f2035f3e355}} 
\index{Iterator Functions@{Iterator Functions}!eina\+\_\+iterator\+\_\+filter\+\_\+new@{eina\+\_\+iterator\+\_\+filter\+\_\+new}}
\index{eina\+\_\+iterator\+\_\+filter\+\_\+new@{eina\+\_\+iterator\+\_\+filter\+\_\+new}!Iterator Functions@{Iterator Functions}}
\subsubsection{\texorpdfstring{eina\+\_\+iterator\+\_\+filter\+\_\+new()}{eina\_iterator\_filter\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}}$\ast$ eina\+\_\+iterator\+\_\+filter\+\_\+new (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$}]{original,  }\item[{\mbox{\hyperlink{group__Eina__Types__Group_gab115f6c19b6641ab5ba22ed45d9b7aa4}{Eina\+\_\+\+Each\+\_\+\+Cb}}}]{filter,  }\item[{\mbox{\hyperlink{group__Eina__Types__Group_gadbac560ba2bca5c61d97bfbb542018f3}{Eina\+\_\+\+Free\+\_\+\+Cb}}}]{free\+\_\+cb,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})}



Creates a new iterator which which iterates through all elements with are accepted by the filter callback. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em original} & the iterator the use as original set \\
\hline
\mbox{\tt in}  & {\em filter} & if the callback returns true the element from the original set is taken into the the new set. \\
\hline
\mbox{\tt in}  & {\em free\+\_\+cb} & when the iterator is gone this callback will be called with data as argument \\
\hline
\mbox{\tt in}  & {\em data} & the data which is passed to the filter callback\\
\hline
\end{DoxyParams}
The iterator is filtered while it is being iterated. The original iterator you pass in here is is then owned and will be freed once the the new iterator is freed.

\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
