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


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


\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct__Eina__Accessor}{\+\_\+\+Eina\+\_\+\+Accessor}}
\begin{DoxyCompactList}\small\item\em Structure to provide random access to data structures. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Accessor__Group_ga279a8d8204d00590a2f5529e4359bfe3}\label{group__Eina__Accessor__Group_ga279a8d8204d00590a2f5529e4359bfe3}} 
\#define {\bfseries FUNC\+\_\+\+ACCESSOR\+\_\+\+GET\+\_\+\+AT}(Function)~((\mbox{\hyperlink{group__Eina__Accessor__Group_ga095891ba9b51a39be00c26c8b9cadda4}{Eina\+\_\+\+Accessor\+\_\+\+Get\+\_\+\+At\+\_\+\+Callback}})Function)
\begin{DoxyCompactList}\small\item\em Definition for helper macro to cast {\itshape Function} to a Eina\+\_\+\+Accessor\+\_\+\+Get\+\_\+\+At\+\_\+\+Callback. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Accessor__Group_gae86a7a10bfdf27781fd930ea1ad0f69b}\label{group__Eina__Accessor__Group_gae86a7a10bfdf27781fd930ea1ad0f69b}} 
\#define {\bfseries FUNC\+\_\+\+ACCESSOR\+\_\+\+GET\+\_\+\+CONTAINER}(Function)~((\mbox{\hyperlink{group__Eina__Accessor__Group_gaef151d729d6fe66adddc156e507e9f25}{Eina\+\_\+\+Accessor\+\_\+\+Get\+\_\+\+Container\+\_\+\+Callback}})Function)
\begin{DoxyCompactList}\small\item\em Definition for helper macro to cast {\itshape Function} to a Eina\+\_\+\+Accessor\+\_\+\+Get\+\_\+\+Container\+\_\+\+Callback. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Accessor__Group_gacbe51b5e7bbd77448af4b0a6b48be101}\label{group__Eina__Accessor__Group_gacbe51b5e7bbd77448af4b0a6b48be101}} 
\#define {\bfseries FUNC\+\_\+\+ACCESSOR\+\_\+\+FREE}(Function)~((\mbox{\hyperlink{group__Eina__Accessor__Group_ga769cafc66da99f273fed70b476ac267e}{Eina\+\_\+\+Accessor\+\_\+\+Free\+\_\+\+Callback}})Function)
\begin{DoxyCompactList}\small\item\em Definition for helper macro to cast {\itshape Function} to a Eina\+\_\+\+Accessor\+\_\+\+Free\+\_\+\+Callback. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Accessor__Group_gac6118c9d83e0ecc49d64e9d6a55ce8f4}\label{group__Eina__Accessor__Group_gac6118c9d83e0ecc49d64e9d6a55ce8f4}} 
\#define {\bfseries FUNC\+\_\+\+ACCESSOR\+\_\+\+LOCK}(Function)~((\mbox{\hyperlink{group__Eina__Accessor__Group_ga065dd799cff7bd10d3a7ca58d844d9fa}{Eina\+\_\+\+Accessor\+\_\+\+Lock\+\_\+\+Callback}})Function)
\begin{DoxyCompactList}\small\item\em Definition for helper macro to cast {\itshape Function} to a Eina\+\_\+\+Iterator\+\_\+\+Lock\+\_\+\+Callback. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Accessor__Group_ga0731ded73bf09c32424d9ed9af030061}{FUNC\+\_\+\+ACCESSOR\+\_\+\+CLONE}}(Function)~((\mbox{\hyperlink{group__Eina__Accessor__Group_gaaedbf58fae067e59258f9d34b093f161}{Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback}})Function)
\begin{DoxyCompactList}\small\item\em Definition for helper macro to cast {\ttfamily Function} to a Eina\+\_\+\+Iterator\+\_\+\+Clone\+\_\+\+Callback. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Accessor__Group_gab959a885591d4348c1d6abb243f3c2c0}{EINA\+\_\+\+ACCESSOR\+\_\+\+FOREACH}}(accessor,  counter,  data)
\begin{DoxyCompactList}\small\item\em Definition for helper macro to iterate over all the elements easily. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Accessor__Group_ga9790bb89e1d2608f6556ee702f46b08c}{EINA\+\_\+\+C\+\_\+\+ARRAY\+\_\+\+ACCESSOR\+\_\+\+NEW}}(Array)~\mbox{\hyperlink{group__Eina__Accessor__Group_ga262c497ee4a78a93602a9edd83a54384}{eina\+\_\+carray\+\_\+length\+\_\+accessor\+\_\+new}}((void$\ast$$\ast$) Array, sizeof (Array\mbox{[}0\mbox{]}), \mbox{\hyperlink{group__Eina__Types__Group_ga7c1b6f81660b4e30516169e9e7d3261c}{EINA\+\_\+\+C\+\_\+\+ARRAY\+\_\+\+LENGTH}}(Array))
\begin{DoxyCompactList}\small\item\em Creates an Eina\+\_\+\+Accessor that wraps a plain fixed size C array. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Accessor__Group_gac8ff526399011f328fd0d679d9059acb}\label{group__Eina__Accessor__Group_gac8ff526399011f328fd0d679d9059acb}} 
\#define {\bfseries EINA\+\_\+\+C\+\_\+\+ARRAY\+\_\+\+ACCESSOR\+\_\+\+PTR\+\_\+\+NEW}(Array)~\mbox{\hyperlink{group__Eina__Accessor__Group_ga2a4e662fce1d5110f8b826e5f4df9efd}{eina\+\_\+carray\+\_\+length\+\_\+ptr\+\_\+accessor\+\_\+new}}((void$\ast$$\ast$) Array, sizeof (Array\mbox{[}0\mbox{]}), \mbox{\hyperlink{group__Eina__Types__Group_ga7c1b6f81660b4e30516169e9e7d3261c}{EINA\+\_\+\+C\+\_\+\+ARRAY\+\_\+\+LENGTH}}(Array))
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}\label{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}} 
typedef struct \mbox{\hyperlink{struct__Eina__Accessor}{\+\_\+\+Eina\+\_\+\+Accessor}} {\bfseries Eina\+\_\+\+Accessor}
\begin{DoxyCompactList}\small\item\em Type for a accessor structure. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Accessor__Group_ga095891ba9b51a39be00c26c8b9cadda4}\label{group__Eina__Accessor__Group_ga095891ba9b51a39be00c26c8b9cadda4}} 
typedef \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}($\ast$ {\bfseries Eina\+\_\+\+Accessor\+\_\+\+Get\+\_\+\+At\+\_\+\+Callback}) (\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$it, unsigned int idx, void $\ast$$\ast$data)
\begin{DoxyCompactList}\small\item\em Type for a callback that returns the data of a container as the given index. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Accessor__Group_gaef151d729d6fe66adddc156e507e9f25}\label{group__Eina__Accessor__Group_gaef151d729d6fe66adddc156e507e9f25}} 
typedef void $\ast$($\ast$ {\bfseries Eina\+\_\+\+Accessor\+\_\+\+Get\+\_\+\+Container\+\_\+\+Callback}) (\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$it)
\begin{DoxyCompactList}\small\item\em Type for a callback to return the container of the accessor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Accessor__Group_ga769cafc66da99f273fed70b476ac267e}\label{group__Eina__Accessor__Group_ga769cafc66da99f273fed70b476ac267e}} 
typedef void($\ast$ {\bfseries Eina\+\_\+\+Accessor\+\_\+\+Free\+\_\+\+Callback}) (\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$it)
\begin{DoxyCompactList}\small\item\em Type for a callback to free the accessor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Accessor__Group_ga065dd799cff7bd10d3a7ca58d844d9fa}\label{group__Eina__Accessor__Group_ga065dd799cff7bd10d3a7ca58d844d9fa}} 
typedef \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}($\ast$ {\bfseries Eina\+\_\+\+Accessor\+\_\+\+Lock\+\_\+\+Callback}) (\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$it)
\begin{DoxyCompactList}\small\item\em Type for a callback to lock the accessor. \end{DoxyCompactList}\item 
typedef \mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$($\ast$ \mbox{\hyperlink{group__Eina__Accessor__Group_gaaedbf58fae067e59258f9d34b093f161}{Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback}}) (\mbox{\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}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Accessor__Group_ga5a4baf96fea2d4150e03b6abcc43be13}{eina\+\_\+accessor\+\_\+free}} (\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$accessor)
\begin{DoxyCompactList}\small\item\em Frees an accessor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Accessor__Group_ga44dccec20fabc2242e88bbb8ae281c31}{eina\+\_\+accessor\+\_\+data\+\_\+get}} (\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$accessor, unsigned int position, void $\ast$$\ast$data)
\begin{DoxyCompactList}\small\item\em Gets the data of an accessor at the given position. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void $\ast$ \mbox{\hyperlink{group__Eina__Accessor__Group_gaec9fcc05b1b693ea473f667ca6238565}{eina\+\_\+accessor\+\_\+container\+\_\+get}} (\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$accessor)
\begin{DoxyCompactList}\small\item\em Gets the container of an accessor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Accessor__Group_ga9414d004b05280129a28b1a6e5207eb4}{eina\+\_\+accessor\+\_\+over}} (\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$accessor, \mbox{\hyperlink{group__Eina__Types__Group_gab115f6c19b6641ab5ba22ed45d9b7aa4}{Eina\+\_\+\+Each\+\_\+\+Cb}} cb, unsigned int start, unsigned int end, const void $\ast$fdata)
\begin{DoxyCompactList}\small\item\em Iterates over the container and executes a callback on the chosen elements. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Accessor__Group_gab0884ad40391b43e2359ae70316bd9ce}{eina\+\_\+accessor\+\_\+lock}} (\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$accessor)
\begin{DoxyCompactList}\small\item\em Locks the container of the accessor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$ \mbox{\hyperlink{group__Eina__Accessor__Group_ga7a1d09e887ff10f7b86775890074a5ec}{eina\+\_\+accessor\+\_\+clone}} (\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$accessor)
\begin{DoxyCompactList}\small\item\em Clones the container of the accessor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Accessor__Group_ga7f52bb9a221d535927b74987d90ef59a}{eina\+\_\+accessor\+\_\+unlock}} (\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$accessor)
\begin{DoxyCompactList}\small\item\em Unlocks the container of the accessor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$ \mbox{\hyperlink{group__Eina__Accessor__Group_ga262c497ee4a78a93602a9edd83a54384}{eina\+\_\+carray\+\_\+length\+\_\+accessor\+\_\+new}} (void $\ast$$\ast$array, unsigned int step, unsigned int length)
\begin{DoxyCompactList}\small\item\em Creates an Eina\+\_\+\+Accessor that wraps a plain fixed size C array. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$ \mbox{\hyperlink{group__Eina__Accessor__Group_ga2a4e662fce1d5110f8b826e5f4df9efd}{eina\+\_\+carray\+\_\+length\+\_\+ptr\+\_\+accessor\+\_\+new}} (void $\ast$$\ast$array, unsigned int step, unsigned int length)
\begin{DoxyCompactList}\small\item\em Creates an Eina\+\_\+\+Accessor that wraps a plain fixed size C array. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{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++ STL). Accessors allows random access (that is, any element in the container). For sequential access, see \mbox{\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\+: \mbox{\hyperlink{group__Eina__Accessor__Group_ga5a4baf96fea2d4150e03b6abcc43be13}{eina\+\_\+accessor\+\_\+free()}}.

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

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

\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__Eina__Accessor__Group_ga0731ded73bf09c32424d9ed9af030061}\label{group__Eina__Accessor__Group_ga0731ded73bf09c32424d9ed9af030061}} 
\index{Accessor Functions@{Accessor Functions}!FUNC\_ACCESSOR\_CLONE@{FUNC\_ACCESSOR\_CLONE}}
\index{FUNC\_ACCESSOR\_CLONE@{FUNC\_ACCESSOR\_CLONE}!Accessor Functions@{Accessor Functions}}
\doxysubsubsection{\texorpdfstring{FUNC\_ACCESSOR\_CLONE}{FUNC\_ACCESSOR\_CLONE}}
{\footnotesize\ttfamily \#define FUNC\+\_\+\+ACCESSOR\+\_\+\+CLONE(\begin{DoxyParamCaption}\item[{}]{Function }\end{DoxyParamCaption})~((\mbox{\hyperlink{group__Eina__Accessor__Group_gaaedbf58fae067e59258f9d34b093f161}{Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback}})Function)}



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

\begin{DoxySince}{Since}
1.\+10 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Accessor__Group_gab959a885591d4348c1d6abb243f3c2c0}\label{group__Eina__Accessor__Group_gab959a885591d4348c1d6abb243f3c2c0}} 
\index{Accessor Functions@{Accessor Functions}!EINA\_ACCESSOR\_FOREACH@{EINA\_ACCESSOR\_FOREACH}}
\index{EINA\_ACCESSOR\_FOREACH@{EINA\_ACCESSOR\_FOREACH}!Accessor Functions@{Accessor Functions}}
\doxysubsubsection{\texorpdfstring{EINA\_ACCESSOR\_FOREACH}{EINA\_ACCESSOR\_FOREACH}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+ACCESSOR\+\_\+\+FOREACH(\begin{DoxyParamCaption}\item[{}]{accessor,  }\item[{}]{counter,  }\item[{}]{data }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\ \ \textcolor{keywordflow}{for}\ ((counter)\ =\ 0;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ eina\_accessor\_data\_get((accessor),\ (counter),\ (\textcolor{keywordtype}{void}\ **)(\textcolor{keywordtype}{void}\ *)\&(data));\ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ (counter)++)}

\end{DoxyCode}


Definition for helper macro to iterate over all the elements easily. 

This macro allows a convenient way to loop over all elements in an accessor, very similar to \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\+\_\+\+LIST\+\_\+\+FOREACH()}}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em accessor} & The accessor to use \\
\hline
\mbox{\texttt{ out}}  & {\em counter} & A counter used by \mbox{\hyperlink{group__Eina__Accessor__Group_ga44dccec20fabc2242e88bbb8ae281c31}{eina\+\_\+accessor\+\_\+data\+\_\+get()}} when iterating over the container. \\
\hline
\mbox{\texttt{ out}}  & {\em data} & A pointer to store the data ~\newline
 It must be a pointer to support getting its address since \mbox{\hyperlink{group__Eina__Accessor__Group_ga44dccec20fabc2242e88bbb8ae281c31}{eina\+\_\+accessor\+\_\+data\+\_\+get()}} requires a pointer.\\
