\hypertarget{group__Eina__Accessor__Group}{}\section{Accessor Functions}
\label{group__Eina__Accessor__Group}\index{Accessor Functions@{Accessor Functions}}


This group discusses the functions to manage an accessor on containers.  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct__Eina__Accessor}{\+\_\+\+Eina\+\_\+\+Accessor}
\begin{DoxyCompactList}\small\item\em Structure to provide random access to data structures. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Accessor__Group_ga279a8d8204d00590a2f5529e4359bfe3}{}\#define \hyperlink{group__Eina__Accessor__Group_ga279a8d8204d00590a2f5529e4359bfe3}{F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+G\+E\+T\+\_\+\+A\+T}(Function)~((\hyperlink{group__Eina__Accessor__Group_ga095891ba9b51a39be00c26c8b9cadda4}{Eina\+\_\+\+Accessor\+\_\+\+Get\+\_\+\+At\+\_\+\+Callback})Function)\label{group__Eina__Accessor__Group_ga279a8d8204d00590a2f5529e4359bfe3}

\begin{DoxyCompactList}\small\item\em Helper macro to cast {\itshape Function} to a Eina\+\_\+\+Accessor\+\_\+\+Get\+\_\+\+At\+\_\+\+Callback. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Accessor__Group_gae86a7a10bfdf27781fd930ea1ad0f69b}{}\#define \hyperlink{group__Eina__Accessor__Group_gae86a7a10bfdf27781fd930ea1ad0f69b}{F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+G\+E\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+E\+R}(Function)~((\hyperlink{group__Eina__Accessor__Group_gaef151d729d6fe66adddc156e507e9f25}{Eina\+\_\+\+Accessor\+\_\+\+Get\+\_\+\+Container\+\_\+\+Callback})Function)\label{group__Eina__Accessor__Group_gae86a7a10bfdf27781fd930ea1ad0f69b}

\begin{DoxyCompactList}\small\item\em Helper macro to cast {\itshape Function} to a Eina\+\_\+\+Accessor\+\_\+\+Get\+\_\+\+Container\+\_\+\+Callback. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Accessor__Group_gacbe51b5e7bbd77448af4b0a6b48be101}{}\#define \hyperlink{group__Eina__Accessor__Group_gacbe51b5e7bbd77448af4b0a6b48be101}{F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+F\+R\+E\+E}(Function)~((\hyperlink{group__Eina__Accessor__Group_ga769cafc66da99f273fed70b476ac267e}{Eina\+\_\+\+Accessor\+\_\+\+Free\+\_\+\+Callback})Function)\label{group__Eina__Accessor__Group_gacbe51b5e7bbd77448af4b0a6b48be101}

\begin{DoxyCompactList}\small\item\em Helper macro to cast {\itshape Function} to a Eina\+\_\+\+Accessor\+\_\+\+Free\+\_\+\+Callback. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Accessor__Group_gac6118c9d83e0ecc49d64e9d6a55ce8f4}{}\#define \hyperlink{group__Eina__Accessor__Group_gac6118c9d83e0ecc49d64e9d6a55ce8f4}{F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+L\+O\+C\+K}(Function)~((\hyperlink{group__Eina__Accessor__Group_ga065dd799cff7bd10d3a7ca58d844d9fa}{Eina\+\_\+\+Accessor\+\_\+\+Lock\+\_\+\+Callback})Function)\label{group__Eina__Accessor__Group_gac6118c9d83e0ecc49d64e9d6a55ce8f4}

\begin{DoxyCompactList}\small\item\em Helper macro to cast {\itshape Function} to a Eina\+\_\+\+Iterator\+\_\+\+Lock\+\_\+\+Callback. \end{DoxyCompactList}\item 
\#define \hyperlink{group__Eina__Accessor__Group_ga0731ded73bf09c32424d9ed9af030061}{F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+C\+L\+O\+N\+E}(Function)~((\hyperlink{group__Eina__Accessor__Group_gaaedbf58fae067e59258f9d34b093f161}{Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback})Function)
\begin{DoxyCompactList}\small\item\em Helper macro to cast {\ttfamily Function} to a Eina\+\_\+\+Iterator\+\_\+\+Clone\+\_\+\+Callback. \end{DoxyCompactList}\item 
\#define \hyperlink{group__Eina__Accessor__Group_gab959a885591d4348c1d6abb243f3c2c0}{E\+I\+N\+A\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H}(accessor,  counter,  data)
\begin{DoxyCompactList}\small\item\em Helper macro to iterate over all the elements easily. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{}typedef struct \hyperlink{struct__Eina__Accessor}{\+\_\+\+Eina\+\_\+\+Accessor} \hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}\label{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}

