\hypertarget{struct__Eet__Data__Descriptor__Class}{}\doxysection{\+\_\+\+Eet\+\_\+\+Data\+\_\+\+Descriptor\+\_\+\+Class Struct Reference}
\label{struct__Eet__Data__Descriptor__Class}\index{\_Eet\_Data\_Descriptor\_Class@{\_Eet\_Data\_Descriptor\_Class}}


Instructs Eet about memory management for different needs under serialization and parse process.  




{\ttfamily \#include $<$Eet.\+h$>$}

\doxysubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{struct__Eet__Data__Descriptor__Class_a4e3696014d6907dadd55840bf6008317}{version}}
\begin{DoxyCompactList}\small\item\em ABI version. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eet__Data__Descriptor__Class_a4cfe16ee62c58ab68bb6feb47829749f}\label{struct__Eet__Data__Descriptor__Class_a4cfe16ee62c58ab68bb6feb47829749f}} 
const char $\ast$ {\bfseries name}
\begin{DoxyCompactList}\small\item\em Name of the user data type to be serialized. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eet__Data__Descriptor__Class_a5e55b214032157b06162b57eaac9fe66}\label{struct__Eet__Data__Descriptor__Class_a5e55b214032157b06162b57eaac9fe66}} 
int {\bfseries size}
\begin{DoxyCompactList}\small\item\em Size in bytes of the user data type to be serialized. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eet__Data__Descriptor__Class_ac0a4996058a1a07dbbe1edc04ad0fa07}\label{struct__Eet__Data__Descriptor__Class_ac0a4996058a1a07dbbe1edc04ad0fa07}} 
\begin{tabbing}
xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill
struct \{\\
\>\mbox{\hyperlink{group__Eet__Data__Group_ga894af1ef8c006fc48235d8b48755e3d8}{Eet\+\_\+\+Descriptor\+\_\+\+Mem\+\_\+\+Alloc\+\_\+\+Callback}} {\bfseries mem\_alloc}\\
\>\>{\em how to allocate memory (usually malloc()) }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_gadc11123034dfc44c5bc31c6f5bdb55fb}{Eet\+\_\+\+Descriptor\+\_\+\+Mem\+\_\+\+Free\+\_\+\+Callback}} {\bfseries mem\_free}\\
\>\>{\em how to free memory (usually free()) }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_ga014b92bba17d33ea41e31ebfd9a23a8b}{Eet\+\_\+\+Descriptor\+\_\+\+Str\+\_\+\+Alloc\+\_\+\+Callback}} {\bfseries str\_alloc}\\
\>\>{\em how to allocate a string }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_ga6e1c79f2b15a0315dd33c05d99cb065a}{Eet\+\_\+\+Descriptor\+\_\+\+Str\+\_\+\+Free\+\_\+\+Callback}} {\bfseries str\_free}\\
\>\>{\em how to free a string }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_ga4aef6ac18690983e6d608d0844b43e5d}{Eet\+\_\+\+Descriptor\+\_\+\+List\+\_\+\+Next\+\_\+\+Callback}} \mbox{\hyperlink{struct__Eet__Data__Descriptor__Class_a4be84e8957fc140f2a8597a34660b6c8}{list\+\_\+next}}\\
\>\>{\em how to iterate to the next element of a list. }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_ga7e6b656ac984d44d0e736655c45982de}{Eet\+\_\+\+Descriptor\+\_\+\+List\+\_\+\+Append\+\_\+\+Callback}} {\bfseries list\_append}\\
\>\>{\em how to append data {\ttfamily d} to list which head node is {\ttfamily l} }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_ga1a75ebbc7a4d8bab9971974335599b04}{Eet\+\_\+\+Descriptor\+\_\+\+List\+\_\+\+Data\+\_\+\+Callback}} {\bfseries list\_data}\\
\>\>{\em retrieves the data from node {\ttfamily l} }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_ga97f9bf8be3bcd13699c4890487bba66c}{Eet\+\_\+\+Descriptor\+\_\+\+List\+\_\+\+Free\+\_\+\+Callback}} {\bfseries list\_free}\\
\>\>{\em free all the nodes from the list which head node is {\ttfamily l} }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_ga530125fcbeb48fb675d020f51b839151}{Eet\+\_\+\+Descriptor\+\_\+\+Hash\+\_\+\+Foreach\+\_\+\+Callback}} {\bfseries hash\_foreach}\\
\>\>{\em iterates over all elements in the hash {\ttfamily h} in no specific order }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_ga94d8c39d01f0c9064713eeb0a18dc6d2}{Eet\+\_\+\+Descriptor\+\_\+\+Hash\+\_\+\+Add\+\_\+\+Callback}} {\bfseries hash\_add}\\
\>\>{\em add a new data {\ttfamily d} with key {\ttfamily k} in hash {\ttfamily h} }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_ga09d99991df39953b4b28de202f3109ab}{Eet\+\_\+\+Descriptor\+\_\+\+Hash\+\_\+\+Free\+\_\+\+Callback}} {\bfseries hash\_free}\\
\>\>{\em free all entries from the hash {\ttfamily h} }\\
\>Eet\_Descriptor\_Str\_Direct\_Alloc\_Callback {\bfseries str\_direct\_alloc}\\
\>\>{\em how to allocate a string directly from file backed/mmaped region pointed by {\ttfamily str} }\\
\>Eet\_Descriptor\_Str\_Direct\_Free\_Callback {\bfseries str\_direct\_free}\\
\>\>{\em how to free a string returned by str\_direct\_alloc }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_gafd67014abf81fb9ff949f32db811253b}{Eet\+\_\+\+Descriptor\+\_\+\+Type\+\_\+\+Get\+\_\+\+Callback}} {\bfseries type\_get}\\
\>\>{\em get the type, as used in the union or variant mapping, that should be used to store the given data into the eet file. }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_gad98f354bc1af39c65c306a2d6905879c}{Eet\+\_\+\+Descriptor\+\_\+\+Type\+\_\+\+Set\+\_\+\+Callback}} {\bfseries type\_set}\\
\>\>{\em called when loading a mapped type with the given {\ttfamily type} used to describe the type in the descriptor }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_ga1782d84edeff89252c1fbaece4244c26}{Eet\+\_\+\+Descriptor\+\_\+\+Array\+\_\+\+Alloc\+\_\+\+Callback}} {\bfseries array\_alloc}\\
\>\>{\em how to allocate memory for array (usually malloc()) }\\
\>\mbox{\hyperlink{group__Eet__Data__Group_ga466313985fc95944629db2a1d2edf08b}{Eet\+\_\+\+Descriptor\+\_\+\+Array\+\_\+\+Free\+\_\+\+Callback}} {\bfseries array\_free}\\
\>\>{\em how to free memory for array (usually free()) }\\
\} {\bfseries func}\\