\hline
\end{DoxyParams}
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}{EINA\+\_\+\+LIST\+\_\+\+FOREACH()}}, but using accessors\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\mbox{\hyperlink{struct__Eina__List}{Eina\_List}}\ \ \ \ \ *list;}
\DoxyCodeLine{\mbox{\hyperlink{struct__Eina__Accessor}{Eina\_Accessor}}\ *accessor;}
\DoxyCodeLine{\textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \ \ i;}
\DoxyCodeLine{\textcolor{keywordtype}{char}\ \ \ \ \ \ \ \ \ \ *data;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ list\ is\ already\ filled,}}
\DoxyCodeLine{\textcolor{comment}{//\ its\ elements\ are\ just\ duplicated\ strings}}
\DoxyCodeLine{}
\DoxyCodeLine{accessor\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga335519c1e915268f4d96233d317ce06d}{eina\_list\_accessor\_new}}(list);}
\DoxyCodeLine{\mbox{\hyperlink{group__Eina__Accessor__Group_gab959a885591d4348c1d6abb243f3c2c0}{EINA\_ACCESSOR\_FOREACH}}(accessor,\ i,\ data)}
\DoxyCodeLine{\ \ free(data);}
\DoxyCodeLine{\mbox{\hyperlink{group__Eina__Accessor__Group_ga5a4baf96fea2d4150e03b6abcc43be13}{eina\_accessor\_free}}(accessor);}
\DoxyCodeLine{\mbox{\hyperlink{group__Eina__List__Group_ga82a1bfa543e21853f9ea3ff88dd1250b}{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 \mbox{\hyperlink{group__Eina__List__Group_gae27a2c686a0a11693f9b06957c9bba83}{EINA\+\_\+\+LIST\+\_\+\+FREE()}}.
\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}
\mbox{\Hypertarget{group__Eina__Accessor__Group_ga9790bb89e1d2608f6556ee702f46b08c}\label{group__Eina__Accessor__Group_ga9790bb89e1d2608f6556ee702f46b08c}} 
\index{Accessor Functions@{Accessor Functions}!EINA\_C\_ARRAY\_ACCESSOR\_NEW@{EINA\_C\_ARRAY\_ACCESSOR\_NEW}}
\index{EINA\_C\_ARRAY\_ACCESSOR\_NEW@{EINA\_C\_ARRAY\_ACCESSOR\_NEW}!Accessor Functions@{Accessor Functions}}
\doxysubsubsection{\texorpdfstring{EINA\_C\_ARRAY\_ACCESSOR\_NEW}{EINA\_C\_ARRAY\_ACCESSOR\_NEW}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+C\+\_\+\+ARRAY\+\_\+\+ACCESSOR\+\_\+\+NEW(\begin{DoxyParamCaption}\item[{}]{Array }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Accessor__Group_ga262c497ee4a78a93602a9edd83a54384}{eina\+\_\+carray\+\_\+length\+\_\+accessor\+\_\+new}}((void$\ast$$\ast$) Array, sizeof (Array\mbox{[}0\mbox{]}), \mbox{\hyperlink{group__Eina__Types__Group_ga7c1b6f81660b4e30516169e9e7d3261c}{EINA\+\_\+\+C\+\_\+\+ARRAY\+\_\+\+LENGTH}}(Array))}



Creates an Eina\+\_\+\+Accessor that wraps a plain fixed size C array. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em Array} & The array \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The accessor that will give access to the passed array
\end{DoxyReturn}
You can create it like this\+: int array\mbox{[}\mbox{]} = \{1, 2, 3, 4, 1337, 42\};

