This is an example much like the one shown in \mbox{\hyperlink{eet_data_file_descriptor}{Advanced use of Eet Data Descriptors}}.

The difference is that here we\textquotesingle{}re attaining ourselves to two new data types to store in an Eet file -- {\bfseries{unions}} and {\bfseries{variants}}. We don\textquotesingle{}t try to come with data mapping to real world use cases, here. Instead, we\textquotesingle{}re defining 3 different simple structures to be used throughout the example\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Struct1      Example\_Struct1;}
\DoxyCodeLine{\textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Struct2      Example\_Struct2;}
\DoxyCodeLine{\textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Struct3      Example\_Struct3;}
\DoxyCodeLine{\textcolor{keyword}{struct }\_Example\_Struct1}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{double}      val1;}
\DoxyCodeLine{   \textcolor{keywordtype}{int}         stuff;}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *s1;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct }\_Example\_Struct2}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}          b1;}
\DoxyCodeLine{   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \textcolor{keywordtype}{long} v1;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct }\_Example\_Struct3}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{int} body;}
\DoxyCodeLine{\};}

\end{DoxyCodeInclude}
 To identify, for both union and variant data cases, the type of each chunk of data, we\textquotesingle{}re defining types to point to each of those structs\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef} \textcolor{keyword}{enum} \_Example\_Data\_Type      Example\_Data\_Type;}
\DoxyCodeLine{\textcolor{keyword}{enum} \_Example\_Data\_Type}
\DoxyCodeLine{\{}
\DoxyCodeLine{   EET\_UNKNOWN = 0,}
\DoxyCodeLine{   EET\_STRUCT1,}
\DoxyCodeLine{   EET\_STRUCT2,}
\DoxyCodeLine{   EET\_STRUCT3,}
\DoxyCodeLine{   EET\_BASIC\_FLOAT,}
\DoxyCodeLine{   EET\_BASIC\_STRING}
\DoxyCodeLine{\};}

\end{DoxyCodeInclude}
 We have also a mapping from those types to name strings, to be used in the Eet unions and variants {\ttfamily type\+\_\+get()} and {\ttfamily type\+\_\+set()} type identifying callbacks\+: 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{struct}}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Example\_Data\_Type u;}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char}       *name;}
\DoxyCodeLine{\} eet\_mapping[] = \{}
\DoxyCodeLine{   \{ EET\_STRUCT1, \textcolor{stringliteral}{"{}ST1"{}} \},}
\DoxyCodeLine{   \{ EET\_STRUCT2, \textcolor{stringliteral}{"{}ST2"{}} \},}
\DoxyCodeLine{   \{ EET\_STRUCT3, \textcolor{stringliteral}{"{}ST3"{}} \},}
\DoxyCodeLine{   \{ EET\_BASIC\_FLOAT, \textcolor{stringliteral}{"{}float"{}} \},}
\DoxyCodeLine{   \{ EET\_BASIC\_STRING, \textcolor{stringliteral}{"{}string"{}} \},}
\DoxyCodeLine{   \{ EET\_UNKNOWN, NULL \}}
\DoxyCodeLine{\};}

\end{DoxyCodeInclude}
 In this example, we have no fancy hash to store our data into profiles/accounts, but just two lists for union and variant data nodes\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Lists        Example\_Lists;}
\DoxyCodeLine{\textcolor{keyword}{struct }\_Example\_Lists}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *union\_list;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *variant\_list;}
\DoxyCodeLine{\};}

\end{DoxyCodeInclude}
 Let\textquotesingle{}s begin with our unions, then, which look like\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Union        Example\_Union;}
\DoxyCodeLine{\textcolor{keyword}{struct }\_Example\_Union}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Example\_Data\_Type type;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keyword}{union }\{}
\DoxyCodeLine{      Example\_Struct1 st1;}
\DoxyCodeLine{      Example\_Struct2 st2;}
\DoxyCodeLine{      Example\_Struct3 st3;}
\DoxyCodeLine{      \textcolor{keywordtype}{float} f;}
\DoxyCodeLine{      \textcolor{keyword}{const} \textcolor{keywordtype}{char}* string;}
\DoxyCodeLine{   \} u;}
\DoxyCodeLine{\};}

\end{DoxyCodeInclude}
 The first interesting part of the code is where we define our data descriptors for the main lists, the unions and all of structures upon which those two depend.  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{/* declaring types */}}
\DoxyCodeLine{\_data\_descriptors\_init(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eet__Data__Descriptor__Class}{Eet\_Data\_Descriptor\_Class}} eddc;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\_EINA\_FILE\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc, Example\_Lists);}
\DoxyCodeLine{   \_lists\_descriptor = \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{}
\DoxyCodeLine{   \_struct\_1\_descriptor = \_st1\_dd();}
\DoxyCodeLine{   \_struct\_2\_descriptor = \_st2\_dd();}
\DoxyCodeLine{   \_struct\_3\_descriptor = \_st3\_dd();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* for union */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\_EINA\_FILE\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc, Example\_Union);}
\DoxyCodeLine{   \_union\_descriptor = \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{}
\DoxyCodeLine{   eddc.\mbox{\hyperlink{struct__Eet__Data__Descriptor__Class_a4e3696014d6907dadd55840bf6008317}{version}} = \mbox{\hyperlink{group__Eet__Data__Group_ga61a090586eff90415b429f1017acf8a7}{EET\_DATA\_DESCRIPTOR\_CLASS\_VERSION}};}
\DoxyCodeLine{   eddc.func.\mbox{\hyperlink{struct__Eet__Data__Descriptor__Class_af71fcc4124973c0da6aa0e84dce426cb}{type\_get}} = \_union\_type\_get;}
\DoxyCodeLine{   eddc.func.\mbox{\hyperlink{struct__Eet__Data__Descriptor__Class_a1b6477a2a52b797a662c3fff9793f97e}{type\_set}} = \_union\_type\_set;}
\DoxyCodeLine{   \_union\_unified\_descriptor = \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eet__Data__Group_gad0daa543d93a64add80961ae5387d45a}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING}}(}
\DoxyCodeLine{     \_union\_unified\_descriptor, \textcolor{stringliteral}{"{}ST1"{}}, \_struct\_1\_descriptor);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eet__Data__Group_gad0daa543d93a64add80961ae5387d45a}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING}}(}
\DoxyCodeLine{     \_union\_unified\_descriptor, \textcolor{stringliteral}{"{}ST2"{}}, \_struct\_2\_descriptor);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eet__Data__Group_gad0daa543d93a64add80961ae5387d45a}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING}}(}
\DoxyCodeLine{     \_union\_unified\_descriptor, \textcolor{stringliteral}{"{}ST3"{}}, \_struct\_3\_descriptor);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eet__Data__Group_gaaf153807a88cd2c3483c5c34bb920a95}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING\_BASIC}}(}
\DoxyCodeLine{     \_union\_unified\_descriptor, \textcolor{stringliteral}{"{}float"{}}, \mbox{\hyperlink{group__Eet__Data__Group_ga447b1b41e09b24ac6b3fbbac8d3efb30}{EET\_T\_FLOAT}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eet__Data__Group_gaaf153807a88cd2c3483c5c34bb920a95}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING\_BASIC}}(}
\DoxyCodeLine{     \_union\_unified\_descriptor, \textcolor{stringliteral}{"{}string"{}}, \mbox{\hyperlink{group__Eet__Data__Group_ga0d2cf409bf3f151156d74d18ac59e3d1}{EET\_T\_STRING}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eet__Data__Group_ga07b711dca3d4bcaa0ccb8ced48341b90}{EET\_DATA\_DESCRIPTOR\_ADD\_UNION}}(}
\DoxyCodeLine{     \_union\_descriptor, Example\_Union, \textcolor{stringliteral}{"{}u"{}}, u, type,}
\DoxyCodeLine{     \_union\_unified\_descriptor);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eet__Data__Group_gabb4c7833ba053f2322e6b667a9ec7f04}{EET\_DATA\_DESCRIPTOR\_ADD\_LIST}}(}
\DoxyCodeLine{     \_lists\_descriptor, Example\_Lists, \textcolor{stringliteral}{"{}union\_list"{}}, union\_list,}
\DoxyCodeLine{     \_union\_descriptor);}

\end{DoxyCodeInclude}
The code for descriptors on {\ttfamily Example\+\_\+\+Struct1}, {\ttfamily Example\+\_\+\+Struct2} and {\ttfamily Example\+\_\+\+Struct3} is straightforward, a matter already covered on \mbox{\hyperlink{eet_data_file_descriptor}{Advanced use of Eet Data Descriptors}}. What is new, here, are the two type matching functions for our unions. There, we must set the {\ttfamily data} pointer to its matching type, on {\ttfamily \+\_\+union\+\_\+type\+\_\+set} and return the correct matching type, on {\ttfamily \+\_\+union\+\_\+type\+\_\+get\+:}  
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
 With the \mbox{\hyperlink{group__Eet__Data__Group_gad0daa543d93a64add80961ae5387d45a}{EET\+\_\+\+DATA\+\_\+\+DESCRIPTOR\+\_\+\+ADD\+\_\+\+MAPPING}} calls, which follow, we make the the link between our type names and their respective structs. The code handling actual data is pretty much the same as in \mbox{\hyperlink{eet_data_file_descriptor}{Advanced use of Eet Data Descriptors}} -- one uses command line arguments to enter new data chunks (or just to visualize the contents of an Eet file), signalling if they are unions or variants. One must also pass the type of the data chuck to enter, with integers 1, 2 or
\begin{DoxyEnumerate}
\item Then, come the fields for each type\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{                \textcolor{stringliteral}{"{}Usage:\(\backslash\)n\(\backslash\)t\%s <input> <output> [action action-\/params]\(\backslash\)n\(\backslash\)n"{}}}
\DoxyCodeLine{                \textcolor{stringliteral}{"{}where actions and their parameters are:\(\backslash\)n"{}}}
\DoxyCodeLine{                \textcolor{stringliteral}{"{}\(\backslash\)tunion <type> [fields]\(\backslash\)n"{}}}
\DoxyCodeLine{                \textcolor{stringliteral}{"{}\(\backslash\)tvariant <type> [fields]\(\backslash\)n"{}}}
\DoxyCodeLine{                \textcolor{stringliteral}{"{}\(\backslash\)n"{}},}
\DoxyCodeLine{                argv[0]);}

\end{DoxyCodeInclude}
 Variants are very similar to unions, except that data chunks need {\bfseries{not}} contain previously allocated space for each of the possible types of data going in them\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Variant\_Type Example\_Variant\_Type;}
\DoxyCodeLine{\textcolor{keyword}{struct }\_Example\_Variant\_Type}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *type;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}   unknow : 1;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct }\_Example\_Variant}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Example\_Variant\_Type t;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordtype}{void}                *data; \textcolor{comment}{/* differently than the union type, we}}
\DoxyCodeLine{\textcolor{comment}{                               * don't need to pre-\/allocate the memory}}
\DoxyCodeLine{\textcolor{comment}{                               * for the field*/}}
\DoxyCodeLine{\};}

\end{DoxyCodeInclude}
 The code declaring the data descriptors and handling the data is very similar to the unions part, and is left for the reader to check for him/herself. The complete code of the example follows.
\end{DoxyEnumerate}