\begin{DoxyCompactList}\small\item\em Type for a accessor structure. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Accessor__Group_ga095891ba9b51a39be00c26c8b9cadda4}{}typedef \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}($\ast$ \hyperlink{group__Eina__Accessor__Group_ga095891ba9b51a39be00c26c8b9cadda4}{Eina\+\_\+\+Accessor\+\_\+\+Get\+\_\+\+At\+\_\+\+Callback}) (\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$it, unsigned int idx, void $\ast$$\ast$data)\label{group__Eina__Accessor__Group_ga095891ba9b51a39be00c26c8b9cadda4}

\begin{DoxyCompactList}\small\item\em Type for a callback that returns the data of a container as the given index. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Accessor__Group_gaef151d729d6fe66adddc156e507e9f25}{}typedef void $\ast$($\ast$ \hyperlink{group__Eina__Accessor__Group_gaef151d729d6fe66adddc156e507e9f25}{Eina\+\_\+\+Accessor\+\_\+\+Get\+\_\+\+Container\+\_\+\+Callback}) (\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$it)\label{group__Eina__Accessor__Group_gaef151d729d6fe66adddc156e507e9f25}

\begin{DoxyCompactList}\small\item\em Type for a callback to return the container of the accessor. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Accessor__Group_ga769cafc66da99f273fed70b476ac267e}{}typedef void($\ast$ \hyperlink{group__Eina__Accessor__Group_ga769cafc66da99f273fed70b476ac267e}{Eina\+\_\+\+Accessor\+\_\+\+Free\+\_\+\+Callback}) (\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$it)\label{group__Eina__Accessor__Group_ga769cafc66da99f273fed70b476ac267e}

\begin{DoxyCompactList}\small\item\em Type for a callback to free the accessor. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Accessor__Group_ga065dd799cff7bd10d3a7ca58d844d9fa}{}typedef \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}($\ast$ \hyperlink{group__Eina__Accessor__Group_ga065dd799cff7bd10d3a7ca58d844d9fa}{Eina\+\_\+\+Accessor\+\_\+\+Lock\+\_\+\+Callback}) (\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$it)\label{group__Eina__Accessor__Group_ga065dd799cff7bd10d3a7ca58d844d9fa}

\begin{DoxyCompactList}\small\item\em Type for a callback to lock the accessor. \end{DoxyCompactList}\item 
typedef \hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$($\ast$ \hyperlink{group__Eina__Accessor__Group_gaaedbf58fae067e59258f9d34b093f161}{Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback}) (\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$it)
\begin{DoxyCompactList}\small\item\em Type for a callback to return a clone for the accessor. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Eina__Accessor__Group_ga5ae101883822c1f01688fcef3a6585b8}{eina\+\_\+accessor\+\_\+free} (\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$accessor)
\begin{DoxyCompactList}\small\item\em Frees an accessor. \end{DoxyCompactList}\item 
\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Accessor__Group_ga08786da46a71eb2d1ad0ee07db8463cd}{eina\+\_\+accessor\+\_\+data\+\_\+get} (\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$accessor, unsigned int position, void $\ast$$\ast$data) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1)
\begin{DoxyCompactList}\small\item\em Gets the data of an accessor at the given position. \end{DoxyCompactList}\item 
\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void $\ast$ \hyperlink{group__Eina__Accessor__Group_ga461c9ee7dec70fc5fa17acea0a59beb6}{eina\+\_\+accessor\+\_\+container\+\_\+get} (\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$accessor) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1) \hyperlink{group__Eina__Types__Group_ga4669a55a23089d0f9b70702ef05cea68}{E\+I\+N\+A\+\_\+\+P\+U\+R\+E}
\begin{DoxyCompactList}\small\item\em Gets the container of an accessor. \end{DoxyCompactList}\item 
\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Eina__Accessor__Group_ga1ff21fd278a35a585e2aa3043996b2e8}{eina\+\_\+accessor\+\_\+over} (\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$accessor, \hyperlink{group__Eina__Types__Group_gab115f6c19b6641ab5ba22ed45d9b7aa4}{Eina\+\_\+\+Each\+\_\+\+Cb} cb, unsigned int start, unsigned int end, const void $\ast$fdata) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(2)
\begin{DoxyCompactList}\small\item\em Iterates over the container and executes a callback on the chosen elements. \end{DoxyCompactList}\item 
\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Accessor__Group_ga0ef9b22d8f59031d00e34aa50f9d056e}{eina\+\_\+accessor\+\_\+lock} (\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$accessor) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1)
\begin{DoxyCompactList}\small\item\em Locks the container of the accessor. \end{DoxyCompactList}\item 
\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$ \hyperlink{group__Eina__Accessor__Group_ga4f0a9c869b97b7737036c1435ed1098f}{eina\+\_\+accessor\+\_\+clone} (\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$accessor) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1)
\begin{DoxyCompactList}\small\item\em Clones the container of the accessor. \end{DoxyCompactList}\item 
\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Accessor__Group_ga78a4ad94c6c46f64f96f5b125a9544f8}{eina\+\_\+accessor\+\_\+unlock} (\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$accessor) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1)
\begin{DoxyCompactList}\small\item\em Unlock the container of the accessor. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This group discusses the functions to manage an accessor 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). Accessors allows random access (that is, any element in the container). For sequential access, see \hyperlink{group__Eina__Iterator__Group}{Iterator Functions}.

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