\end{tabbing}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Instructs Eet about memory management for different needs under serialization and parse process. 

The list and hash methods match the Eina API, so for a more detailed reference on them, look at the Eina\+\_\+\+List and Eina\+\_\+\+Hash documentation, respectively. For the most part these will be used with the standard Eina functions, so using \mbox{\hyperlink{group__Eet__Data__Group_ga941b1fcd6c6c72221d9390f9a0ed751c}{EET\+\_\+\+EINA\+\_\+\+STREAM\+\_\+\+DATA\+\_\+\+DESCRIPTOR\+\_\+\+CLASS\+\_\+\+SET()}} and \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\+\_\+\+EINA\+\_\+\+FILE\+\_\+\+DATA\+\_\+\+DESCRIPTOR\+\_\+\+CLASS\+\_\+\+SET()}} will set up everything accordingly. \begin{Desc}
\item[Examples]\par
\mbox{\hyperlink{eet-data-file_descriptor_01_8c-example}{eet-\/data-\/file\+\_\+descriptor\+\_\+01.\+c}}, \mbox{\hyperlink{eet-data-file_descriptor_02_8c-example}{eet-\/data-\/file\+\_\+descriptor\+\_\+02.\+c}}, \mbox{\hyperlink{eet-data-nested_8c-example}{eet-\/data-\/nested.\+c}}, and \mbox{\hyperlink{eet-data-simple_8c-example}{eet-\/data-\/simple.\+c}}.\end{Desc}