Eina\+\_\+\+Accessor$\ast$ accessor = \mbox{\hyperlink{group__Eina__Accessor__Group_ga9790bb89e1d2608f6556ee702f46b08c}{EINA\+\_\+\+C\+\_\+\+ARRAY\+\_\+\+ACCESSOR\+\_\+\+NEW(array)}}

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



\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em Array} & The array \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The accessor that will give access to the passed array
\end{DoxyReturn}
You can create it like this\+: int array\mbox{[}\mbox{]} = \{1, 2, 3, 4, 1337, 42\};

Eina\+\_\+\+Accessor$\ast$ accessor = \mbox{\hyperlink{group__Eina__Accessor__Group_ga9790bb89e1d2608f6556ee702f46b08c}{EINA\+\_\+\+C\+\_\+\+ARRAY\+\_\+\+ACCESSOR\+\_\+\+NEW(array)}}

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


\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{group__Eina__Accessor__Group_gaaedbf58fae067e59258f9d34b093f161}\label{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}}
\doxysubsubsection{\texorpdfstring{Eina\_Accessor\_Clone\_Callback}{Eina\_Accessor\_Clone\_Callback}}
{\footnotesize\ttfamily Eina\+\_\+\+Accessor\+\_\+\+Clone\+\_\+\+Callback}



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

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


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Accessor__Group_ga5a4baf96fea2d4150e03b6abcc43be13}\label{group__Eina__Accessor__Group_ga5a4baf96fea2d4150e03b6abcc43be13}} 
\index{Accessor Functions@{Accessor Functions}!eina\_accessor\_free@{eina\_accessor\_free}}
\index{eina\_accessor\_free@{eina\_accessor\_free}!Accessor Functions@{Accessor Functions}}
\doxysubsubsection{\texorpdfstring{eina\_accessor\_free()}{eina\_accessor\_free()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+accessor\+\_\+free (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$}]{accessor }\end{DoxyParamCaption})}