To get the data of an element at a given position, use \hyperlink{group__Eina__Accessor__Group_ga08786da46a71eb2d1ad0ee07db8463cd}{eina\+\_\+accessor\+\_\+data\+\_\+get()}. To call a function on chosen elements of a container, use \hyperlink{group__Eina__Accessor__Group_ga1ff21fd278a35a585e2aa3043996b2e8}{eina\+\_\+accessor\+\_\+over()}.

See an example \hyperlink{eina_accessor_example_01_page}{here}. 

\subsection{Macro Definition Documentation}
\hypertarget{group__Eina__Accessor__Group_ga0731ded73bf09c32424d9ed9af030061}{}\index{Accessor Functions@{Accessor Functions}!F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+C\+L\+O\+N\+E@{F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+C\+L\+O\+N\+E}}
\index{F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+C\+L\+O\+N\+E@{F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+C\+L\+O\+N\+E}!Accessor Functions@{Accessor Functions}}
\subsubsection[{F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+C\+L\+O\+N\+E}]{\setlength{\rightskip}{0pt plus 5cm}\#define F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+C\+L\+O\+N\+E(
\begin{DoxyParamCaption}
\item[{}]{Function}
\end{DoxyParamCaption}
)~(({\bf Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback})Function)}\label{group__Eina__Accessor__Group_ga0731ded73bf09c32424d9ed9af030061}


Helper macro to cast {\ttfamily Function} to a Eina\+\_\+\+Iterator\+\_\+\+Clone\+\_\+\+Callback. 

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


Referenced by eina\+\_\+array\+\_\+accessor\+\_\+new(), and eina\+\_\+list\+\_\+accessor\+\_\+new().