\doxysubsection{Field Documentation}
\mbox{\Hypertarget{struct__Eet__Data__Descriptor__Class_a4e3696014d6907dadd55840bf6008317}\label{struct__Eet__Data__Descriptor__Class_a4e3696014d6907dadd55840bf6008317}} 
\index{\_Eet\_Data\_Descriptor\_Class@{\_Eet\_Data\_Descriptor\_Class}!version@{version}}
\index{version@{version}!\_Eet\_Data\_Descriptor\_Class@{\_Eet\_Data\_Descriptor\_Class}}
\doxysubsubsection{\texorpdfstring{version}{version}}
{\footnotesize\ttfamily int \+\_\+\+Eet\+\_\+\+Data\+\_\+\+Descriptor\+\_\+\+Class\+::version}



ABI version. 

Should always be set to \mbox{\hyperlink{group__Eet__Data__Group_ga61a090586eff90415b429f1017acf8a7}{EET\+\_\+\+DATA\+\_\+\+DESCRIPTOR\+\_\+\+CLASS\+\_\+\+VERSION}} \begin{Desc}
\item[Examples]\par
\mbox{\hyperlink{eet-data-file_descriptor_02_8c-example}{eet-\/data-\/file\+\_\+descriptor\+\_\+02.\+c}}.\end{Desc}


Referenced by \mbox{\hyperlink{group__Eet__Data__Group_ga3e5530ce47cc9562b9f86e2e89ff503a}{eet\+\_\+data\+\_\+descriptor\+\_\+new()}}, \mbox{\hyperlink{group__Eet__Data__Group_ga61af07cced82f787f3c52d52834491c3}{eet\+\_\+eina\+\_\+file\+\_\+data\+\_\+descriptor\+\_\+class\+\_\+set()}}, and \mbox{\hyperlink{group__Eet__Data__Group_gac1fe86198291a7acb6642053301f317f}{eet\+\_\+eina\+\_\+stream\+\_\+data\+\_\+descriptor\+\_\+class\+\_\+set()}}.

\mbox{\Hypertarget{struct__Eet__Data__Descriptor__Class_a4be84e8957fc140f2a8597a34660b6c8}\label{struct__Eet__Data__Descriptor__Class_a4be84e8957fc140f2a8597a34660b6c8}} 
\index{\_Eet\_Data\_Descriptor\_Class@{\_Eet\_Data\_Descriptor\_Class}!list\_next@{list\_next}}
\index{list\_next@{list\_next}!\_Eet\_Data\_Descriptor\_Class@{\_Eet\_Data\_Descriptor\_Class}}
\doxysubsubsection{\texorpdfstring{list\_next}{list\_next}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eet__Data__Group_ga4aef6ac18690983e6d608d0844b43e5d}{Eet\+\_\+\+Descriptor\+\_\+\+List\+\_\+\+Next\+\_\+\+Callback}} \+\_\+\+Eet\+\_\+\+Data\+\_\+\+Descriptor\+\_\+\+Class\+::list\+\_\+next}



how to iterate to the next element of a list. 

Receives and should return the list node. 

Referenced by \mbox{\hyperlink{group__Eet__Data__Group_ga3e5530ce47cc9562b9f86e2e89ff503a}{eet\+\_\+data\+\_\+descriptor\+\_\+new()}}, and \mbox{\hyperlink{group__Eet__Data__Group_gac1fe86198291a7acb6642053301f317f}{eet\+\_\+eina\+\_\+stream\+\_\+data\+\_\+descriptor\+\_\+class\+\_\+set()}}.