Frees an accessor. 

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


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1ccf8538d0015b3801ff642e6156843a}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN}}, and \mbox{\hyperlink{struct__Eina__Accessor_aac780e7db7bbc7e0071539b2ea2d921a}{\+\_\+\+Eina\+\_\+\+Accessor\+::free}}.



Referenced by \mbox{\hyperlink{group__Elm__Gengrid__Group_gaac441e6db110d918a0086e8d78df4aaf}{elm\+\_\+gengrid\+\_\+nth\+\_\+item\+\_\+get()}}, and \mbox{\hyperlink{group__Elm__Genlist__Group_ga85af283dcddcf367d0a3da16a71c9a87}{elm\+\_\+genlist\+\_\+nth\+\_\+item\+\_\+get()}}.

\mbox{\Hypertarget{group__Eina__Accessor__Group_ga44dccec20fabc2242e88bbb8ae281c31}\label{group__Eina__Accessor__Group_ga44dccec20fabc2242e88bbb8ae281c31}} 
\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}}
\doxysubsubsection{\texorpdfstring{eina\_accessor\_data\_get()}{eina\_accessor\_data\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+accessor\+\_\+data\+\_\+get (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$}]{accessor,  }\item[{unsigned int}]{position,  }\item[{void $\ast$$\ast$}]{data }\end{DoxyParamCaption})}