\hypertarget{group__Eina__Accessor__Group_gab959a885591d4348c1d6abb243f3c2c0}{}\index{Accessor Functions@{Accessor Functions}!E\+I\+N\+A\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H@{E\+I\+N\+A\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H}}
\index{E\+I\+N\+A\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H@{E\+I\+N\+A\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H}!Accessor Functions@{Accessor Functions}}
\subsubsection[{E\+I\+N\+A\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\+I\+N\+A\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+F\+O\+R\+E\+A\+C\+H(
\begin{DoxyParamCaption}
\item[{}]{accessor, }
\item[{}]{counter, }
\item[{}]{data}
\end{DoxyParamCaption}
)}\label{group__Eina__Accessor__Group_gab959a885591d4348c1d6abb243f3c2c0}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{for} ((counter) = 0;                                                   \hyperlink{group__Eina__Accessor__Group_ga08786da46a71eb2d1ad0ee07db8463cd}{\(\backslash\)}
\hyperlink{group__Eina__Accessor__Group_ga08786da46a71eb2d1ad0ee07db8463cd}{       eina\_accessor\_data\_get}((accessor), (counter), (\textcolor{keywordtype}{void} **)(\textcolor{keywordtype}{void} *)&(data))
      ; \(\backslash\)
       (counter)++)
\end{DoxyCode}


Helper macro to iterate over all the elements easily. 


\begin{DoxyParams}{Parameters}
{\em accessor} & The accessor to use \\
\hline
{\em counter} & A counter used by \hyperlink{group__Eina__Accessor__Group_ga08786da46a71eb2d1ad0ee07db8463cd}{eina\+\_\+accessor\+\_\+data\+\_\+get()} when iterating over the container. \\
\hline
{\em data} & A pointer to store the data ~\newline
 It must be a pointer to support getting its address since \hyperlink{group__Eina__Accessor__Group_ga08786da46a71eb2d1ad0ee07db8463cd}{eina\+\_\+accessor\+\_\+data\+\_\+get()} requires a pointer.\\
\hline
\end{DoxyParams}
This macro allows a convenient way to loop over all elements in an accessor, 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 accessors\+:


\begin{DoxyCode}
1 Eina\_List     *list;
2 Eina\_Accessor *accessor;
3 unsigned int   i;
4 char          *data;
5 
6 // list is already filled,
7 // its elements are just duplicated strings
8 
9 accessor = eina\_list\_accessor\_new(list);
10 EINA\_ACCESSOR\_FOREACH(accessor, i, data)
11   free(data);
12 eina\_accessor\_free(accessor);
13 eina\_list\_free(list);
\end{DoxyCode}


\begin{DoxyNote}{Note}
If the data type provides both iterators and accessors, prefer to use iterators to iterate over, as they\textquotesingle{}re likely to be more optimized for such a task.

This example is not an optimal algorithm to release a list as it walks through the list twice, but it serves as an example. For an 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}
Unless explicitly stated in the function\textquotesingle{}s returning accessors, do not modify the accessed object while you walk through it. In this example using lists, do not remove list nodes or the program might crash. This is not a limitation of the accessors themselves, but a limitation in the accessors implementations to keep them as simple and fast as possible. 
\end{DoxyWarning}


\subsection{Typedef Documentation}
\hypertarget{group__Eina__Accessor__Group_gaaedbf58fae067e59258f9d34b093f161}{}\index{Accessor Functions@{Accessor Functions}!Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback@{Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback}}
\index{Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback@{Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback}!Accessor Functions@{Accessor Functions}}
\subsubsection[{Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback}]{\setlength{\rightskip}{0pt plus 5cm}Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback}\label{group__Eina__Accessor__Group_gaaedbf58fae067e59258f9d34b093f161}


Type for a callback to return a clone for the accessor. 

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


\subsection{Function Documentation}
\hypertarget{group__Eina__Accessor__Group_ga5ae101883822c1f01688fcef3a6585b8}{}\index{Accessor Functions@{Accessor Functions}!eina\+\_\+accessor\+\_\+free@{eina\+\_\+accessor\+\_\+free}}
\index{eina\+\_\+accessor\+\_\+free@{eina\+\_\+accessor\+\_\+free}!Accessor Functions@{Accessor Functions}}
\subsubsection[{eina\+\_\+accessor\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void eina\+\_\+accessor\+\_\+free (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Accessor} $\ast$}]{accessor}
\end{DoxyParamCaption}
)}\label{group__Eina__Accessor__Group_ga5ae101883822c1f01688fcef3a6585b8}


Frees an accessor. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em accessor} & The accessor to free\\
\hline
\end{DoxyParams}
This function frees {\itshape accessor} if it is not {\ttfamily N\+U\+L\+L}. 

Referenced by efl\+::eina\+::accessor\+\_\+common\+\_\+base$<$ T $>$\+::operator=(), and efl\+::eina\+::accessor\+\_\+common\+\_\+base$<$ T $>$\+::$\sim$accessor\+\_\+common\+\_\+base().

