\hypertarget{struct__Eet__Data__Descriptor__Class}{\section{\-\_\-\-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.  


\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{struct__Eet__Data__Descriptor__Class_a4e3696014d6907dadd55840bf6008317}{version}
\begin{DoxyCompactList}\small\item\em A\-B\-I version. \end{DoxyCompactList}\item 
\hypertarget{struct__Eet__Data__Descriptor__Class_a4cfe16ee62c58ab68bb6feb47829749f}{const char $\ast$ \hyperlink{struct__Eet__Data__Descriptor__Class_a4cfe16ee62c58ab68bb6feb47829749f}{name}}\label{struct__Eet__Data__Descriptor__Class_a4cfe16ee62c58ab68bb6feb47829749f}

\begin{DoxyCompactList}\small\item\em Name of the user data type to be serialized. \end{DoxyCompactList}\item 
\hypertarget{struct__Eet__Data__Descriptor__Class_a5e55b214032157b06162b57eaac9fe66}{int \hyperlink{struct__Eet__Data__Descriptor__Class_a5e55b214032157b06162b57eaac9fe66}{size}}\label{struct__Eet__Data__Descriptor__Class_a5e55b214032157b06162b57eaac9fe66}

\begin{DoxyCompactList}\small\item\em Size in bytes of the user data type to be serialized. \end{DoxyCompactList}\item 
\hypertarget{struct__Eet__Data__Descriptor__Class_a399924f7d2b6cdc1c29bd927f1f4a4f6}{\begin{tabbing}
xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill
struct \{\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_a847242dfd9340fe19216c24a4e5ba36e}{\>Eet\_Descriptor\_Mem\_Alloc\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_a847242dfd9340fe19216c24a4e5ba36e}{mem\_alloc}\\
\>\>{\em how to allocate memory (usually malloc()) }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_a3e2d04921950cc8bdd5c44517b4a9b96}{\>Eet\_Descriptor\_Mem\_Free\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_a3e2d04921950cc8bdd5c44517b4a9b96}{mem\_free}\\
\>\>{\em how to free memory (usually free()) }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_a5642e3cffba4782bba5f381e18a53356}{\>Eet\_Descriptor\_Str\_Alloc\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_a5642e3cffba4782bba5f381e18a53356}{str\_alloc}\\
\>\>{\em how to allocate a string }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_a988fde5bbb9dc98a748538931b22a566}{\>Eet\_Descriptor\_Str\_Free\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_a988fde5bbb9dc98a748538931b22a566}{str\_free}\\
\>\>{\em how to free a string }\\
\>Eet\_Descriptor\_List\_Next\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_a4be84e8957fc140f2a8597a34660b6c8}{list\_next}\\
\>\>{\em how to iterate to the next element of a list. }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_a8045ac68cd6007be0cfc7ad698aa5723}{\>Eet\_Descriptor\_List\_Append\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_a8045ac68cd6007be0cfc7ad698aa5723}{list\_append}\\
\>\>{\em how to append data {\ttfamily d} to list which head node is {\ttfamily l} }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_ab7019a85d63f3edfa40ae94a549150e2}{\>Eet\_Descriptor\_List\_Data\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_ab7019a85d63f3edfa40ae94a549150e2}{list\_data}\\
\>\>{\em retrieves the data from node {\ttfamily l} }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_a55fd4e50a2897767ab3228f9736820df}{\>Eet\_Descriptor\_List\_Free\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_a55fd4e50a2897767ab3228f9736820df}{list\_free}\\
\>\>{\em free all the nodes from the list which head node is {\ttfamily l} }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_abf243b76b96a607d529a8859801f8381}{\>Eet\_Descriptor\_Hash\_Foreach\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_abf243b76b96a607d529a8859801f8381}{hash\_foreach}\\
\>\>{\em iterates over all elements in the hash {\ttfamily h} in no specific order }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_a4aa53189a11403c6960be06c64db38cd}{\>Eet\_Descriptor\_Hash\_Add\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_a4aa53189a11403c6960be06c64db38cd}{hash\_add}\\
\>\>{\em add a new data {\ttfamily d} with key {\ttfamily k} in hash {\ttfamily h} }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_a03fb64410b495a523cf65f3f08f76444}{\>Eet\_Descriptor\_Hash\_Free\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_a03fb64410b495a523cf65f3f08f76444}{hash\_free}\\
\>\>{\em free all entries from the hash {\ttfamily h} }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_acb219dc91711c063f511f65de5a07d96}{\>Eet\_Descriptor\_Str\_Direct\_Alloc\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_acb219dc91711c063f511f65de5a07d96}{str\_direct\_alloc}\\
\>\>{\em how to allocate a string directly from file backed/mmaped region pointed by {\ttfamily str} }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_ac011ee536fc332da54a5ba243b9af692}{\>Eet\_Descriptor\_Str\_Direct\_Free\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_ac011ee536fc332da54a5ba243b9af692}{str\_direct\_free}\\
\>\>{\em how to free a string returned by str\_direct\_alloc }\\
\>Eet\_Descriptor\_Type\_Get\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_af71fcc4124973c0da6aa0e84dce426cb}{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. }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_a1b6477a2a52b797a662c3fff9793f97e}{\>Eet\_Descriptor\_Type\_Set\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_a1b6477a2a52b797a662c3fff9793f97e}{type\_set}\\
\>\>{\em called when loading a mapped type with the given {\ttfamily type} used to describe the type in the descriptor }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_a4e2b47d408bc6adb6ec071c477b577a1}{\>Eet\_Descriptor\_Array\_Alloc\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_a4e2b47d408bc6adb6ec071c477b577a1}{array\_alloc}\\
\>\>{\em how to allocate memory for array (usually malloc()) }\\
\hypertarget{struct__Eet__Data__Descriptor__Class_1_1@104_a85f61e0051e53158e9fb0f7646a91c3b}{\>Eet\_Descriptor\_Array\_Free\_Callback \hyperlink{struct__Eet__Data__Descriptor__Class_a85f61e0051e53158e9fb0f7646a91c3b}{array\_free}\\
\>\>{\em how to free memory for array (usually free()) }\\
\} {\bfseries func}}\label{struct__Eet__Data__Descriptor__Class_a399924f7d2b6cdc1c29bd927f1f4a4f6}
\\

