
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile with:}}
\DoxyCodeLine{\textcolor{comment}{//gcc eina\_value\_01.c -\/o eina\_value\_01 `pkg-\/config -\/-\/cflags -\/-\/libs eina`}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <\mbox{\hyperlink{Eina_8h}{Eina.h}}>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int} main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   (void)argc;}
\DoxyCodeLine{   (void)argv;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} v;}
\DoxyCodeLine{   \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{   \textcolor{keywordtype}{char} *newstr;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Main__Group_ga81b8137665b8a4d2cb38ca50017d4c74}{eina\_init}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_gab5c6558b1b8be2ad597d71a765cbf5f6}{eina\_value\_setup}}(\&v, \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga9a1407c953694c3d6f40ab01ebe9a294}{eina\_value\_set}}(\&v, 123);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&i);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}v=\%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{}
\DoxyCodeLine{   newstr = \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6d5197504d68bd4a72ff212fdda2b6af}{eina\_value\_to\_string}}(\&v);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}v as string: \%s\(\backslash\)n"{}}, newstr);}
\DoxyCodeLine{   free(newstr); \textcolor{comment}{// it was allocated by eina\_value\_to\_string()}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga940660709a2862bafac92f47bb721a68}{eina\_value\_flush}}(\&v); \textcolor{comment}{// destroy v contents, will not use anymore}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *s;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_gab5c6558b1b8be2ad597d71a765cbf5f6}{eina\_value\_setup}}(\&v, \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga9a1407c953694c3d6f40ab01ebe9a294}{eina\_value\_set}}(\&v, \textcolor{stringliteral}{"{}My string"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&s);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}v=\%s (pointer: \%p)\(\backslash\)n"{}}, s, s);}
\DoxyCodeLine{}
\DoxyCodeLine{   newstr = \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6d5197504d68bd4a72ff212fdda2b6af}{eina\_value\_to\_string}}(\&v);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}v as string: \%s (pointer: \%p)\(\backslash\)n"{}}, newstr, newstr);}
\DoxyCodeLine{   free(newstr); \textcolor{comment}{// it was allocated by eina\_value\_to\_string()}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga940660709a2862bafac92f47bb721a68}{eina\_value\_flush}}(\&v); \textcolor{comment}{// destroy v contents, string 's' is not valid anymore!}}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} otherv;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_gab5c6558b1b8be2ad597d71a765cbf5f6}{eina\_value\_setup}}(\&otherv, \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_gab5c6558b1b8be2ad597d71a765cbf5f6}{eina\_value\_setup}}(\&v, \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// convert from int to string:}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga9a1407c953694c3d6f40ab01ebe9a294}{eina\_value\_set}}(\&v, 123);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_gafd6de1bb3ae7aecd804d7da76e3860de}{eina\_value\_convert}}(\&v, \&otherv);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&otherv, \&s);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}otherv=\%s\(\backslash\)n"{}}, s);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// and the other way around!}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga9a1407c953694c3d6f40ab01ebe9a294}{eina\_value\_set}}(\&otherv, \textcolor{stringliteral}{"{}33"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_gafd6de1bb3ae7aecd804d7da76e3860de}{eina\_value\_convert}}(\&otherv, \&v);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&i);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}v=\%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga940660709a2862bafac92f47bb721a68}{eina\_value\_flush}}(\&otherv);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga940660709a2862bafac92f47bb721a68}{eina\_value\_flush}}(\&v);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Main__Group_ga5bf35513199d5220341437c05696285d}{eina\_shutdown}}();}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 