\hypertarget{group__Eina__Accessor__Group_ga08786da46a71eb2d1ad0ee07db8463cd}{}\index{Accessor Functions@{Accessor Functions}!eina\+\_\+accessor\+\_\+data\+\_\+get@{eina\+\_\+accessor\+\_\+data\+\_\+get}}
\index{eina\+\_\+accessor\+\_\+data\+\_\+get@{eina\+\_\+accessor\+\_\+data\+\_\+get}!Accessor Functions@{Accessor Functions}}
\subsubsection[{eina\+\_\+accessor\+\_\+data\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Bool} eina\+\_\+accessor\+\_\+data\+\_\+get (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Accessor} $\ast$}]{accessor, }
\item[{unsigned int}]{position, }
\item[{void $\ast$$\ast$}]{data}
\end{DoxyParamCaption}
)}\label{group__Eina__Accessor__Group_ga08786da46a71eb2d1ad0ee07db8463cd}


Gets the data of an accessor at the given position. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em accessor} & The accessor \\
\hline
\mbox{\tt in}  & {\em position} & The position of the element \\
\hline
\mbox{\tt in}  & {\em data} & The pointer that stores the data to retrieve \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, otherwise \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E}
\end{DoxyReturn}
This function retrieves the data of the element pointed by {\ttfamily accessor} at the position {\ttfamily position}, and stores it in {\ttfamily data}. If {\ttfamily accessor} is {\ttfamily N\+U\+L\+L} or if an error occurs, \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.



Referenced by efl\+::eina\+::accessor$<$ T, typename std\+::enable\+\_\+if$<$ !std\+::is\+\_\+base\+\_\+of$<$\+::efl\+::eo\+::concrete, T $>$\+::value, T $>$\+::type $>$\+::operator\mbox{[}$\,$\mbox{]}(), and efl\+::eina\+::accessor$<$ T, typename std\+::enable\+\_\+if$<$ std\+::is\+\_\+base\+\_\+of$<$\+::efl\+::eo\+::concrete, T $>$\+::value, T $>$\+::type $>$\+::operator\mbox{[}$\,$\mbox{]}().

\hypertarget{group__Eina__Accessor__Group_ga461c9ee7dec70fc5fa17acea0a59beb6}{}\index{Accessor Functions@{Accessor Functions}!eina\+\_\+accessor\+\_\+container\+\_\+get@{eina\+\_\+accessor\+\_\+container\+\_\+get}}
\index{eina\+\_\+accessor\+\_\+container\+\_\+get@{eina\+\_\+accessor\+\_\+container\+\_\+get}!Accessor Functions@{Accessor Functions}}
\subsubsection[{eina\+\_\+accessor\+\_\+container\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void$\ast$ eina\+\_\+accessor\+\_\+container\+\_\+get (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Accessor} $\ast$}]{accessor}
\end{DoxyParamCaption}
)}\label{group__Eina__Accessor__Group_ga461c9ee7dec70fc5fa17acea0a59beb6}


Gets the container of an accessor. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em accessor} & The accessor \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The container that created the accessor
\end{DoxyReturn}
This function returns the container that created {\ttfamily accessor}. If {\ttfamily accessor} is {\ttfamily N\+U\+L\+L}, this function returns {\ttfamily N\+U\+L\+L}. \hypertarget{group__Eina__Accessor__Group_ga1ff21fd278a35a585e2aa3043996b2e8}{}\index{Accessor Functions@{Accessor Functions}!eina\+\_\+accessor\+\_\+over@{eina\+\_\+accessor\+\_\+over}}
\index{eina\+\_\+accessor\+\_\+over@{eina\+\_\+accessor\+\_\+over}!Accessor Functions@{Accessor Functions}}
\subsubsection[{eina\+\_\+accessor\+\_\+over}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void eina\+\_\+accessor\+\_\+over (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Accessor} $\ast$}]{accessor, }
\item[{{\bf Eina\+\_\+\+Each\+\_\+\+Cb}}]{cb, }
\item[{unsigned int}]{start, }
\item[{unsigned int}]{end, }
\item[{const void $\ast$}]{fdata}
\end{DoxyParamCaption}
)}\label{group__Eina__Accessor__Group_ga1ff21fd278a35a585e2aa3043996b2e8}


Iterates over the container and executes a callback on the chosen elements. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em accessor} & The accessor \\
\hline
\mbox{\tt in}  & {\em cb} & The callback called on the chosen elements \\
\hline
\mbox{\tt in}  & {\em start} & The position of the first element \\
\hline
\mbox{\tt in}  & {\em end} & The position of the last element \\
\hline
\mbox{\tt in}  & {\em fdata} & The data passed to the callback\\
\hline
\end{DoxyParams}
This function iterates over the elements pointed by {\ttfamily accessor}, starting from the element at position {\ttfamily start} and ending at the element at position {\ttfamily end}. For each element, the callback {\ttfamily cb} is called with the data {\ttfamily fdata}. If {\ttfamily accessor} is {\ttfamily N\+U\+L\+L} or if {\ttfamily start} is greater than or equal to {\ttfamily end}, the function returns immediately. 

