\begin{DoxyDate}{Date}
2008 (created)
\end{DoxyDate}
\hypertarget{eina_cxx_main_toc}{}\section{Table of Contents}\label{eina_cxx_main_toc}
\begin{DoxyItemize}
\item \hyperlink{eina_main_eina_main_intro}{Introduction} \item \hyperlink{eina_main_eina_main_compiling}{How to compile} \item \hyperlink{eina_main_eina_main_next_steps}{Next Steps} \item \hyperlink{eina_main_eina_main_intro_example}{Introductory Example}\end{DoxyItemize}
\hypertarget{eina_main_eina_main_intro}{}\section{Introduction}\label{eina_main_eina_main_intro}
The Eina library is a library that implements an A\+PI for data types in an efficient way. It also provides some useful tools like opening shared libraries, errors management, type conversion, time accounting and memory pool.

This library is cross-\/platform and can be compiled and used on Linux, B\+SD, Opensolaris and Windows (XP and CE).

The data types that are available are (see \hyperlink{group__Eina__Data__Types__Group}{Data Types})\+: \begin{DoxyItemize}
\item \hyperlink{group__Eina__Fp__Group}{Fp} standard floating point numbers. \item \hyperlink{group__Eina__Inline__Array__Group}{Inline Array} standard array of inlined members. \item \hyperlink{group__Eina__Array__Group}{Array} standard array of {\ttfamily void$\ast$} data. \item \hyperlink{group__Eina__Hash__Group}{Hash Table} standard hash of {\ttfamily void$\ast$} data. \item \hyperlink{group__Eina__Inline__List__Group}{Inline List} list with nodes inlined into user type. \item \hyperlink{group__Eina__CList__Group}{Compact List} Compact List. \item \hyperlink{group__Eina__List__Group}{List} standard list of {\ttfamily void$\ast$} data. \item \hyperlink{group__Eina__Iterator__Group}{Iterator Functions} Iterator functions. \item \hyperlink{group__Eina__Matrixsparse__Group}{Sparse Matrix} sparse matrix of {\ttfamily void$\ast$} data. \item \hyperlink{group__Eina__Rbtree__Group}{Red-\/\+Black tree} red-\/black tree with nodes inlined into user type. \item \hyperlink{group__Eina__String__Buffer__Group}{String Buffer} mutable string to prepend, insert or append strings to a buffer. \item \hyperlink{group__Eina__Stringshare__Group}{Stringshare} saves memory by sharing read-\/only string references. \item \hyperlink{group__Eina__Tiler__Group}{Tiler} split, merge and navigates into 2D tiled regions. \item \hyperlink{group__Eina__Trash__Group}{Trash} container of unused but allocated data. \item \hyperlink{group__Eina__Value__Group}{Generic Value Storage} container for generic value storage and access. \item Eina\+\_\+\+Model\+\_\+\+Group container for data with user defined hierarchy/structure.\end{DoxyItemize}
The tools that are available are (see \hyperlink{group__Eina__Tools__Group}{Tools})\+: \begin{DoxyItemize}
\item \hyperlink{group__Eina__Benchmark__Group}{Benchmark} helper to write benchmarks. \item \hyperlink{group__Eina__Convert__Group}{Convert} faster conversion from strings to integers, double, etc. \item \hyperlink{group__Eina__Counter__Group}{Counter} measures number of calls and their time. \item \hyperlink{group__Eina__Cpu__Group}{Cpu} Cpu and architecture related helpers. \item \hyperlink{group__Eina__Error__Group}{Error} error identifiers. \item \hyperlink{group__Eina__File__Group}{File} simple file list and path split. \item \hyperlink{group__Eina__Lalloc__Group}{Lazy allocator} simple lazy allocator. \item \hyperlink{group__Eina__Log__Group}{Log} full-\/featured logging system. \item \hyperlink{group__Eina__Magic__Group}{Magic} provides runtime type checking. \item \hyperlink{group__Eina__Memory__Pool__Group}{Memory Pool} abstraction for various memory allocators. \item \hyperlink{group__Eina__Module__Group}{Module} lists, loads and share modules using Eina\+\_\+\+Module standard. \item \hyperlink{group__Eina__Rectangle__Group}{Rectangle} rectangle structure and standard manipulation methods. \item \hyperlink{group__Eina__Safety__Checks__Group}{Safety Checks} extra checks that will report unexpected conditions and can be disabled at compile time. \item \hyperlink{group__Eina__String__Group}{String} a set of functions that manages C strings.\end{DoxyItemize}
\hypertarget{eina_main_eina_main_compiling}{}\section{How to compile}\label{eina_main_eina_main_compiling}
Eina is a library your application links to. The procedure for this is very simple. You simply have to compile your application with the appropriate compiler flags that the {\ttfamily pkg-\/config} script outputs. For example\+:

Compiling C or C++ files into object files\+:

\begin{DoxyVerb}gcc -c -o main.o main.c `pkg-config --cflags eina`
\end{DoxyVerb}


Linking object files into a binary executable\+:

\begin{DoxyVerb}gcc -o my_application main.o `pkg-config --libs eina`
\end{DoxyVerb}


See \hyperlink{pkgconfig}{pkgconfig}\hypertarget{eina_main_eina_main_next_steps}{}\section{Next Steps}\label{eina_main_eina_main_next_steps}
After you understood what Eina is and installed it in your system you should proceed understanding the programming interface.

Recommended reading\+:

\begin{DoxyItemize}
\item \hyperlink{group__Eina__Data__Types__Group}{Data Types} to find about implemented types and how to use them. \item \hyperlink{group__Eina__Tools__Group}{Tools} to find about helper tools provided by eina.\end{DoxyItemize}
\hypertarget{eina_main_eina_main_intro_example}{}\section{Introductory Example}\label{eina_main_eina_main_intro_example}

\begin{DoxyCodeInclude}
\textcolor{comment}{//Compile with:}
\textcolor{comment}{//gcc -g eina\_list\_01.c -o eina\_list\_01 `pkg-config --cflags --libs eina`}

\textcolor{preprocessor}{#include <stdio.h>}
\textcolor{preprocessor}{#include <\hyperlink{Eina_8h}{Eina.h}>}

\textcolor{keywordtype}{int}
main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)
\{
   (void)argc;
   (void)argv;
   \hyperlink{struct__Eina__List}{Eina\_List} *list = NULL;
   \hyperlink{struct__Eina__List}{Eina\_List} *l;
   \textcolor{keywordtype}{void} *list\_data;

   \hyperlink{group__Eina__Main__Group_gabf448ada5bc81a07342b66c6f818ee5e}{eina\_init}();

   list = \hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}(list, \textcolor{stringliteral}{"tigh"});
   list = \hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}(list, \textcolor{stringliteral}{"adar"});
   list = \hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}(list, \textcolor{stringliteral}{"baltar"});
   list = \hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}(list, \textcolor{stringliteral}{"roslin"});

   \hyperlink{group__Eina__List__Group_gad02f746a08ee0b12b7ed66d4bc0d71d8}{EINA\_LIST\_FOREACH}(list, l, list\_data)
     printf(\textcolor{stringliteral}{"%s\(\backslash\)n"}, (\textcolor{keywordtype}{char}*)list\_data);
   printf(\textcolor{stringliteral}{"\(\backslash\)n"});

   l = \hyperlink{group__Eina__List__Group_gad4a1e3b0fdecd8ed4cb2ff592ceeb553}{eina\_list\_nth\_list}(list, 1);
   list = \hyperlink{group__Eina__List__Group_gafa705d4483487e53d1be93a30e43c66d}{eina\_list\_append\_relative\_list}(list, \textcolor{stringliteral}{"cain"}, l);

   list = \hyperlink{group__Eina__List__Group_ga4676c189ca4bcfa22d7ecfbcd00200ae}{eina\_list\_append\_relative}(list, \textcolor{stringliteral}{"zarek"}, \textcolor{stringliteral}{"cain"});

   list = \hyperlink{group__Eina__List__Group_ga9f35bfc7c5b798014c3e0a74bc6f39ad}{eina\_list\_prepend}(list, \textcolor{stringliteral}{"adama"});

   list = \hyperlink{group__Eina__List__Group_gad44370d18554ff250d2e9ddac4653caf}{eina\_list\_prepend\_relative}(list, \textcolor{stringliteral}{"gaeta"}, \textcolor{stringliteral}{"cain"});

   list = \hyperlink{group__Eina__List__Group_ga03a77b1579ee83bcab4bc3d67375d4b1}{eina\_list\_prepend\_relative\_list}(list, \textcolor{stringliteral}{"lampkin"}, l);

   \hyperlink{group__Eina__List__Group_gad02f746a08ee0b12b7ed66d4bc0d71d8}{EINA\_LIST\_FOREACH}(list, l, list\_data)
     printf(\textcolor{stringliteral}{"%s\(\backslash\)n"}, (\textcolor{keywordtype}{char}*)list\_data);

   \hyperlink{group__Eina__List__Group_ga608bd2fbf06293a1b794648990703ab4}{eina\_list\_free}(list);

   \hyperlink{group__Eina__Main__Group_ga6741fcaba116e31e96ce14dcfa03f568}{eina\_shutdown}();

   \textcolor{keywordflow}{return} 0;
\}
\end{DoxyCodeInclude}


More examples can be found at \hyperlink{eina_examples}{Eina Examples}. 