Gets the data of an accessor at the given position. 

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 NULL} or if an error occurs, {\ttfamily EINA\+\_\+\+FALSE} is returned, otherwise {\ttfamily EINA\+\_\+\+TRUE} is returned. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em accessor} & The accessor \\
\hline
\mbox{\texttt{ in}}  & {\em position} & The position of the element \\
\hline
\mbox{\texttt{ in}}  & {\em data} & The pointer that stores the data to retrieve \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, otherwise \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, and \mbox{\hyperlink{struct__Eina__Accessor_a94e572d9c264a85462540942ce421408}{\+\_\+\+Eina\+\_\+\+Accessor\+::get\+\_\+at}}.



Referenced by \mbox{\hyperlink{group__Elm__Gengrid__Group_gaac441e6db110d918a0086e8d78df4aaf}{elm\+\_\+gengrid\+\_\+nth\+\_\+item\+\_\+get()}}, and \mbox{\hyperlink{group__Elm__Genlist__Group_ga85af283dcddcf367d0a3da16a71c9a87}{elm\+\_\+genlist\+\_\+nth\+\_\+item\+\_\+get()}}.

\mbox{\Hypertarget{group__Eina__Accessor__Group_gaec9fcc05b1b693ea473f667ca6238565}\label{group__Eina__Accessor__Group_gaec9fcc05b1b693ea473f667ca6238565}} 
\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}}
\doxysubsubsection{\texorpdfstring{eina\_accessor\_container\_get()}{eina\_accessor\_container\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void $\ast$ eina\+\_\+accessor\+\_\+container\+\_\+get (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$}]{accessor }\end{DoxyParamCaption})}