References eina\+\_\+accessor\+\_\+lock(), eina\+\_\+accessor\+\_\+unlock(), and E\+I\+N\+A\+\_\+\+T\+R\+U\+E.

\hypertarget{group__Eina__Accessor__Group_ga0ef9b22d8f59031d00e34aa50f9d056e}{}\index{Accessor Functions@{Accessor Functions}!eina\+\_\+accessor\+\_\+lock@{eina\+\_\+accessor\+\_\+lock}}
\index{eina\+\_\+accessor\+\_\+lock@{eina\+\_\+accessor\+\_\+lock}!Accessor Functions@{Accessor Functions}}
\subsubsection[{eina\+\_\+accessor\+\_\+lock}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Bool} eina\+\_\+accessor\+\_\+lock (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Accessor} $\ast$}]{accessor}
\end{DoxyParamCaption}
)}\label{group__Eina__Accessor__Group_ga0ef9b22d8f59031d00e34aa50f9d056e}


Locks the container of the accessor. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em accessor} & The accessor \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, otherwise \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E}
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If the container of the {\ttfamily accessor} permits it, it is locked. When a container is locked by calling \hyperlink{group__Eina__Accessor__Group_ga1ff21fd278a35a585e2aa3043996b2e8}{eina\+\_\+accessor\+\_\+over()} on it, it returns immediately. If {\ttfamily accessor} is {\ttfamily N\+U\+L\+L} or if a problem occurs, \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 returns \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E}.
\end{DoxyNote}
None of the existing eina data structures are lockable. 

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



Referenced by eina\+\_\+accessor\+\_\+over().

\hypertarget{group__Eina__Accessor__Group_ga4f0a9c869b97b7737036c1435ed1098f}{}\index{Accessor Functions@{Accessor Functions}!eina\+\_\+accessor\+\_\+clone@{eina\+\_\+accessor\+\_\+clone}}
\index{eina\+\_\+accessor\+\_\+clone@{eina\+\_\+accessor\+\_\+clone}!Accessor Functions@{Accessor Functions}}
\subsubsection[{eina\+\_\+accessor\+\_\+clone}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Accessor}$\ast$ eina\+\_\+accessor\+\_\+clone (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Accessor} $\ast$}]{accessor}
\end{DoxyParamCaption}
)}\label{group__Eina__Accessor__Group_ga4f0a9c869b97b7737036c1435ed1098f}


Clones the container of the accessor. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em accessor} & The accessor. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Another accessor 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+10 
\end{DoxySince}


Referenced by efl\+::eina\+::accessor\+\_\+common\+\_\+base$<$ T $>$\+::operator=().

\hypertarget{group__Eina__Accessor__Group_ga78a4ad94c6c46f64f96f5b125a9544f8}{}\index{Accessor Functions@{Accessor Functions}!eina\+\_\+accessor\+\_\+unlock@{eina\+\_\+accessor\+\_\+unlock}}
\index{eina\+\_\+accessor\+\_\+unlock@{eina\+\_\+accessor\+\_\+unlock}!Accessor Functions@{Accessor Functions}}
\subsubsection[{eina\+\_\+accessor\+\_\+unlock}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Bool} eina\+\_\+accessor\+\_\+unlock (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Accessor} $\ast$}]{accessor}
\end{DoxyParamCaption}
)}\label{group__Eina__Accessor__Group_ga78a4ad94c6c46f64f96f5b125a9544f8}


Unlock the container of the accessor. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em accessor} & The accessor \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, otherwise \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E}
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If the container of the {\ttfamily accessor} permits it and is previously locked, it is unlocked. If {\ttfamily accessor} is {\ttfamily N\+U\+L\+L} or if a problem occurs, \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 returns \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E}.
\end{DoxyNote}
\begin{DoxyWarning}{Warning}
None of the existing eina data structures are lockable. 
\end{DoxyWarning}


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



Referenced by eina\+\_\+accessor\+\_\+over().