\end{tabbing}\end{DoxyCompactItemize}


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

The list and hash methods match the Eina A\-P\-I, 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 \hyperlink{group__Eet__Data__Group_ga941b1fcd6c6c72221d9390f9a0ed751c}{E\-E\-T\-\_\-\-E\-I\-N\-A\-\_\-\-S\-T\-R\-E\-A\-M\-\_\-\-D\-A\-T\-A\-\_\-\-D\-E\-S\-C\-R\-I\-P\-T\-O\-R\-\_\-\-C\-L\-A\-S\-S\-\_\-\-S\-E\-T()} and \hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{E\-E\-T\-\_\-\-E\-I\-N\-A\-\_\-\-F\-I\-L\-E\-\_\-\-D\-A\-T\-A\-\_\-\-D\-E\-S\-C\-R\-I\-P\-T\-O\-R\-\_\-\-C\-L\-A\-S\-S\-\_\-\-S\-E\-T()} will set up everything accordingly. \begin{Desc}
\item[Examples\-: ]\par
\hyperlink{eet-data-file_descriptor_01_8c-example}{eet-\/data-\/file\-\_\-descriptor\-\_\-01.\-c}, \hyperlink{eet-data-file_descriptor_02_8c-example}{eet-\/data-\/file\-\_\-descriptor\-\_\-02.\-c}, \hyperlink{eet-data-nested_8c-example}{eet-\/data-\/nested.\-c}, and \hyperlink{eet-data-simple_8c-example}{eet-\/data-\/simple.\-c}.\end{Desc}


\subsection{Field Documentation}
\hypertarget{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}}
\subsubsection[{version}]{\setlength{\rightskip}{0pt plus 5cm}int \-\_\-\-Eet\-\_\-\-Data\-\_\-\-Descriptor\-\_\-\-Class\-::version}}\label{struct__Eet__Data__Descriptor__Class_a4e3696014d6907dadd55840bf6008317}


A\-B\-I version. 

Should always be set to \hyperlink{group__Eet__Data__Group_ga61a090586eff90415b429f1017acf8a7}{E\-E\-T\-\_\-\-D\-A\-T\-A\-\_\-\-D\-E\-S\-C\-R\-I\-P\-T\-O\-R\-\_\-\-C\-L\-A\-S\-S\-\_\-\-V\-E\-R\-S\-I\-O\-N} \begin{Desc}
\item[Examples\-: ]\par
\hyperlink{eet-data-file_descriptor_02_8c-example}{eet-\/data-\/file\-\_\-descriptor\-\_\-02.\-c}.\end{Desc}


Referenced by eet\-\_\-data\-\_\-descriptor\-\_\-new(), eet\-\_\-eina\-\_\-file\-\_\-data\-\_\-descriptor\-\_\-class\-\_\-set(), and eet\-\_\-eina\-\_\-stream\-\_\-data\-\_\-descriptor\-\_\-class\-\_\-set().

\hypertarget{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}}
\subsubsection[{list\-\_\-next}]{\setlength{\rightskip}{0pt plus 5cm}Eet\-\_\-\-Descriptor\-\_\-\-List\-\_\-\-Next\-\_\-\-Callback \-\_\-\-Eet\-\_\-\-Data\-\_\-\-Descriptor\-\_\-\-Class\-::list\-\_\-next}}\label{struct__Eet__Data__Descriptor__Class_a4be84e8957fc140f2a8597a34660b6c8}


how to iterate to the next element of a list. 

Receives and should return the list node. 

Referenced by eet\-\_\-data\-\_\-descriptor\-\_\-new(), and eet\-\_\-eina\-\_\-stream\-\_\-data\-\_\-descriptor\-\_\-class\-\_\-set().

\hypertarget{struct__Eet__Data__Descriptor__Class_af71fcc4124973c0da6aa0e84dce426cb}{\index{\-\_\-\-Eet\-\_\-\-Data\-\_\-\-Descriptor\-\_\-\-Class@{\-\_\-\-Eet\-\_\-\-Data\-\_\-\-Descriptor\-\_\-\-Class}!type\-\_\-get@{type\-\_\-get}}
\index{type\-\_\-get@{type\-\_\-get}!_Eet_Data_Descriptor_Class@{\-\_\-\-Eet\-\_\-\-Data\-\_\-\-Descriptor\-\_\-\-Class}}
\subsubsection[{type\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}Eet\-\_\-\-Descriptor\-\_\-\-Type\-\_\-\-Get\-\_\-\-Callback \-\_\-\-Eet\-\_\-\-Data\-\_\-\-Descriptor\-\_\-\-Class\-::type\-\_\-get}}\label{struct__Eet__Data__Descriptor__Class_af71fcc4124973c0da6aa0e84dce426cb}


get the type, as used in the union or variant mapping, that should be used to store the given data into the eet file. 

\begin{Desc}
\item[Examples\-: ]\par
\hyperlink{eet-data-file_descriptor_02_8c-example}{eet-\/data-\/file\-\_\-descriptor\-\_\-02.\-c}.\end{Desc}