Gets the container of an accessor. 

This function returns the container that created {\ttfamily accessor}. If {\ttfamily accessor} is {\ttfamily NULL}, this function returns {\ttfamily NULL}. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em accessor} & The accessor \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The container that created the accessor 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, and \mbox{\hyperlink{struct__Eina__Accessor_a260aff4a53db874e25ec328b6089d8e4}{\+\_\+\+Eina\+\_\+\+Accessor\+::get\+\_\+container}}.

\mbox{\Hypertarget{group__Eina__Accessor__Group_ga9414d004b05280129a28b1a6e5207eb4}\label{group__Eina__Accessor__Group_ga9414d004b05280129a28b1a6e5207eb4}} 
\index{Accessor Functions@{Accessor Functions}!eina\_accessor\_over@{eina\_accessor\_over}}
\index{eina\_accessor\_over@{eina\_accessor\_over}!Accessor Functions@{Accessor Functions}}
\doxysubsubsection{\texorpdfstring{eina\_accessor\_over()}{eina\_accessor\_over()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+accessor\+\_\+over (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$}]{accessor,  }\item[{\mbox{\hyperlink{group__Eina__Types__Group_gab115f6c19b6641ab5ba22ed45d9b7aa4}{Eina\+\_\+\+Each\+\_\+\+Cb}}}]{cb,  }\item[{unsigned int}]{start,  }\item[{unsigned int}]{end,  }\item[{const void $\ast$}]{fdata }\end{DoxyParamCaption})}



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

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 NULL} or if {\ttfamily start} is greater than or equal to {\ttfamily end}, the function returns immediately.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em accessor} & The accessor \\
\hline
\mbox{\texttt{ in}}  & {\em cb} & The callback called on the chosen elements \\
\hline
\mbox{\texttt{ in}}  & {\em start} & The position of the first element \\
\hline
\mbox{\texttt{ in}}  & {\em end} & The position of the last element \\
\hline
\mbox{\texttt{ in}}  & {\em fdata} & The data passed to the callback \\
\hline
\end{DoxyParams}


References \mbox{\hyperlink{group__Eina__Accessor__Group_gab0884ad40391b43e2359ae70316bd9ce}{eina\+\_\+accessor\+\_\+lock()}}, \mbox{\hyperlink{group__Eina__Accessor__Group_ga7f52bb9a221d535927b74987d90ef59a}{eina\+\_\+accessor\+\_\+unlock()}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4c65e34fc0099bb68833d44ad02fb724}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+RETURN}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1ccf8538d0015b3801ff642e6156843a}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN}}, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}, \mbox{\hyperlink{struct__Eina__Accessor_a94e572d9c264a85462540942ce421408}{\+\_\+\+Eina\+\_\+\+Accessor\+::get\+\_\+at}}, and \mbox{\hyperlink{struct__Eina__Accessor_a260aff4a53db874e25ec328b6089d8e4}{\+\_\+\+Eina\+\_\+\+Accessor\+::get\+\_\+container}}.

\mbox{\Hypertarget{group__Eina__Accessor__Group_gab0884ad40391b43e2359ae70316bd9ce}\label{group__Eina__Accessor__Group_gab0884ad40391b43e2359ae70316bd9ce}} 
\index{Accessor Functions@{Accessor Functions}!eina\_accessor\_lock@{eina\_accessor\_lock}}
\index{eina\_accessor\_lock@{eina\_accessor\_lock}!Accessor Functions@{Accessor Functions}}
\doxysubsubsection{\texorpdfstring{eina\_accessor\_lock()}{eina\_accessor\_lock()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+accessor\+\_\+lock (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$}]{accessor }\end{DoxyParamCaption})}