\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{1 \textcolor{comment}{//Compile with:}}
\DoxyCodeLine{2 \textcolor{comment}{// gcc -\/o eet-\/data-\/file\_descriptor\_02 eet-\/data-\/file\_descriptor\_02.c `pkg-\/config -\/-\/cflags -\/-\/libs eet eina`}}
\DoxyCodeLine{3 }
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{Eina_8h}{Eina.h}}>}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{Eet_8h}{Eet.h}}>}}
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <limits.h>}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <sys/stat.h>}}
\DoxyCodeLine{10 \textcolor{preprocessor}{\#include <unistd.h>}}
\DoxyCodeLine{11 }
\DoxyCodeLine{12 \textcolor{keyword}{typedef} \textcolor{keyword}{enum} \_Example\_Data\_Type      Example\_Data\_Type;}
\DoxyCodeLine{13 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Variant\_Type Example\_Variant\_Type;}
\DoxyCodeLine{14 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Variant      Example\_Variant;}
\DoxyCodeLine{15 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Union        Example\_Union;}
\DoxyCodeLine{16 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Struct1      Example\_Struct1;}
\DoxyCodeLine{17 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Struct2      Example\_Struct2;}
\DoxyCodeLine{18 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Struct3      Example\_Struct3;}
\DoxyCodeLine{19 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Example\_Lists        Example\_Lists;}
\DoxyCodeLine{20 }
\DoxyCodeLine{21 \textcolor{keyword}{enum} \_Example\_Data\_Type}
\DoxyCodeLine{22 \{}
\DoxyCodeLine{23    EET\_UNKNOWN = 0,}
\DoxyCodeLine{24    EET\_STRUCT1,}
\DoxyCodeLine{25    EET\_STRUCT2,}
\DoxyCodeLine{26    EET\_STRUCT3,}
\DoxyCodeLine{27    EET\_BASIC\_FLOAT,}
\DoxyCodeLine{28    EET\_BASIC\_STRING}
\DoxyCodeLine{29 \};}
\DoxyCodeLine{30 }
\DoxyCodeLine{31 \textcolor{keyword}{struct}}
\DoxyCodeLine{32 \{}
\DoxyCodeLine{33    Example\_Data\_Type u;}
\DoxyCodeLine{34    \textcolor{keyword}{const} \textcolor{keywordtype}{char}       *name;}
\DoxyCodeLine{35 \} eet\_mapping[] = \{}
\DoxyCodeLine{36    \{ EET\_STRUCT1, \textcolor{stringliteral}{"{}ST1"{}} \},}
\DoxyCodeLine{37    \{ EET\_STRUCT2, \textcolor{stringliteral}{"{}ST2"{}} \},}
\DoxyCodeLine{38    \{ EET\_STRUCT3, \textcolor{stringliteral}{"{}ST3"{}} \},}
\DoxyCodeLine{39    \{ EET\_BASIC\_FLOAT, \textcolor{stringliteral}{"{}float"{}} \},}
\DoxyCodeLine{40    \{ EET\_BASIC\_STRING, \textcolor{stringliteral}{"{}string"{}} \},}
\DoxyCodeLine{41    \{ EET\_UNKNOWN, NULL \}}
\DoxyCodeLine{42 \};}
\DoxyCodeLine{43 }
\DoxyCodeLine{44 \textcolor{keyword}{struct }\_Example\_Struct1}
\DoxyCodeLine{45 \{}
\DoxyCodeLine{46    \textcolor{keywordtype}{double}      val1;}
\DoxyCodeLine{47    \textcolor{keywordtype}{int}         stuff;}
\DoxyCodeLine{48    \textcolor{keyword}{const} \textcolor{keywordtype}{char} *s1;}
\DoxyCodeLine{49 \};}
\DoxyCodeLine{50 }
\DoxyCodeLine{51 \textcolor{keyword}{struct }\_Example\_Struct2}
\DoxyCodeLine{52 \{}
\DoxyCodeLine{53    \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}          b1;}
\DoxyCodeLine{54    \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \textcolor{keywordtype}{long} v1;}
\DoxyCodeLine{55 \};}
\DoxyCodeLine{56 }
\DoxyCodeLine{57 \textcolor{keyword}{struct }\_Example\_Struct3}
\DoxyCodeLine{58 \{}
\DoxyCodeLine{59    \textcolor{keywordtype}{int} body;}
\DoxyCodeLine{60 \};}
\DoxyCodeLine{61 }
\DoxyCodeLine{62 \textcolor{keyword}{struct }\_Example\_Union}
\DoxyCodeLine{63 \{}
\DoxyCodeLine{64    Example\_Data\_Type type;}
\DoxyCodeLine{65 }
\DoxyCodeLine{66    \textcolor{keyword}{union }\{}
\DoxyCodeLine{67       Example\_Struct1 st1;}
\DoxyCodeLine{68       Example\_Struct2 st2;}
\DoxyCodeLine{69       Example\_Struct3 st3;}
\DoxyCodeLine{70       \textcolor{keywordtype}{float} f;}
\DoxyCodeLine{71       \textcolor{keyword}{const} \textcolor{keywordtype}{char}* string;}
\DoxyCodeLine{72    \} u;}
\DoxyCodeLine{73 \};}
\DoxyCodeLine{74 }
\DoxyCodeLine{75 \textcolor{keyword}{struct }\_Example\_Variant\_Type}
\DoxyCodeLine{76 \{}
\DoxyCodeLine{77    \textcolor{keyword}{const} \textcolor{keywordtype}{char} *type;}
\DoxyCodeLine{78    \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}   unknow : 1;}
\DoxyCodeLine{79 \};}
\DoxyCodeLine{80 }
\DoxyCodeLine{81 \textcolor{keyword}{struct }\_Example\_Variant}
\DoxyCodeLine{82 \{}
\DoxyCodeLine{83    Example\_Variant\_Type t;}
\DoxyCodeLine{84 }
\DoxyCodeLine{85    \textcolor{keywordtype}{void}                *data; \textcolor{comment}{/* differently than the union type, we}}
\DoxyCodeLine{86 \textcolor{comment}{                               * don't need to pre-\/allocate the memory}}
\DoxyCodeLine{87 \textcolor{comment}{                               * for the field*/}}
\DoxyCodeLine{88 \};}
\DoxyCodeLine{89 }
\DoxyCodeLine{90 \textcolor{keyword}{struct }\_Example\_Lists}
\DoxyCodeLine{91 \{}
\DoxyCodeLine{92    \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *union\_list;}
\DoxyCodeLine{93    \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *variant\_list;}
\DoxyCodeLine{94 \};}
\DoxyCodeLine{95 }
\DoxyCodeLine{96 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{97 \_st1\_set(Example\_Struct1 *st1,}
\DoxyCodeLine{98          \textcolor{keywordtype}{double}           v1,}
\DoxyCodeLine{99          \textcolor{keywordtype}{int}              v2,}
\DoxyCodeLine{100          \textcolor{keyword}{const} \textcolor{keywordtype}{char}      *v3)}
\DoxyCodeLine{101 \{}
\DoxyCodeLine{102    st1-\/>val1 = v1;}
\DoxyCodeLine{103    st1-\/>stuff = v2;}
\DoxyCodeLine{104    st1-\/>s1 = v3;}
\DoxyCodeLine{105 \} \textcolor{comment}{/* \_st1\_set */}}
\DoxyCodeLine{106 }
\DoxyCodeLine{107 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{108 \_st2\_set(Example\_Struct2   *st2,}
\DoxyCodeLine{109          \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}          v1,}
\DoxyCodeLine{110          \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \textcolor{keywordtype}{long} v2)}
\DoxyCodeLine{111 \{}
\DoxyCodeLine{112    st2-\/>b1 = v1;}
\DoxyCodeLine{113    st2-\/>v1 = v2;}
\DoxyCodeLine{114 \} \textcolor{comment}{/* \_st2\_set */}}
\DoxyCodeLine{115 }
\DoxyCodeLine{116 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{117 \_st3\_set(Example\_Struct3 *st3,}
\DoxyCodeLine{118          \textcolor{keywordtype}{int}              v1)}
\DoxyCodeLine{119 \{}
\DoxyCodeLine{120    st3-\/>body = v1;}
\DoxyCodeLine{121 \} \textcolor{comment}{/* \_st3\_set */}}
\DoxyCodeLine{122 }
\DoxyCodeLine{123 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{124 \textcolor{comment}{/* union}}
\DoxyCodeLine{125 \textcolor{comment}{   type\_get() */}}
\DoxyCodeLine{126 \_union\_type\_get(\textcolor{keyword}{const} \textcolor{keywordtype}{void} *data,}
\DoxyCodeLine{127                 \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}  *unknow)}
\DoxyCodeLine{128 \{}
\DoxyCodeLine{129    \textcolor{keyword}{const} Example\_Data\_Type *u = data;}
\DoxyCodeLine{130    \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{131 }
\DoxyCodeLine{132    \textcolor{keywordflow}{if} (unknow)}
\DoxyCodeLine{133      *unknow = \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{134 }
\DoxyCodeLine{135    \textcolor{keywordflow}{for} (i = 0; eet\_mapping[i].name != NULL; ++i)}
\DoxyCodeLine{136      \textcolor{keywordflow}{if} (*u == eet\_mapping[i].u)}
\DoxyCodeLine{137        \textcolor{keywordflow}{return} eet\_mapping[i].name;}
\DoxyCodeLine{138 }
\DoxyCodeLine{139    \textcolor{keywordflow}{if} (unknow)}
\DoxyCodeLine{140      *unknow = \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{141 }
\DoxyCodeLine{142    \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{143 \} \textcolor{comment}{/* \_union\_type\_get */}}
\DoxyCodeLine{144 }
\DoxyCodeLine{145 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{146 \_union\_type\_set(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *type,}
\DoxyCodeLine{147                 \textcolor{keywordtype}{void}       *data,}
\DoxyCodeLine{148                 \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}   unknow)}
\DoxyCodeLine{149 \{}
\DoxyCodeLine{150    Example\_Data\_Type *u = data;}
\DoxyCodeLine{151    \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{152 }
\DoxyCodeLine{153    \textcolor{keywordflow}{if} (unknow)}
\DoxyCodeLine{154      \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{155 }
\DoxyCodeLine{156    \textcolor{keywordflow}{for} (i = 0; eet\_mapping[i].name != NULL; ++i)}
\DoxyCodeLine{157      \textcolor{keywordflow}{if} (strcmp(eet\_mapping[i].name, type) == 0)}
\DoxyCodeLine{158        \{}
\DoxyCodeLine{159           *u = eet\_mapping[i].u;}
\DoxyCodeLine{160           \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{161        \}}
\DoxyCodeLine{162 }
\DoxyCodeLine{163    \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{164 \} \textcolor{comment}{/* \_union\_type\_set */}}
\DoxyCodeLine{165 }
\DoxyCodeLine{166 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{167 \_variant\_type\_get(\textcolor{keyword}{const} \textcolor{keywordtype}{void} *data,}
\DoxyCodeLine{168                   \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}  *unknow)}
\DoxyCodeLine{169 \{}
\DoxyCodeLine{170    \textcolor{keyword}{const} Example\_Variant\_Type *type = data;}
\DoxyCodeLine{171    \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{172 }
\DoxyCodeLine{173    \textcolor{keywordflow}{if} (unknow)}
\DoxyCodeLine{174      *unknow = type-\/>unknow;}
\DoxyCodeLine{175 }
\DoxyCodeLine{176    \textcolor{keywordflow}{for} (i = 0; eet\_mapping[i].name != NULL; ++i)}
\DoxyCodeLine{177      \textcolor{keywordflow}{if} (strcmp(type-\/>type, eet\_mapping[i].name) == 0)}
\DoxyCodeLine{178        \textcolor{keywordflow}{return} eet\_mapping[i].name;}
\DoxyCodeLine{179 }
\DoxyCodeLine{180    \textcolor{keywordflow}{if} (unknow)}
\DoxyCodeLine{181      *unknow = \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{182 }
\DoxyCodeLine{183    \textcolor{keywordflow}{return} type-\/>type;}
\DoxyCodeLine{184 \} \textcolor{comment}{/* \_variant\_type\_get */}}
\DoxyCodeLine{185 }
\DoxyCodeLine{186 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{187 \_variant\_type\_set(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *type,}
\DoxyCodeLine{188                   \textcolor{keywordtype}{void}       *data,}
\DoxyCodeLine{189                   \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}   unknow)}
\DoxyCodeLine{190 \{}
\DoxyCodeLine{191    Example\_Variant\_Type *vt = data;}
\DoxyCodeLine{192 }
\DoxyCodeLine{193    vt-\/>type = type;}
\DoxyCodeLine{194    vt-\/>unknow = unknow;}
\DoxyCodeLine{195    \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{196 \} \textcolor{comment}{/* \_variant\_type\_set */}}
\DoxyCodeLine{197 }
\DoxyCodeLine{198 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *}
\DoxyCodeLine{199 \_st1\_dd(\textcolor{keywordtype}{void})}
\DoxyCodeLine{200 \{}
\DoxyCodeLine{201    \mbox{\hyperlink{struct__Eet__Data__Descriptor__Class}{Eet\_Data\_Descriptor\_Class}} eddc;}
\DoxyCodeLine{202    \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *res;}
\DoxyCodeLine{203 }
\DoxyCodeLine{204    \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\_EINA\_FILE\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc, Example\_Struct1);}
\DoxyCodeLine{205    res = \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{206    \mbox{\hyperlink{group__Eet__Data__Group_gac38ce778d7eba37cfca8a19efb7a9b3a}{EET\_DATA\_DESCRIPTOR\_ADD\_BASIC}}(}
\DoxyCodeLine{207      res, Example\_Struct1, \textcolor{stringliteral}{"{}val1"{}}, val1, \mbox{\hyperlink{group__Eet__Data__Group_gac2d8336b1127fd382c65416cf45cd3e8}{EET\_T\_DOUBLE}});}
\DoxyCodeLine{208    \mbox{\hyperlink{group__Eet__Data__Group_gac38ce778d7eba37cfca8a19efb7a9b3a}{EET\_DATA\_DESCRIPTOR\_ADD\_BASIC}}(}
\DoxyCodeLine{209      res, Example\_Struct1, \textcolor{stringliteral}{"{}stuff"{}}, stuff, \mbox{\hyperlink{group__Eet__Data__Group_ga4e196733795867f14c6e387af7287baa}{EET\_T\_INT}});}
\DoxyCodeLine{210    \mbox{\hyperlink{group__Eet__Data__Group_gac38ce778d7eba37cfca8a19efb7a9b3a}{EET\_DATA\_DESCRIPTOR\_ADD\_BASIC}}(}
\DoxyCodeLine{211      res, Example\_Struct1, \textcolor{stringliteral}{"{}s1"{}}, s1, \mbox{\hyperlink{group__Eet__Data__Group_ga0d2cf409bf3f151156d74d18ac59e3d1}{EET\_T\_STRING}});}
\DoxyCodeLine{212 }
\DoxyCodeLine{213    \textcolor{keywordflow}{return} res;}
\DoxyCodeLine{214 \} \textcolor{comment}{/* \_st1\_dd */}}
\DoxyCodeLine{215 }
\DoxyCodeLine{216 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *}
\DoxyCodeLine{217 \_st2\_dd(\textcolor{keywordtype}{void})}
\DoxyCodeLine{218 \{}
\DoxyCodeLine{219    \mbox{\hyperlink{struct__Eet__Data__Descriptor__Class}{Eet\_Data\_Descriptor\_Class}} eddc;}
\DoxyCodeLine{220    \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *res;}
\DoxyCodeLine{221 }
\DoxyCodeLine{222    \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\_EINA\_FILE\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc, Example\_Struct2);}
\DoxyCodeLine{223    res = \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{224    \mbox{\hyperlink{group__Eet__Data__Group_gac38ce778d7eba37cfca8a19efb7a9b3a}{EET\_DATA\_DESCRIPTOR\_ADD\_BASIC}}(}
\DoxyCodeLine{225      res, Example\_Struct2, \textcolor{stringliteral}{"{}b1"{}}, b1, \mbox{\hyperlink{group__Eet__Data__Group_ga09a1341cc158fda0ba60ad2386ecd795}{EET\_T\_UCHAR}});}
\DoxyCodeLine{226    \mbox{\hyperlink{group__Eet__Data__Group_gac38ce778d7eba37cfca8a19efb7a9b3a}{EET\_DATA\_DESCRIPTOR\_ADD\_BASIC}}(}
\DoxyCodeLine{227      res, Example\_Struct2, \textcolor{stringliteral}{"{}v1"{}}, v1, \mbox{\hyperlink{group__Eet__Data__Group_gac984c4b3f0ad353a14679cf39a70ebd7}{EET\_T\_ULONG\_LONG}});}
\DoxyCodeLine{228 }
\DoxyCodeLine{229    \textcolor{keywordflow}{return} res;}
\DoxyCodeLine{230 \} \textcolor{comment}{/* \_st2\_dd */}}
\DoxyCodeLine{231 }
\DoxyCodeLine{232 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *}
\DoxyCodeLine{233 \_st3\_dd(\textcolor{keywordtype}{void})}
\DoxyCodeLine{234 \{}
\DoxyCodeLine{235    \mbox{\hyperlink{struct__Eet__Data__Descriptor__Class}{Eet\_Data\_Descriptor\_Class}} eddc;}
\DoxyCodeLine{236    \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *res;}
\DoxyCodeLine{237 }
\DoxyCodeLine{238    \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\_EINA\_FILE\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc, Example\_Struct3);}
\DoxyCodeLine{239    res = \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{240    \mbox{\hyperlink{group__Eet__Data__Group_gac38ce778d7eba37cfca8a19efb7a9b3a}{EET\_DATA\_DESCRIPTOR\_ADD\_BASIC}}(}
\DoxyCodeLine{241      res, Example\_Struct3, \textcolor{stringliteral}{"{}body"{}}, body, \mbox{\hyperlink{group__Eet__Data__Group_ga4e196733795867f14c6e387af7287baa}{EET\_T\_INT}});}
\DoxyCodeLine{242 }
\DoxyCodeLine{243    \textcolor{keywordflow}{return} res;}
\DoxyCodeLine{244 \} \textcolor{comment}{/* \_st3\_dd */}}
\DoxyCodeLine{245 }
\DoxyCodeLine{246 \textcolor{comment}{/* string that represents the entry in the eet file. you might like to}}
\DoxyCodeLine{247 \textcolor{comment}{ * have different profiles or so in the same file, this is possible}}
\DoxyCodeLine{248 \textcolor{comment}{ * with different strings}}
\DoxyCodeLine{249 \textcolor{comment}{ */}}
\DoxyCodeLine{250 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} CACHE\_FILE\_ENTRY[] = \textcolor{stringliteral}{"{}cache"{}};}
\DoxyCodeLine{251 }
\DoxyCodeLine{252 \textcolor{comment}{/* keep the descriptor static global, so it can be shared by different}}
\DoxyCodeLine{253 \textcolor{comment}{ * functions (load/save) of this and only this file.}}
\DoxyCodeLine{254 \textcolor{comment}{ */}}
\DoxyCodeLine{255 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *\_lists\_descriptor;}
\DoxyCodeLine{256 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *\_struct\_1\_descriptor;}
\DoxyCodeLine{257 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *\_struct\_2\_descriptor;}
\DoxyCodeLine{258 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *\_struct\_3\_descriptor;}
\DoxyCodeLine{259 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *\_union\_descriptor;}
\DoxyCodeLine{260 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *\_variant\_descriptor;}
\DoxyCodeLine{261 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *\_union\_unified\_descriptor;}
\DoxyCodeLine{262 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}} *\_variant\_unified\_descriptor;}
\DoxyCodeLine{263 }
\DoxyCodeLine{264 \textcolor{comment}{/* keep file handle alive, so mmap()ed strings are all alive as}}
\DoxyCodeLine{265 \textcolor{comment}{ * well */}}
\DoxyCodeLine{266 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\_File}} *\_cache\_file = NULL;}
\DoxyCodeLine{267 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eet__File__Group_gaf0984c8280699ca5a3c4966f5580324c}{Eet\_Dictionary}} *\_cache\_dict = NULL;}
\DoxyCodeLine{268 }
\DoxyCodeLine{269 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{270 \textcolor{comment}{/* declaring types */}}
\DoxyCodeLine{271 \_data\_descriptors\_init(\textcolor{keywordtype}{void})}
\DoxyCodeLine{272 \{}
\DoxyCodeLine{273    \mbox{\hyperlink{struct__Eet__Data__Descriptor__Class}{Eet\_Data\_Descriptor\_Class}} eddc;}
\DoxyCodeLine{274 }
\DoxyCodeLine{275    \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\_EINA\_FILE\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc, Example\_Lists);}
\DoxyCodeLine{276    \_lists\_descriptor = \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{277 }
\DoxyCodeLine{278    \_struct\_1\_descriptor = \_st1\_dd();}
\DoxyCodeLine{279    \_struct\_2\_descriptor = \_st2\_dd();}
\DoxyCodeLine{280    \_struct\_3\_descriptor = \_st3\_dd();}
\DoxyCodeLine{281 }
\DoxyCodeLine{282    \textcolor{comment}{/* for union */}}
\DoxyCodeLine{283    \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\_EINA\_FILE\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc, Example\_Union);}
\DoxyCodeLine{284    \_union\_descriptor = \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{285 }
\DoxyCodeLine{286    eddc.\mbox{\hyperlink{struct__Eet__Data__Descriptor__Class_a4e3696014d6907dadd55840bf6008317}{version}} = \mbox{\hyperlink{group__Eet__Data__Group_ga61a090586eff90415b429f1017acf8a7}{EET\_DATA\_DESCRIPTOR\_CLASS\_VERSION}};}
\DoxyCodeLine{287    eddc.func.\mbox{\hyperlink{struct__Eet__Data__Descriptor__Class_af71fcc4124973c0da6aa0e84dce426cb}{type\_get}} = \_union\_type\_get;}
\DoxyCodeLine{288    eddc.func.\mbox{\hyperlink{struct__Eet__Data__Descriptor__Class_a1b6477a2a52b797a662c3fff9793f97e}{type\_set}} = \_union\_type\_set;}
\DoxyCodeLine{289    \_union\_unified\_descriptor = \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{290 }
\DoxyCodeLine{291    \mbox{\hyperlink{group__Eet__Data__Group_gad0daa543d93a64add80961ae5387d45a}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING}}(}
\DoxyCodeLine{292      \_union\_unified\_descriptor, \textcolor{stringliteral}{"{}ST1"{}}, \_struct\_1\_descriptor);}
\DoxyCodeLine{293    \mbox{\hyperlink{group__Eet__Data__Group_gad0daa543d93a64add80961ae5387d45a}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING}}(}
\DoxyCodeLine{294      \_union\_unified\_descriptor, \textcolor{stringliteral}{"{}ST2"{}}, \_struct\_2\_descriptor);}
\DoxyCodeLine{295    \mbox{\hyperlink{group__Eet__Data__Group_gad0daa543d93a64add80961ae5387d45a}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING}}(}
\DoxyCodeLine{296      \_union\_unified\_descriptor, \textcolor{stringliteral}{"{}ST3"{}}, \_struct\_3\_descriptor);}
\DoxyCodeLine{297    \mbox{\hyperlink{group__Eet__Data__Group_gaaf153807a88cd2c3483c5c34bb920a95}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING\_BASIC}}(}
\DoxyCodeLine{298      \_union\_unified\_descriptor, \textcolor{stringliteral}{"{}float"{}}, \mbox{\hyperlink{group__Eet__Data__Group_ga447b1b41e09b24ac6b3fbbac8d3efb30}{EET\_T\_FLOAT}});}
\DoxyCodeLine{299    \mbox{\hyperlink{group__Eet__Data__Group_gaaf153807a88cd2c3483c5c34bb920a95}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING\_BASIC}}(}
\DoxyCodeLine{300      \_union\_unified\_descriptor, \textcolor{stringliteral}{"{}string"{}}, \mbox{\hyperlink{group__Eet__Data__Group_ga0d2cf409bf3f151156d74d18ac59e3d1}{EET\_T\_STRING}});}
\DoxyCodeLine{301 }
\DoxyCodeLine{302    \mbox{\hyperlink{group__Eet__Data__Group_ga07b711dca3d4bcaa0ccb8ced48341b90}{EET\_DATA\_DESCRIPTOR\_ADD\_UNION}}(}
\DoxyCodeLine{303      \_union\_descriptor, Example\_Union, \textcolor{stringliteral}{"{}u"{}}, u, type,}
\DoxyCodeLine{304      \_union\_unified\_descriptor);}
\DoxyCodeLine{305 }
\DoxyCodeLine{306    \mbox{\hyperlink{group__Eet__Data__Group_gabb4c7833ba053f2322e6b667a9ec7f04}{EET\_DATA\_DESCRIPTOR\_ADD\_LIST}}(}
\DoxyCodeLine{307      \_lists\_descriptor, Example\_Lists, \textcolor{stringliteral}{"{}union\_list"{}}, union\_list,}
\DoxyCodeLine{308      \_union\_descriptor);}
\DoxyCodeLine{309 }
\DoxyCodeLine{310    \textcolor{comment}{/* for variant */}}
\DoxyCodeLine{311    \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\_EINA\_FILE\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc, Example\_Variant);}
\DoxyCodeLine{312    \_variant\_descriptor = \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{313 }
\DoxyCodeLine{314    eddc.\mbox{\hyperlink{struct__Eet__Data__Descriptor__Class_a4e3696014d6907dadd55840bf6008317}{version}} = \mbox{\hyperlink{group__Eet__Data__Group_ga61a090586eff90415b429f1017acf8a7}{EET\_DATA\_DESCRIPTOR\_CLASS\_VERSION}};}
\DoxyCodeLine{315    eddc.func.\mbox{\hyperlink{struct__Eet__Data__Descriptor__Class_af71fcc4124973c0da6aa0e84dce426cb}{type\_get}} = \_variant\_type\_get;}
\DoxyCodeLine{316    eddc.func.\mbox{\hyperlink{struct__Eet__Data__Descriptor__Class_a1b6477a2a52b797a662c3fff9793f97e}{type\_set}} = \_variant\_type\_set;}
\DoxyCodeLine{317    \_variant\_unified\_descriptor = \mbox{\hyperlink{group__Eet__Data__Group_ga5c2ad8edc9910f201b0dcbdbc5cc2694}{eet\_data\_descriptor\_stream\_new}}(\&eddc);}
\DoxyCodeLine{318 }
\DoxyCodeLine{319    \mbox{\hyperlink{group__Eet__Data__Group_gad0daa543d93a64add80961ae5387d45a}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING}}(}
\DoxyCodeLine{320      \_variant\_unified\_descriptor, \textcolor{stringliteral}{"{}ST1"{}}, \_struct\_1\_descriptor);}
\DoxyCodeLine{321    \mbox{\hyperlink{group__Eet__Data__Group_gad0daa543d93a64add80961ae5387d45a}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING}}(}
\DoxyCodeLine{322      \_variant\_unified\_descriptor, \textcolor{stringliteral}{"{}ST2"{}}, \_struct\_2\_descriptor);}
\DoxyCodeLine{323    \mbox{\hyperlink{group__Eet__Data__Group_gad0daa543d93a64add80961ae5387d45a}{EET\_DATA\_DESCRIPTOR\_ADD\_MAPPING}}(}
\DoxyCodeLine{324      \_variant\_unified\_descriptor, \textcolor{stringliteral}{"{}ST3"{}}, \_struct\_3\_descriptor);}
\DoxyCodeLine{325 }
\DoxyCodeLine{326    \mbox{\hyperlink{group__Eet__Data__Group_ga8851a40b130061262a8dd009f0457a65}{EET\_DATA\_DESCRIPTOR\_ADD\_VARIANT}}(}
\DoxyCodeLine{327      \_variant\_descriptor, Example\_Variant, \textcolor{stringliteral}{"{}data"{}}, data, t,}
\DoxyCodeLine{328      \_variant\_unified\_descriptor);}
\DoxyCodeLine{329 }
\DoxyCodeLine{330    \mbox{\hyperlink{group__Eet__Data__Group_gabb4c7833ba053f2322e6b667a9ec7f04}{EET\_DATA\_DESCRIPTOR\_ADD\_LIST}}(}
\DoxyCodeLine{331      \_lists\_descriptor, Example\_Lists, \textcolor{stringliteral}{"{}variant\_list"{}}, variant\_list,}
\DoxyCodeLine{332      \_variant\_descriptor);}
\DoxyCodeLine{333 \} \textcolor{comment}{/* \_data\_descriptors\_init */}}
\DoxyCodeLine{334 }
\DoxyCodeLine{335 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{336 \_data\_descriptors\_shutdown(\textcolor{keywordtype}{void})}
\DoxyCodeLine{337 \{}
\DoxyCodeLine{338    \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_lists\_descriptor);}
\DoxyCodeLine{339    \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_struct\_1\_descriptor);}
\DoxyCodeLine{340    \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_struct\_2\_descriptor);}
\DoxyCodeLine{341    \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_struct\_3\_descriptor);}
\DoxyCodeLine{342    \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_union\_descriptor);}
\DoxyCodeLine{343    \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_variant\_descriptor);}
\DoxyCodeLine{344    \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_union\_unified\_descriptor);}
\DoxyCodeLine{345    \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_variant\_unified\_descriptor);}
\DoxyCodeLine{346 \} \textcolor{comment}{/* \_data\_descriptors\_shutdown */}}
\DoxyCodeLine{347 }
\DoxyCodeLine{348 \textcolor{comment}{/* need to check if the pointer came from mmap()ed area in}}
\DoxyCodeLine{349 \textcolor{comment}{ * eet\_dictionary or it was allocated with eina\_stringshare\_add()}}
\DoxyCodeLine{350 \textcolor{comment}{ */}}
\DoxyCodeLine{351 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{352 \_string\_free(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *str)}
\DoxyCodeLine{353 \{}
\DoxyCodeLine{354    \textcolor{keywordflow}{if} (!str)}
\DoxyCodeLine{355      \textcolor{keywordflow}{return};}
\DoxyCodeLine{356 }
\DoxyCodeLine{357    \textcolor{keywordflow}{if} ((\_cache\_dict) \&\& (\mbox{\hyperlink{group__Eet__File__Group_ga53290da52edb929b85e51f25e79d27c8}{eet\_dictionary\_string\_check}}(\_cache\_dict, str)))}
\DoxyCodeLine{358      \textcolor{keywordflow}{return};}
\DoxyCodeLine{359 }
\DoxyCodeLine{360    \mbox{\hyperlink{group__Eina__Stringshare__Group_ga5538b4a134987b8a01744fad1a845ba4}{eina\_stringshare\_del}}(str);}
\DoxyCodeLine{361 \} \textcolor{comment}{/* \_string\_free */}}
\DoxyCodeLine{362 }
\DoxyCodeLine{363 \textcolor{keyword}{static} Example\_Union *}
\DoxyCodeLine{364 \_union\_1\_new(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *v1,}
\DoxyCodeLine{365              \textcolor{keyword}{const} \textcolor{keywordtype}{char} *v2,}
\DoxyCodeLine{366              \textcolor{keyword}{const} \textcolor{keywordtype}{char} *v3)}
\DoxyCodeLine{367 \{}
\DoxyCodeLine{368    Example\_Union *un = calloc(1, \textcolor{keyword}{sizeof}(Example\_Union));}
\DoxyCodeLine{369    \textcolor{keywordflow}{if} (!un)}
\DoxyCodeLine{370      \{}
\DoxyCodeLine{371         fprintf(}
\DoxyCodeLine{372           stderr, \textcolor{stringliteral}{"{}ERROR: could not allocate an Example\_Union struct.\(\backslash\)n"{}});}
\DoxyCodeLine{373         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{374      \}}
\DoxyCodeLine{375 }
\DoxyCodeLine{376    un-\/>type = EET\_STRUCT1;}
\DoxyCodeLine{377    \_st1\_set(\&(un-\/>u.st1), atof(v1), atoi(v2), \mbox{\hyperlink{group__Eina__Stringshare__Group_ga4e3ce40744291c1fb8574e26883c0bf2}{eina\_stringshare\_add}}(v3));}
\DoxyCodeLine{378 }
\DoxyCodeLine{379    \textcolor{keywordflow}{return} un;}
\DoxyCodeLine{380 \}}
\DoxyCodeLine{381 }
\DoxyCodeLine{382 \textcolor{keyword}{static} Example\_Union *}
\DoxyCodeLine{383 \_union\_2\_new(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *v1,}
\DoxyCodeLine{384              \textcolor{keyword}{const} \textcolor{keywordtype}{char} *v2)}
\DoxyCodeLine{385 \{}
\DoxyCodeLine{386    Example\_Union *un = calloc(1, \textcolor{keyword}{sizeof}(Example\_Union));}
\DoxyCodeLine{387    \textcolor{keywordflow}{if} (!un)}
\DoxyCodeLine{388      \{}
\DoxyCodeLine{389         fprintf(}
\DoxyCodeLine{390           stderr, \textcolor{stringliteral}{"{}ERROR: could not allocate an Example\_Union struct.\(\backslash\)n"{}});}
\DoxyCodeLine{391         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{392      \}}
\DoxyCodeLine{393 }
\DoxyCodeLine{394    un-\/>type = EET\_STRUCT2;}
\DoxyCodeLine{395    \_st2\_set(\&(un-\/>u.st2), atoi(v1), atoi(v2));}
\DoxyCodeLine{396 }
\DoxyCodeLine{397    \textcolor{keywordflow}{return} un;}
\DoxyCodeLine{398 \}}
\DoxyCodeLine{399 }
\DoxyCodeLine{400 \textcolor{keyword}{static} Example\_Union *}
\DoxyCodeLine{401 \_union\_3\_new(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *v1)}
\DoxyCodeLine{402 \{}
\DoxyCodeLine{403    Example\_Union *un = calloc(1, \textcolor{keyword}{sizeof}(Example\_Union));}
\DoxyCodeLine{404    \textcolor{keywordflow}{if} (!un)}
\DoxyCodeLine{405      \{}
\DoxyCodeLine{406         fprintf(}
\DoxyCodeLine{407           stderr, \textcolor{stringliteral}{"{}ERROR: could not allocate an Example\_Union struct.\(\backslash\)n"{}});}
\DoxyCodeLine{408         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{409      \}}
\DoxyCodeLine{410 }
\DoxyCodeLine{411    un-\/>type = EET\_STRUCT3;}
\DoxyCodeLine{412    \_st3\_set(\&(un-\/>u.st3), atoi(v1));}
\DoxyCodeLine{413 }
\DoxyCodeLine{414    \textcolor{keywordflow}{return} un;}
\DoxyCodeLine{415 \}}
\DoxyCodeLine{416 }
\DoxyCodeLine{417 \textcolor{keyword}{static} Example\_Union *}
\DoxyCodeLine{418 \_union\_float\_new(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *v1)}
\DoxyCodeLine{419 \{}
\DoxyCodeLine{420    Example\_Union *un = calloc(1, \textcolor{keyword}{sizeof}(Example\_Union));}
\DoxyCodeLine{421    \textcolor{keywordflow}{if} (!un)}
\DoxyCodeLine{422      \{}
\DoxyCodeLine{423         fprintf(}
\DoxyCodeLine{424           stderr, \textcolor{stringliteral}{"{}ERROR: could not allocate an Example\_Union struct.\(\backslash\)n"{}});}
\DoxyCodeLine{425         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{426      \}}
\DoxyCodeLine{427 }
\DoxyCodeLine{428    un-\/>type = EET\_BASIC\_FLOAT;}
\DoxyCodeLine{429    un-\/>u.f = atof(v1);}
\DoxyCodeLine{430 }
\DoxyCodeLine{431    \textcolor{keywordflow}{return} un;}
\DoxyCodeLine{432 \}}
\DoxyCodeLine{433 }
\DoxyCodeLine{434 \textcolor{keyword}{static} Example\_Union *}
\DoxyCodeLine{435 \_union\_string\_new(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *v1)}
\DoxyCodeLine{436 \{}
\DoxyCodeLine{437    Example\_Union *un = calloc(1, \textcolor{keyword}{sizeof}(Example\_Union));}
\DoxyCodeLine{438    \textcolor{keywordflow}{if} (!un)}
\DoxyCodeLine{439      \{}
\DoxyCodeLine{440         fprintf(}
\DoxyCodeLine{441           stderr, \textcolor{stringliteral}{"{}ERROR: could not allocate an Example\_Union struct.\(\backslash\)n"{}});}
\DoxyCodeLine{442         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{443      \}}
\DoxyCodeLine{444 }
\DoxyCodeLine{445    un-\/>type = EET\_BASIC\_STRING;}
\DoxyCodeLine{446    un-\/>u.string = v1;}
\DoxyCodeLine{447 }
\DoxyCodeLine{448    \textcolor{keywordflow}{return} un;}
\DoxyCodeLine{449 \}}
\DoxyCodeLine{450 }
\DoxyCodeLine{451 \textcolor{keyword}{static} Example\_Variant *}
\DoxyCodeLine{452 \_variant\_1\_new(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *v1,}
\DoxyCodeLine{453                \textcolor{keyword}{const} \textcolor{keywordtype}{char} *v2,}
\DoxyCodeLine{454                \textcolor{keyword}{const} \textcolor{keywordtype}{char} *v3)}
\DoxyCodeLine{455 \{}
\DoxyCodeLine{456    Example\_Struct1 *st1;}
\DoxyCodeLine{457    Example\_Variant *va = calloc(1, \textcolor{keyword}{sizeof}(Example\_Variant));}
\DoxyCodeLine{458    \textcolor{keywordflow}{if} (!va)}
\DoxyCodeLine{459      \{}
\DoxyCodeLine{460         fprintf(}
\DoxyCodeLine{461           stderr, \textcolor{stringliteral}{"{}ERROR: could not allocate an Example\_Variant struct.\(\backslash\)n"{}});}
\DoxyCodeLine{462         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{463      \}}
\DoxyCodeLine{464 }
\DoxyCodeLine{465    va-\/>t.type = eet\_mapping[0].name;}
\DoxyCodeLine{466    st1 = calloc(1, \textcolor{keyword}{sizeof} (Example\_Struct1));}
\DoxyCodeLine{467    \_st1\_set(st1, atof(v1), atoi(v2), \mbox{\hyperlink{group__Eina__Stringshare__Group_ga4e3ce40744291c1fb8574e26883c0bf2}{eina\_stringshare\_add}}(v3));}
\DoxyCodeLine{468    va-\/>data = st1;}
\DoxyCodeLine{469 }
\DoxyCodeLine{470    \textcolor{keywordflow}{return} va;}
\DoxyCodeLine{471 \}}
\DoxyCodeLine{472 }
\DoxyCodeLine{473 \textcolor{keyword}{static} Example\_Variant *}
\DoxyCodeLine{474 \_variant\_2\_new(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *v1,}
\DoxyCodeLine{475                \textcolor{keyword}{const} \textcolor{keywordtype}{char} *v2)}
\DoxyCodeLine{476 \{}
\DoxyCodeLine{477    printf(\textcolor{stringliteral}{"{}varinant 2 new\(\backslash\)n"{}});}
\DoxyCodeLine{478 }
\DoxyCodeLine{479    Example\_Struct2 *st2;}
\DoxyCodeLine{480    Example\_Variant *va = calloc(1, \textcolor{keyword}{sizeof}(Example\_Variant));}
\DoxyCodeLine{481    \textcolor{keywordflow}{if} (!va)}
\DoxyCodeLine{482      \{}
\DoxyCodeLine{483         fprintf(}
\DoxyCodeLine{484           stderr, \textcolor{stringliteral}{"{}ERROR: could not allocate an Example\_Variant struct.\(\backslash\)n"{}});}
\DoxyCodeLine{485         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{486      \}}
\DoxyCodeLine{487 }
\DoxyCodeLine{488    va-\/>t.type = eet\_mapping[1].name;}
\DoxyCodeLine{489 }
\DoxyCodeLine{490    printf(\textcolor{stringliteral}{"{}type gets \%s\(\backslash\)n"{}}, va-\/>t.type);}
\DoxyCodeLine{491 }
\DoxyCodeLine{492    st2 = calloc(1, \textcolor{keyword}{sizeof} (Example\_Struct2));}
\DoxyCodeLine{493    \_st2\_set(st2, atoi(v1), atoi(v2));}
\DoxyCodeLine{494    va-\/>data = st2;}
\DoxyCodeLine{495 }
\DoxyCodeLine{496    \textcolor{keywordflow}{return} va;}
\DoxyCodeLine{497 \}}
\DoxyCodeLine{498 }
\DoxyCodeLine{499 \textcolor{keyword}{static} Example\_Variant *}
\DoxyCodeLine{500 \_variant\_3\_new(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *v1)}
\DoxyCodeLine{501 \{}
\DoxyCodeLine{502    Example\_Struct3 *st3;}
\DoxyCodeLine{503    Example\_Variant *va = calloc(1, \textcolor{keyword}{sizeof}(Example\_Variant));}
\DoxyCodeLine{504    \textcolor{keywordflow}{if} (!va)}
\DoxyCodeLine{505      \{}
\DoxyCodeLine{506         fprintf(}
\DoxyCodeLine{507           stderr, \textcolor{stringliteral}{"{}ERROR: could not allocate an Example\_Variant struct.\(\backslash\)n"{}});}
\DoxyCodeLine{508         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{509      \}}
\DoxyCodeLine{510 }
\DoxyCodeLine{511    va-\/>t.type = eet\_mapping[2].name;}
\DoxyCodeLine{512    st3 = calloc(1, \textcolor{keyword}{sizeof} (Example\_Struct3));}
\DoxyCodeLine{513    \_st3\_set(st3, atoi(v1));}
\DoxyCodeLine{514    va-\/>data = st3;}
\DoxyCodeLine{515 }
\DoxyCodeLine{516    \textcolor{keywordflow}{return} va;}
\DoxyCodeLine{517 \}}
\DoxyCodeLine{518 }
\DoxyCodeLine{519 \textcolor{keyword}{static} Example\_Lists *}
\DoxyCodeLine{520 \_data\_new(\textcolor{keywordtype}{void})}
\DoxyCodeLine{521 \{}
\DoxyCodeLine{522    Example\_Lists *example\_lists = calloc(1, \textcolor{keyword}{sizeof}(Example\_Lists));}
\DoxyCodeLine{523    \textcolor{keywordflow}{if} (!example\_lists)}
\DoxyCodeLine{524      \{}
\DoxyCodeLine{525         fprintf(stderr, \textcolor{stringliteral}{"{}ERROR: could not allocate a Example\_Lists struct.\(\backslash\)n"{}});}
\DoxyCodeLine{526         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{527      \}}
\DoxyCodeLine{528 }
\DoxyCodeLine{529    \textcolor{keywordflow}{return} example\_lists;}
\DoxyCodeLine{530 \} \textcolor{comment}{/* \_data\_new */}}
\DoxyCodeLine{531 }
\DoxyCodeLine{532 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{533 \_union\_free(Example\_Union *un)}
\DoxyCodeLine{534 \{}
\DoxyCodeLine{535    \textcolor{keywordflow}{if} (un-\/>type == EET\_STRUCT1)}
\DoxyCodeLine{536      \{}
\DoxyCodeLine{537         Example\_Struct1 *st1 = \&(un-\/>u.st1);}
\DoxyCodeLine{538         \_string\_free(st1-\/>s1);}
\DoxyCodeLine{539      \}}
\DoxyCodeLine{540 }
\DoxyCodeLine{541    free(un);}
\DoxyCodeLine{542 \}}
\DoxyCodeLine{543 }
\DoxyCodeLine{544 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{545 \_variant\_free(Example\_Variant *va)}
\DoxyCodeLine{546 \{}
\DoxyCodeLine{547    \textcolor{keywordflow}{if} (!strcmp(va-\/>t.type, eet\_mapping[0].name))}
\DoxyCodeLine{548      \{}
\DoxyCodeLine{549         Example\_Struct1 *st1 = va-\/>data;}
\DoxyCodeLine{550         \_string\_free(st1-\/>s1);}
\DoxyCodeLine{551      \}}
\DoxyCodeLine{552 }
\DoxyCodeLine{553    free(va-\/>data);}
\DoxyCodeLine{554    free(va);}
\DoxyCodeLine{555 \}}
\DoxyCodeLine{556 }
\DoxyCodeLine{557 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{558 \_data\_free(Example\_Lists *cache)}
\DoxyCodeLine{559 \{}
\DoxyCodeLine{560    Example\_Union *un;}
\DoxyCodeLine{561    Example\_Variant *va;}
\DoxyCodeLine{562 }
\DoxyCodeLine{563    \mbox{\hyperlink{group__Eina__List__Group_gae27a2c686a0a11693f9b06957c9bba83}{EINA\_LIST\_FREE}}(cache-\/>union\_list, un)}
\DoxyCodeLine{564      \_union\_free(un);}
\DoxyCodeLine{565 }
\DoxyCodeLine{566    \mbox{\hyperlink{group__Eina__List__Group_gae27a2c686a0a11693f9b06957c9bba83}{EINA\_LIST\_FREE}}(cache-\/>variant\_list, va)}
\DoxyCodeLine{567      \_variant\_free(va);}
\DoxyCodeLine{568 }
\DoxyCodeLine{569    free(cache);}
\DoxyCodeLine{570 \} \textcolor{comment}{/* \_data\_free */}}
\DoxyCodeLine{571 }
\DoxyCodeLine{572 \textcolor{keyword}{static} Example\_Lists *}
\DoxyCodeLine{573 \_data\_load(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *filename)}
\DoxyCodeLine{574 \{}
\DoxyCodeLine{575    Example\_Lists *data;}
\DoxyCodeLine{576    \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\_File}} *ef = \mbox{\hyperlink{group__Eet__File__Group_ga675160a758832ee812edf7f64ed30ee6}{eet\_open}}(filename, \mbox{\hyperlink{group__Eet__File__Group_ggaa8e1a7af50fefaf15eb2f69543d24998a416f7e9a76b8131a44bbeedb13060c81}{EET\_FILE\_MODE\_READ}});}
\DoxyCodeLine{577    \textcolor{keywordflow}{if} (!ef)}
\DoxyCodeLine{578      \{}
\DoxyCodeLine{579         fprintf(stderr, \textcolor{stringliteral}{"{}ERROR: could not open '\%s' for read\(\backslash\)n"{}}, filename);}
\DoxyCodeLine{580         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{581      \}}
\DoxyCodeLine{582 }
\DoxyCodeLine{583    data = \mbox{\hyperlink{group__Eet__Data__Group_ga4c09f4dfb051baabc0c0551ea98b6830}{eet\_data\_read}}(ef, \_lists\_descriptor, CACHE\_FILE\_ENTRY);}
\DoxyCodeLine{584    \textcolor{keywordflow}{if} (!data)}
\DoxyCodeLine{585      \{}
\DoxyCodeLine{586         \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{587         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{588      \}}
\DoxyCodeLine{589 }
\DoxyCodeLine{590    \textcolor{keywordflow}{if} (\_cache\_file)}
\DoxyCodeLine{591      \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(\_cache\_file);}
\DoxyCodeLine{592 }
\DoxyCodeLine{593    \_cache\_file = ef;}
\DoxyCodeLine{594    \_cache\_dict = \mbox{\hyperlink{group__Eet__File__Group_gabac3fef94bb732840b9ac9cc2917c4c6}{eet\_dictionary\_get}}(ef);}
\DoxyCodeLine{595 }
\DoxyCodeLine{596    \textcolor{keywordflow}{return} data;}
\DoxyCodeLine{597 \} \textcolor{comment}{/* \_data\_load */}}
\DoxyCodeLine{598 }
\DoxyCodeLine{599 \textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{600 \_data\_save(\textcolor{keyword}{const} Example\_Lists *cache,}
\DoxyCodeLine{601            \textcolor{keyword}{const} \textcolor{keywordtype}{char}          *filename)}
\DoxyCodeLine{602 \{}
\DoxyCodeLine{603    \textcolor{keywordtype}{char} tmp[PATH\_MAX];}
\DoxyCodeLine{604    \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\_File}} *ef;}
\DoxyCodeLine{605    \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}} ret;}
\DoxyCodeLine{606    \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} i, len;}
\DoxyCodeLine{607    \textcolor{keyword}{struct }stat st;}
\DoxyCodeLine{608 }
\DoxyCodeLine{609    len = \mbox{\hyperlink{group__Eina__String__Group_gae28caa0c42c4e76ae584f22bd3615723}{eina\_strlcpy}}(tmp, filename, \textcolor{keyword}{sizeof}(tmp));}
\DoxyCodeLine{610    \textcolor{keywordflow}{if} (len + 12 >= (\textcolor{keywordtype}{int})\textcolor{keyword}{sizeof}(tmp))}
\DoxyCodeLine{611      \{}
\DoxyCodeLine{612         fprintf(stderr, \textcolor{stringliteral}{"{}ERROR: file name is too big: \%s\(\backslash\)n"{}}, filename);}
\DoxyCodeLine{613         \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{614      \}}
\DoxyCodeLine{615 }
\DoxyCodeLine{616    i = 0;}
\DoxyCodeLine{617    \textcolor{keywordflow}{do}}
\DoxyCodeLine{618      \{}
\DoxyCodeLine{619         snprintf(tmp + len, 12, \textcolor{stringliteral}{"{}.\%u"{}}, i);}
\DoxyCodeLine{620         i++;}
\DoxyCodeLine{621      \}}
\DoxyCodeLine{622    \textcolor{keywordflow}{while} (stat(tmp, \&st) == 0);}
\DoxyCodeLine{623 }
\DoxyCodeLine{624    ef = \mbox{\hyperlink{group__Eet__File__Group_ga675160a758832ee812edf7f64ed30ee6}{eet\_open}}(tmp, \mbox{\hyperlink{group__Eet__File__Group_ggaa8e1a7af50fefaf15eb2f69543d24998a8f395f56fba48be007c65be51d799ee9}{EET\_FILE\_MODE\_WRITE}});}
\DoxyCodeLine{625    \textcolor{keywordflow}{if} (!ef)}
\DoxyCodeLine{626      \{}
\DoxyCodeLine{627         fprintf(stderr, \textcolor{stringliteral}{"{}ERROR: could not open '\%s' for write\(\backslash\)n"{}}, tmp);}
\DoxyCodeLine{628         \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{629      \}}
\DoxyCodeLine{630 }
\DoxyCodeLine{631    ret = \mbox{\hyperlink{group__Eet__Data__Group_gac66d1c49e3490bc5d803982d833ff8aa}{eet\_data\_write}}}
\DoxyCodeLine{632        (ef, \_lists\_descriptor, CACHE\_FILE\_ENTRY, cache, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{633 }
\DoxyCodeLine{634    \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{635 }
\DoxyCodeLine{636    \textcolor{keywordflow}{if} (ret)}
\DoxyCodeLine{637      \{}
\DoxyCodeLine{638         unlink(filename);}
\DoxyCodeLine{639         rename(tmp, filename);}
\DoxyCodeLine{640      \}}
\DoxyCodeLine{641 }
\DoxyCodeLine{642    \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{643 \} \textcolor{comment}{/* \_data\_save */}}
\DoxyCodeLine{644 }
\DoxyCodeLine{645 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{646 \_print\_union(\textcolor{keyword}{const} Example\_Union *un)}
\DoxyCodeLine{647 \{}
\DoxyCodeLine{648    printf(\textcolor{stringliteral}{"{}\(\backslash\)t  |   type: \%s'\(\backslash\)n"{}}, eet\_mapping[un-\/>type -\/ 1].name);}
\DoxyCodeLine{649 }
\DoxyCodeLine{650    \textcolor{keywordflow}{switch} (un-\/>type)}
\DoxyCodeLine{651      \{}
\DoxyCodeLine{652       \textcolor{keywordflow}{case} EET\_STRUCT1:}
\DoxyCodeLine{653         printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  val1: \%f\(\backslash\)n"{}}, un-\/>u.st1.val1);}
\DoxyCodeLine{654         printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  stuff: \%d\(\backslash\)n"{}}, un-\/>u.st1.stuff);}
\DoxyCodeLine{655         printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  s1: \%s\(\backslash\)n"{}}, un-\/>u.st1.s1);}
\DoxyCodeLine{656         \textcolor{keywordflow}{break};}
\DoxyCodeLine{657 }
\DoxyCodeLine{658       \textcolor{keywordflow}{case} EET\_STRUCT2:}
\DoxyCodeLine{659         printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  val1: \%i\(\backslash\)n"{}}, un-\/>u.st2.b1);}
\DoxyCodeLine{660         printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  stuff: \%lli\(\backslash\)n"{}}, un-\/>u.st2.v1);}
\DoxyCodeLine{661         \textcolor{keywordflow}{break};}
\DoxyCodeLine{662 }
\DoxyCodeLine{663       \textcolor{keywordflow}{case} EET\_STRUCT3:}
\DoxyCodeLine{664         printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  val1: \%i\(\backslash\)n"{}}, un-\/>u.st3.body);}
\DoxyCodeLine{665         \textcolor{keywordflow}{break};}
\DoxyCodeLine{666 }
\DoxyCodeLine{667       \textcolor{keywordflow}{case} EET\_BASIC\_FLOAT:}
\DoxyCodeLine{668         printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  float: \%f\(\backslash\)n"{}}, un-\/>u.f);}
\DoxyCodeLine{669         \textcolor{keywordflow}{break};}
\DoxyCodeLine{670 }
\DoxyCodeLine{671       \textcolor{keywordflow}{case} EET\_BASIC\_STRING:}
\DoxyCodeLine{672         printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  string: \%s\(\backslash\)n"{}}, un-\/>u.string);}
\DoxyCodeLine{673         \textcolor{keywordflow}{break};}
\DoxyCodeLine{674 }
\DoxyCodeLine{675       \textcolor{keywordflow}{default}:}
\DoxyCodeLine{676         \textcolor{keywordflow}{return};}
\DoxyCodeLine{677      \}}
\DoxyCodeLine{678 \}}
\DoxyCodeLine{679 }
\DoxyCodeLine{680 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{681 \_print\_variant(\textcolor{keyword}{const} Example\_Variant *va)}
\DoxyCodeLine{682 \{}
\DoxyCodeLine{683    printf(\textcolor{stringliteral}{"{}\(\backslash\)t  |   type: \%s'\(\backslash\)n"{}}, va-\/>t.type);}
\DoxyCodeLine{684 }
\DoxyCodeLine{685    \textcolor{keywordflow}{switch} (va-\/>t.type[2])}
\DoxyCodeLine{686      \{}
\DoxyCodeLine{687       \textcolor{keywordflow}{case} \textcolor{charliteral}{'1'}:}
\DoxyCodeLine{688       \{}
\DoxyCodeLine{689          Example\_Struct1 *st1 = va-\/>data;}
\DoxyCodeLine{690 }
\DoxyCodeLine{691          printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  val1: \%f\(\backslash\)n"{}}, st1-\/>val1);}
\DoxyCodeLine{692          printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  stuff: \%d\(\backslash\)n"{}}, st1-\/>stuff);}
\DoxyCodeLine{693          printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  s1: \%s\(\backslash\)n"{}}, st1-\/>s1);}
\DoxyCodeLine{694       \}}
\DoxyCodeLine{695       \textcolor{keywordflow}{break};}
\DoxyCodeLine{696 }
\DoxyCodeLine{697       \textcolor{keywordflow}{case} \textcolor{charliteral}{'2'}:}
\DoxyCodeLine{698       \{}
\DoxyCodeLine{699          Example\_Struct2 *st2 = va-\/>data;}
\DoxyCodeLine{700 }
\DoxyCodeLine{701          printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  val1: \%i\(\backslash\)n"{}}, st2-\/>b1);}
\DoxyCodeLine{702          printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  stuff: \%lli\(\backslash\)n"{}}, st2-\/>v1);}
\DoxyCodeLine{703       \}}
\DoxyCodeLine{704       \textcolor{keywordflow}{break};}
\DoxyCodeLine{705 }
\DoxyCodeLine{706       \textcolor{keywordflow}{case} \textcolor{charliteral}{'3'}:}
\DoxyCodeLine{707       \{}
\DoxyCodeLine{708          Example\_Struct3 *st3 = va-\/>data;}
\DoxyCodeLine{709 }
\DoxyCodeLine{710          printf(\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t  val1: \%i\(\backslash\)n"{}}, st3-\/>body);}
\DoxyCodeLine{711       \}}
\DoxyCodeLine{712       \textcolor{keywordflow}{break};}
\DoxyCodeLine{713 }
\DoxyCodeLine{714       \textcolor{keywordflow}{default}:}
\DoxyCodeLine{715         \textcolor{keywordflow}{return};}
\DoxyCodeLine{716      \}}
\DoxyCodeLine{717 \}}
\DoxyCodeLine{718 }
\DoxyCodeLine{719 \textcolor{keywordtype}{int}}
\DoxyCodeLine{720 main(\textcolor{keywordtype}{int}   argc,}
\DoxyCodeLine{721      \textcolor{keywordtype}{char} *argv[])}
\DoxyCodeLine{722 \{}
\DoxyCodeLine{723    Example\_Lists *data\_lists;}
\DoxyCodeLine{724    \textcolor{keywordtype}{int} ret = 0;}
\DoxyCodeLine{725 }
\DoxyCodeLine{726    \textcolor{keywordflow}{if} (argc < 3)}
\DoxyCodeLine{727      \{}
\DoxyCodeLine{728         fprintf(stderr,}
\DoxyCodeLine{729                 \textcolor{stringliteral}{"{}Usage:\(\backslash\)n\(\backslash\)t\%s <input> <output> [action action-\/params]\(\backslash\)n\(\backslash\)n"{}}}
\DoxyCodeLine{730                 \textcolor{stringliteral}{"{}where actions and their parameters are:\(\backslash\)n"{}}}
\DoxyCodeLine{731                 \textcolor{stringliteral}{"{}\(\backslash\)tunion <type> [fields]\(\backslash\)n"{}}}
\DoxyCodeLine{732                 \textcolor{stringliteral}{"{}\(\backslash\)tvariant <type> [fields]\(\backslash\)n"{}}}
\DoxyCodeLine{733                 \textcolor{stringliteral}{"{}\(\backslash\)n"{}},}
\DoxyCodeLine{734                 argv[0]);}
\DoxyCodeLine{735         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{736      \}}
\DoxyCodeLine{737 }
\DoxyCodeLine{738    \mbox{\hyperlink{group__Eina__Main__Group_ga81b8137665b8a4d2cb38ca50017d4c74}{eina\_init}}();}
\DoxyCodeLine{739    \mbox{\hyperlink{group__Eet__Group_ga9903687bfa20fe9a9e59d4c1d213e89a}{eet\_init}}();}
\DoxyCodeLine{740    \_data\_descriptors\_init();}
\DoxyCodeLine{741 }
\DoxyCodeLine{742    data\_lists = \_data\_load(argv[1]);}
\DoxyCodeLine{743    \textcolor{keywordflow}{if} (!data\_lists)}
\DoxyCodeLine{744      \{}
\DoxyCodeLine{745         printf(\textcolor{stringliteral}{"{}Creating new data lists.\(\backslash\)n"{}});}
\DoxyCodeLine{746         data\_lists = \_data\_new();}
\DoxyCodeLine{747         \textcolor{keywordflow}{if} (!data\_lists)}
\DoxyCodeLine{748           \{}
\DoxyCodeLine{749              ret = -\/2;}
\DoxyCodeLine{750              \textcolor{keywordflow}{goto} end;}
\DoxyCodeLine{751           \}}
\DoxyCodeLine{752      \}}
\DoxyCodeLine{753 }
\DoxyCodeLine{754    \textcolor{keywordflow}{if} (argc > 3)}
\DoxyCodeLine{755      \{}
\DoxyCodeLine{756         \textcolor{keywordflow}{if} (strcmp(argv[3], \textcolor{stringliteral}{"{}union"{}}) == 0)}
\DoxyCodeLine{757           \{}
\DoxyCodeLine{758              \textcolor{keywordflow}{if} (argc > 4)}
\DoxyCodeLine{759                \{}
\DoxyCodeLine{760                   \textcolor{keywordtype}{int} type = atoi(argv[4]);}
\DoxyCodeLine{761                   Example\_Union *un;}
\DoxyCodeLine{762 }
\DoxyCodeLine{763                   \textcolor{keywordflow}{if} (type < EET\_STRUCT1 || type > EET\_BASIC\_STRING)}
\DoxyCodeLine{764                     \{}
\DoxyCodeLine{765                        fprintf(stderr,}
\DoxyCodeLine{766                                \textcolor{stringliteral}{"{}ERROR: invalid type parameter (\%s).\(\backslash\)n"{}},}
\DoxyCodeLine{767                                argv[4]);}
\DoxyCodeLine{768                        \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{769                     \}}
\DoxyCodeLine{770 }
\DoxyCodeLine{771                   \textcolor{keywordflow}{switch} (type)}
\DoxyCodeLine{772                     \{}
\DoxyCodeLine{773                      \textcolor{keywordflow}{case} 1:}
\DoxyCodeLine{774                        \textcolor{keywordflow}{if} (argc != 8)}
\DoxyCodeLine{775                          \{}
\DoxyCodeLine{776                             fprintf(}
\DoxyCodeLine{777                               stderr, \textcolor{stringliteral}{"{}ERROR: wrong number of parameters"{}}}
\DoxyCodeLine{778                                       \textcolor{stringliteral}{"{} (\%d).\(\backslash\)n"{}}, argc);}
\DoxyCodeLine{779                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{780                          \}}
\DoxyCodeLine{781 }
\DoxyCodeLine{782                        un = \_union\_1\_new(}
\DoxyCodeLine{783                            argv[5], argv[6], argv[7]);}
\DoxyCodeLine{784                        \textcolor{keywordflow}{if} (!un)}
\DoxyCodeLine{785                          \{}
\DoxyCodeLine{786                             fprintf(}
\DoxyCodeLine{787                               stderr, \textcolor{stringliteral}{"{}ERROR: could not create the "{}}}
\DoxyCodeLine{788                                       \textcolor{stringliteral}{"{}requested union.\(\backslash\)n"{}});}
\DoxyCodeLine{789                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{790                          \}}
\DoxyCodeLine{791                        data\_lists-\/>union\_list =}
\DoxyCodeLine{792                          \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(data\_lists-\/>union\_list, un);}
\DoxyCodeLine{793                        \textcolor{keywordflow}{break};}
\DoxyCodeLine{794 }
\DoxyCodeLine{795                      \textcolor{keywordflow}{case} 2:}
\DoxyCodeLine{796                        \textcolor{keywordflow}{if} (argc != 7)}
\DoxyCodeLine{797                          \{}
\DoxyCodeLine{798                             fprintf(}
\DoxyCodeLine{799                               stderr, \textcolor{stringliteral}{"{}ERROR: wrong number of parameters"{}}}
\DoxyCodeLine{800                                       \textcolor{stringliteral}{"{} (\%d).\(\backslash\)n"{}}, argc);}
\DoxyCodeLine{801                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{802                          \}}
\DoxyCodeLine{803 }
\DoxyCodeLine{804                        un = \_union\_2\_new(argv[5], argv[6]);}
\DoxyCodeLine{805                        \textcolor{keywordflow}{if} (!un)}
\DoxyCodeLine{806                          \{}
\DoxyCodeLine{807                             fprintf(}
\DoxyCodeLine{808                               stderr, \textcolor{stringliteral}{"{}ERROR: could not create the "{}}}
\DoxyCodeLine{809                                       \textcolor{stringliteral}{"{}requested union.\(\backslash\)n"{}});}
\DoxyCodeLine{810                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{811                          \}}
\DoxyCodeLine{812                        data\_lists-\/>union\_list =}
\DoxyCodeLine{813                          \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(data\_lists-\/>union\_list, un);}
\DoxyCodeLine{814                        \textcolor{keywordflow}{break};}
\DoxyCodeLine{815 }
\DoxyCodeLine{816                      \textcolor{keywordflow}{case} 3:}
\DoxyCodeLine{817                        \textcolor{keywordflow}{if} (argc != 6)}
\DoxyCodeLine{818                          \{}
\DoxyCodeLine{819                             fprintf(}
\DoxyCodeLine{820                               stderr, \textcolor{stringliteral}{"{}ERROR: wrong number of parameters"{}}}
\DoxyCodeLine{821                                       \textcolor{stringliteral}{"{} (\%d).\(\backslash\)n"{}}, argc);}
\DoxyCodeLine{822                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{823                          \}}
\DoxyCodeLine{824 }
\DoxyCodeLine{825                        un = \_union\_3\_new(argv[5]);}
\DoxyCodeLine{826                        \textcolor{keywordflow}{if} (!un)}
\DoxyCodeLine{827                          \{}
\DoxyCodeLine{828                             fprintf(}
\DoxyCodeLine{829                               stderr, \textcolor{stringliteral}{"{}ERROR: could not create the "{}}}
\DoxyCodeLine{830                                       \textcolor{stringliteral}{"{}requested union.\(\backslash\)n"{}});}
\DoxyCodeLine{831                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{832                          \}}
\DoxyCodeLine{833                        data\_lists-\/>union\_list =}
\DoxyCodeLine{834                          \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(data\_lists-\/>union\_list, un);}
\DoxyCodeLine{835                        \textcolor{keywordflow}{break};}
\DoxyCodeLine{836 }
\DoxyCodeLine{837                      \textcolor{keywordflow}{case} EET\_BASIC\_FLOAT:}
\DoxyCodeLine{838                        \textcolor{keywordflow}{if} (argc != 6)}
\DoxyCodeLine{839                          \{}
\DoxyCodeLine{840                             fprintf(}
\DoxyCodeLine{841                               stderr, \textcolor{stringliteral}{"{}ERROR: wrong number of parameters"{}}}
\DoxyCodeLine{842                                       \textcolor{stringliteral}{"{} (\%d).\(\backslash\)n"{}}, argc);}
\DoxyCodeLine{843                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{844                          \}}
\DoxyCodeLine{845 }
\DoxyCodeLine{846                        un = \_union\_float\_new(argv[5]);}
\DoxyCodeLine{847                        \textcolor{keywordflow}{if} (!un)}
\DoxyCodeLine{848                          \{}
\DoxyCodeLine{849                             fprintf(}
\DoxyCodeLine{850                               stderr, \textcolor{stringliteral}{"{}ERROR: could not create the "{}}}
\DoxyCodeLine{851                                       \textcolor{stringliteral}{"{}requested union.\(\backslash\)n"{}});}
\DoxyCodeLine{852                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{853                          \}}
\DoxyCodeLine{854                        data\_lists-\/>union\_list =}
\DoxyCodeLine{855                          \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(data\_lists-\/>union\_list, un);}
\DoxyCodeLine{856                        \textcolor{keywordflow}{break};}
\DoxyCodeLine{857 }
\DoxyCodeLine{858                      \textcolor{keywordflow}{case} EET\_BASIC\_STRING:}
\DoxyCodeLine{859                        \textcolor{keywordflow}{if} (argc != 6)}
\DoxyCodeLine{860                          \{}
\DoxyCodeLine{861                             fprintf(}
\DoxyCodeLine{862                               stderr, \textcolor{stringliteral}{"{}ERROR: wrong number of parameters"{}}}
\DoxyCodeLine{863                                       \textcolor{stringliteral}{"{} (\%d).\(\backslash\)n"{}}, argc);}
\DoxyCodeLine{864                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{865                          \}}
\DoxyCodeLine{866 }
\DoxyCodeLine{867                        un = \_union\_string\_new(argv[5]);}
\DoxyCodeLine{868                        \textcolor{keywordflow}{if} (!un)}
\DoxyCodeLine{869                          \{}
\DoxyCodeLine{870                             fprintf(}
\DoxyCodeLine{871                               stderr, \textcolor{stringliteral}{"{}ERROR: could not create the "{}}}
\DoxyCodeLine{872                                       \textcolor{stringliteral}{"{}requested union.\(\backslash\)n"{}});}
\DoxyCodeLine{873                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{874                          \}}
\DoxyCodeLine{875                        data\_lists-\/>union\_list =}
\DoxyCodeLine{876                          \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(data\_lists-\/>union\_list, un);}
\DoxyCodeLine{877                        \textcolor{keywordflow}{break};}
\DoxyCodeLine{878 }
\DoxyCodeLine{879                      \textcolor{keywordflow}{default}:}
\DoxyCodeLine{880                        fprintf(}
\DoxyCodeLine{881                          stderr, \textcolor{stringliteral}{"{}ERROR: bad type of of struct passed\(\backslash\)n"{}});}
\DoxyCodeLine{882                        \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{883                     \}}
\DoxyCodeLine{884                \}}
\DoxyCodeLine{885              \textcolor{keywordflow}{else}}
\DoxyCodeLine{886                fprintf(stderr,}
\DoxyCodeLine{887                        \textcolor{stringliteral}{"{}ERROR: wrong number of parameters (\%d).\(\backslash\)n"{}},}
\DoxyCodeLine{888                        argc);}
\DoxyCodeLine{889           \}}
\DoxyCodeLine{890         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(argv[3], \textcolor{stringliteral}{"{}variant"{}}) == 0)}
\DoxyCodeLine{891           \{}
\DoxyCodeLine{892              \textcolor{keywordflow}{if} (argc > 4)}
\DoxyCodeLine{893                \{}
\DoxyCodeLine{894                   \textcolor{keywordtype}{int} type = atoi(argv[4]);}
\DoxyCodeLine{895                   Example\_Variant *va;}
\DoxyCodeLine{896 }
\DoxyCodeLine{897                   \textcolor{keywordflow}{if} (type < EET\_STRUCT1 || type > EET\_STRUCT3)}
\DoxyCodeLine{898                     \{}
\DoxyCodeLine{899                        fprintf(stderr,}
\DoxyCodeLine{900                                \textcolor{stringliteral}{"{}ERROR: invalid type parameter (\%s).\(\backslash\)n"{}},}
\DoxyCodeLine{901                                argv[4]);}
\DoxyCodeLine{902                        \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{903                     \}}
\DoxyCodeLine{904 }
\DoxyCodeLine{905                   \textcolor{keywordflow}{switch} (type)}
\DoxyCodeLine{906                     \{}
\DoxyCodeLine{907                      \textcolor{keywordflow}{case} 1:}
\DoxyCodeLine{908                        \textcolor{keywordflow}{if} (argc != 8)}
\DoxyCodeLine{909                          \{}
\DoxyCodeLine{910                             fprintf(}
\DoxyCodeLine{911                               stderr, \textcolor{stringliteral}{"{}ERROR: wrong number of parameters"{}}}
\DoxyCodeLine{912                                       \textcolor{stringliteral}{"{} (\%d).\(\backslash\)n"{}}, argc);}
\DoxyCodeLine{913                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{914                          \}}
\DoxyCodeLine{915 }
\DoxyCodeLine{916                        va = \_variant\_1\_new(}
\DoxyCodeLine{917                            argv[5], argv[6], argv[7]);}
\DoxyCodeLine{918                        \textcolor{keywordflow}{if} (!va)}
\DoxyCodeLine{919                          \{}
\DoxyCodeLine{920                             fprintf(}
\DoxyCodeLine{921                               stderr, \textcolor{stringliteral}{"{}ERROR: could not create the "{}}}
\DoxyCodeLine{922                                       \textcolor{stringliteral}{"{}requested variant.\(\backslash\)n"{}});}
\DoxyCodeLine{923                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{924                          \}}
\DoxyCodeLine{925                        data\_lists-\/>variant\_list =}
\DoxyCodeLine{926                          \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(data\_lists-\/>variant\_list, va);}
\DoxyCodeLine{927                        \textcolor{keywordflow}{break};}
\DoxyCodeLine{928 }
\DoxyCodeLine{929                      \textcolor{keywordflow}{case} 2:}
\DoxyCodeLine{930                        \textcolor{keywordflow}{if} (argc != 7)}
\DoxyCodeLine{931                          \{}
\DoxyCodeLine{932                             fprintf(}
\DoxyCodeLine{933                               stderr, \textcolor{stringliteral}{"{}ERROR: wrong number of parameters"{}}}
\DoxyCodeLine{934                                       \textcolor{stringliteral}{"{} (\%d).\(\backslash\)n"{}}, argc);}
\DoxyCodeLine{935                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{936                          \}}
\DoxyCodeLine{937 }
\DoxyCodeLine{938                        va = \_variant\_2\_new(argv[5], argv[6]);}
\DoxyCodeLine{939                        \textcolor{keywordflow}{if} (!va)}
\DoxyCodeLine{940                          \{}
\DoxyCodeLine{941                             fprintf(}
\DoxyCodeLine{942                               stderr, \textcolor{stringliteral}{"{}ERROR: could not create the "{}}}
\DoxyCodeLine{943                                       \textcolor{stringliteral}{"{}requested variant.\(\backslash\)n"{}});}
\DoxyCodeLine{944                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{945                          \}}
\DoxyCodeLine{946                        data\_lists-\/>variant\_list =}
\DoxyCodeLine{947                          \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(data\_lists-\/>variant\_list, va);}
\DoxyCodeLine{948                        \textcolor{keywordflow}{break};}
\DoxyCodeLine{949 }
\DoxyCodeLine{950                      \textcolor{keywordflow}{case} 3:}
\DoxyCodeLine{951                        \textcolor{keywordflow}{if} (argc != 6)}
\DoxyCodeLine{952                          \{}
\DoxyCodeLine{953                             fprintf(}
\DoxyCodeLine{954                               stderr, \textcolor{stringliteral}{"{}ERROR: wrong number of parameters"{}}}
\DoxyCodeLine{955                                       \textcolor{stringliteral}{"{} (\%d).\(\backslash\)n"{}}, argc);}
\DoxyCodeLine{956                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{957                          \}}
\DoxyCodeLine{958 }
\DoxyCodeLine{959                        va = \_variant\_3\_new(argv[5]);}
\DoxyCodeLine{960                        \textcolor{keywordflow}{if} (!va)}
\DoxyCodeLine{961                          \{}
\DoxyCodeLine{962                             fprintf(}
\DoxyCodeLine{963                               stderr, \textcolor{stringliteral}{"{}ERROR: could not create the "{}}}
\DoxyCodeLine{964                                       \textcolor{stringliteral}{"{}requested variant.\(\backslash\)n"{}});}
\DoxyCodeLine{965                             \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{966                          \}}
\DoxyCodeLine{967                        data\_lists-\/>variant\_list =}
\DoxyCodeLine{968                          \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(data\_lists-\/>variant\_list, va);}
\DoxyCodeLine{969                        \textcolor{keywordflow}{break};}
\DoxyCodeLine{970 }
\DoxyCodeLine{971                      \textcolor{keywordflow}{default}:}
\DoxyCodeLine{972                        fprintf(}
\DoxyCodeLine{973                          stderr, \textcolor{stringliteral}{"{}ERROR: bad type of of struct passed\(\backslash\)n"{}});}
\DoxyCodeLine{974                        \textcolor{keywordflow}{goto} cont;}
\DoxyCodeLine{975                     \}}
\DoxyCodeLine{976                \}}
\DoxyCodeLine{977              \textcolor{keywordflow}{else}}
\DoxyCodeLine{978                fprintf(stderr,}
\DoxyCodeLine{979                        \textcolor{stringliteral}{"{}ERROR: wrong number of parameters (\%d).\(\backslash\)n"{}},}
\DoxyCodeLine{980                        argc);}
\DoxyCodeLine{981           \}}
\DoxyCodeLine{982         \textcolor{keywordflow}{else}}
\DoxyCodeLine{983           fprintf(stderr, \textcolor{stringliteral}{"{}ERROR: unknown action '\%s'\(\backslash\)n"{}}, argv[3]);}
\DoxyCodeLine{984      \}}
\DoxyCodeLine{985 }
\DoxyCodeLine{986 cont:}
\DoxyCodeLine{987    printf(\textcolor{stringliteral}{"{}Cached data:\(\backslash\)n"{}});}
\DoxyCodeLine{988 }
\DoxyCodeLine{989    printf(\textcolor{stringliteral}{"{}\(\backslash\)tstats: unions=\%u, variants=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{990           \mbox{\hyperlink{group__Eina__List__Group_ga301729054a498a2df09a5f1dd760697e}{eina\_list\_count}}(data\_lists-\/>union\_list),}
\DoxyCodeLine{991           \mbox{\hyperlink{group__Eina__List__Group_ga301729054a498a2df09a5f1dd760697e}{eina\_list\_count}}(data\_lists-\/>variant\_list));}
\DoxyCodeLine{992 }
\DoxyCodeLine{993    \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eina__List__Group_ga301729054a498a2df09a5f1dd760697e}{eina\_list\_count}}(data\_lists-\/>union\_list))}
\DoxyCodeLine{994      \{}
\DoxyCodeLine{995         \textcolor{keyword}{const} \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *l;}
\DoxyCodeLine{996         \textcolor{keyword}{const} Example\_Union *un;}
\DoxyCodeLine{997         printf(\textcolor{stringliteral}{"{}\(\backslash\)t  * union list:\(\backslash\)n"{}});}
\DoxyCodeLine{998 }
\DoxyCodeLine{999         \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(data\_lists-\/>union\_list, l, un)}
\DoxyCodeLine{1000           \{}
\DoxyCodeLine{1001              \_print\_union(un);}
\DoxyCodeLine{1002           \}}
\DoxyCodeLine{1003      \}}
\DoxyCodeLine{1004 }
\DoxyCodeLine{1005    \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eina__List__Group_ga301729054a498a2df09a5f1dd760697e}{eina\_list\_count}}(data\_lists-\/>variant\_list))}
\DoxyCodeLine{1006      \{}
\DoxyCodeLine{1007         \textcolor{keyword}{const} \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *l;}
\DoxyCodeLine{1008         \textcolor{keyword}{const} Example\_Variant *un;}
\DoxyCodeLine{1009         printf(\textcolor{stringliteral}{"{}\(\backslash\)t  * variant list:\(\backslash\)n"{}});}
\DoxyCodeLine{1010 }
\DoxyCodeLine{1011         \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(data\_lists-\/>variant\_list, l, un)}
\DoxyCodeLine{1012           \{}
\DoxyCodeLine{1013              \_print\_variant(un);}
\DoxyCodeLine{1014           \}}
\DoxyCodeLine{1015      \}}
\DoxyCodeLine{1016 }
\DoxyCodeLine{1017    printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{1018 }
\DoxyCodeLine{1019    \textcolor{keywordflow}{if} (!\_data\_save(data\_lists, argv[2]))}
\DoxyCodeLine{1020      ret = -\/3;}
\DoxyCodeLine{1021 }
\DoxyCodeLine{1022    \_data\_free(data\_lists);}
\DoxyCodeLine{1023 }
\DoxyCodeLine{1024 end:}
\DoxyCodeLine{1025    \textcolor{keywordflow}{if} (\_cache\_file)}
\DoxyCodeLine{1026      \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(\_cache\_file);}
\DoxyCodeLine{1027    \_data\_descriptors\_shutdown();}
\DoxyCodeLine{1028    \mbox{\hyperlink{group__Eet__Group_gacbc7583179399d3b3e7b003e911f866f}{eet\_shutdown}}();}
\DoxyCodeLine{1029    \mbox{\hyperlink{group__Eina__Main__Group_ga5bf35513199d5220341437c05696285d}{eina\_shutdown}}();}
\DoxyCodeLine{1030 }
\DoxyCodeLine{1031    \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{1032 \} \textcolor{comment}{/* main */}}
\DoxyCodeLine{1033 }

\end{DoxyCodeInclude}
 