Locks the container of the accessor. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em accessor} & The accessor \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, otherwise \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If the container of the {\ttfamily accessor} permits it, it is locked. When a container is locked by calling \mbox{\hyperlink{group__Eina__Accessor__Group_ga9414d004b05280129a28b1a6e5207eb4}{eina\+\_\+accessor\+\_\+over()}} on it, it returns immediately. If {\ttfamily accessor} is {\ttfamily NULL} or if a problem occurs, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} is returned, otherwise \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} is returned. If the container is not lockable, it returns \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.
\end{DoxyNote}
\begin{DoxyWarning}{Warning}
None of the existing eina data structures are lockable. 
\end{DoxyWarning}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}, and \mbox{\hyperlink{struct__Eina__Accessor_a8cf02063085253ffa5bc440e7e045cb4}{\+\_\+\+Eina\+\_\+\+Accessor\+::lock}}.



Referenced by \mbox{\hyperlink{group__Eina__Accessor__Group_ga9414d004b05280129a28b1a6e5207eb4}{eina\+\_\+accessor\+\_\+over()}}.

\mbox{\Hypertarget{group__Eina__Accessor__Group_ga7a1d09e887ff10f7b86775890074a5ec}\label{group__Eina__Accessor__Group_ga7a1d09e887ff10f7b86775890074a5ec}} 
\index{Accessor Functions@{Accessor Functions}!eina\_accessor\_clone@{eina\_accessor\_clone}}
\index{eina\_accessor\_clone@{eina\_accessor\_clone}!Accessor Functions@{Accessor Functions}}
\doxysubsubsection{\texorpdfstring{eina\_accessor\_clone()}{eina\_accessor\_clone()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$ eina\+\_\+accessor\+\_\+clone (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$}]{accessor }\end{DoxyParamCaption})}



Clones the container of the accessor. 


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


References \mbox{\hyperlink{struct__Eina__Accessor_a57312cb7d1d427be9743b288929da76c}{\+\_\+\+Eina\+\_\+\+Accessor\+::clone}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

\mbox{\Hypertarget{group__Eina__Accessor__Group_ga7f52bb9a221d535927b74987d90ef59a}\label{group__Eina__Accessor__Group_ga7f52bb9a221d535927b74987d90ef59a}} 
\index{Accessor Functions@{Accessor Functions}!eina\_accessor\_unlock@{eina\_accessor\_unlock}}
\index{eina\_accessor\_unlock@{eina\_accessor\_unlock}!Accessor Functions@{Accessor Functions}}
\doxysubsubsection{\texorpdfstring{eina\_accessor\_unlock()}{eina\_accessor\_unlock()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+accessor\+\_\+unlock (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$}]{accessor }\end{DoxyParamCaption})}



Unlocks the container of the accessor. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em accessor} & The accessor \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, otherwise \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}
\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 NULL} or if a problem occurs, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} is returned, otherwise \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} is returned. If the container is not lockable, it returns \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.
\end{DoxyNote}
\begin{DoxyWarning}{Warning}
None of the existing eina data structures are lockable. 
\end{DoxyWarning}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}, and \mbox{\hyperlink{struct__Eina__Accessor_a21b3acca1cc2113c1bf39ce3693cc1e3}{\+\_\+\+Eina\+\_\+\+Accessor\+::unlock}}.



Referenced by \mbox{\hyperlink{group__Eina__Accessor__Group_ga9414d004b05280129a28b1a6e5207eb4}{eina\+\_\+accessor\+\_\+over()}}.

\mbox{\Hypertarget{group__Eina__Accessor__Group_ga262c497ee4a78a93602a9edd83a54384}\label{group__Eina__Accessor__Group_ga262c497ee4a78a93602a9edd83a54384}} 
\index{Accessor Functions@{Accessor Functions}!eina\_carray\_length\_accessor\_new@{eina\_carray\_length\_accessor\_new}}
\index{eina\_carray\_length\_accessor\_new@{eina\_carray\_length\_accessor\_new}!Accessor Functions@{Accessor Functions}}
\doxysubsubsection{\texorpdfstring{eina\_carray\_length\_accessor\_new()}{eina\_carray\_length\_accessor\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$ eina\+\_\+carray\+\_\+length\+\_\+accessor\+\_\+new (\begin{DoxyParamCaption}\item[{void $\ast$$\ast$}]{array,  }\item[{unsigned int}]{step,  }\item[{unsigned int}]{length }\end{DoxyParamCaption})}



Creates an Eina\+\_\+\+Accessor that wraps a plain fixed size C array. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em array} & The array \\
\hline
\mbox{\texttt{ in}}  & {\em step} & The size of one element in the array \\
\hline
\mbox{\texttt{ in}}  & {\em length} & The number of elements in the array \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The accessor that will give access to the passed array
\end{DoxyReturn}
You can create it like this\+: int array\mbox{[}\mbox{]} = \{1, 2, 3, 4, 1337, 42\};

Eina\+\_\+\+Accessor$\ast$ accessor = eina\+\_\+carray\+\_\+length\+\_\+accessor\+\_\+new(array, sizeof(int), sizeof(array)/sizeof(int));

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


References \mbox{\hyperlink{group__Eina__Magic__Group_ga470f5ce28eaaf59ce80523be8471c5e0}{EINA\+\_\+\+MAGIC\+\_\+\+SET}}, \mbox{\hyperlink{group__Eina__Accessor__Group_gacbe51b5e7bbd77448af4b0a6b48be101}{FUNC\+\_\+\+ACCESSOR\+\_\+\+FREE}}, \mbox{\hyperlink{group__Eina__Accessor__Group_ga279a8d8204d00590a2f5529e4359bfe3}{FUNC\+\_\+\+ACCESSOR\+\_\+\+GET\+\_\+\+AT}}, and \mbox{\hyperlink{group__Eina__Accessor__Group_gae86a7a10bfdf27781fd930ea1ad0f69b}{FUNC\+\_\+\+ACCESSOR\+\_\+\+GET\+\_\+\+CONTAINER}}.

\mbox{\Hypertarget{group__Eina__Accessor__Group_ga2a4e662fce1d5110f8b826e5f4df9efd}\label{group__Eina__Accessor__Group_ga2a4e662fce1d5110f8b826e5f4df9efd}} 
\index{Accessor Functions@{Accessor Functions}!eina\_carray\_length\_ptr\_accessor\_new@{eina\_carray\_length\_ptr\_accessor\_new}}
\index{eina\_carray\_length\_ptr\_accessor\_new@{eina\_carray\_length\_ptr\_accessor\_new}!Accessor Functions@{Accessor Functions}}
\doxysubsubsection{\texorpdfstring{eina\_carray\_length\_ptr\_accessor\_new()}{eina\_carray\_length\_ptr\_accessor\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}} $\ast$ eina\+\_\+carray\+\_\+length\+\_\+ptr\+\_\+accessor\+\_\+new (\begin{DoxyParamCaption}\item[{void $\ast$$\ast$}]{array,  }\item[{unsigned int}]{step,  }\item[{unsigned int}]{length }\end{DoxyParamCaption})}



Creates an Eina\+\_\+\+Accessor that wraps a plain fixed size C array. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em array} & The array \\
\hline
\mbox{\texttt{ in}}  & {\em step} & The size of one element in the array \\
\hline
\mbox{\texttt{ in}}  & {\em length} & The number of elements in the array \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The accessor that will give access to the passed array
\end{DoxyReturn}
You can create it like this\+: int array\mbox{[}\mbox{]} = \{1, 2, 3, 4, 1337, 42\};

Eina\+\_\+\+Accessor$\ast$ accessor = eina\+\_\+carray\+\_\+length\+\_\+accessor\+\_\+new(array, sizeof(int), sizeof(array)/sizeof(int));

Note\+: The difference to eina\+\_\+carray\+\_\+length\+\_\+accessor\+\_\+new is that this will fill the pointer to the value into the data pointer. $\ast$

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


References \mbox{\hyperlink{group__Eina__Magic__Group_ga470f5ce28eaaf59ce80523be8471c5e0}{EINA\+\_\+\+MAGIC\+\_\+\+SET}}, \mbox{\hyperlink{group__Eina__Accessor__Group_gacbe51b5e7bbd77448af4b0a6b48be101}{FUNC\+\_\+\+ACCESSOR\+\_\+\+FREE}}, \mbox{\hyperlink{group__Eina__Accessor__Group_ga279a8d8204d00590a2f5529e4359bfe3}{FUNC\+\_\+\+ACCESSOR\+\_\+\+GET\+\_\+\+AT}}, and \mbox{\hyperlink{group__Eina__Accessor__Group_gae86a7a10bfdf27781fd930ea1ad0f69b}{FUNC\+\_\+\+ACCESSOR\+\_\+\+GET\+\_\+\+CONTAINER}}.

