~\newline


\begin{DoxyDate}{Date}
2012 (created)
\end{DoxyDate}
\hypertarget{evil_main_toc}{}\section{Table of Contents}\label{evil_main_toc}
\begin{DoxyItemize}
\item \mbox{\hyperlink{eo_main_eo_main_intro}{Introduction}} \item \mbox{\hyperlink{eo_main_eo_main_compiling}{How to compile}} \item \mbox{\hyperlink{eo_main_eo_main_next_steps}{Next Steps}} \item \mbox{\hyperlink{eo_main_eo_main_intro_example}{Introductory Example}} \item \mbox{\hyperlink{eo_main_eo_lifecycle_debug}{Debug Object Lifecycle}}\end{DoxyItemize}
\hypertarget{eo_main_eo_main_intro}{}\section{Introduction}\label{eo_main_eo_main_intro}
The Eo generic object system. It\textquotesingle{}s designed to be the base object system for the E\+FL.\hypertarget{eo_main_eo_main_compiling}{}\section{How to compile}\label{eo_main_eo_main_compiling}
Eo is a library to which your application can link. 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 eo`\end{DoxyVerb}


Linking object files into a binary executable\+:

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


See \mbox{\hyperlink{pkgconfig}{pkgconfig}}\hypertarget{eo_main_eo_main_next_steps}{}\section{Next Steps}\label{eo_main_eo_main_next_steps}
After you\textquotesingle{}ve understood and installed Eo, you can then learn more about the programming interface.

Recommended reading\+:

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__Efl__Class__Base}{Eo\textquotesingle{}s Base class.}} \item \mbox{\hyperlink{group__Efl__Class}{Efl Class}} \item \mbox{\hyperlink{group__Efl__Events}{Eo\textquotesingle{}s Event Handling}} \item Eo\+\_\+\+Composite\+\_\+\+Objects\end{DoxyItemize}
\hypertarget{eo_main_eo_lifecycle_debug}{}\section{Debug Object Lifecycle}\label{eo_main_eo_lifecycle_debug}
When dealing with objects it\textquotesingle{}s important to investigate the object lifecycle\+: in other words when they were created and deleted. This is not that trivial since objects can have extra references added with \mbox{\hyperlink{group__Eo_gae5c8819ec60844eea61c3ed971bb6b5d}{efl\+\_\+ref()}} as well as removed with \mbox{\hyperlink{group__Eo_gafa5c632d4b211bb80eb1826ce1afa7a2}{efl\+\_\+unref()}}, efl\+\_\+parent\+\_\+set() to N\+U\+LL or \mbox{\hyperlink{group__Eo_gab4ac68670242b467427ea24d4d6be1e2}{efl\+\_\+del()}}.

To aid development process as well as debug memory leaks and invalid access, you can use the eo\+\_\+debug script helper to preload libeo\+\_\+dbg.\+so, run as\+:

\begin{DoxyVerb}  export EO_LIFECYCLE_DEBUG=1
  export EINA_LOG_LEVELS=eo_lifecycle:4
  eo_debug my_app
* \end{DoxyVerb}


This will print out all the objects that were created and deleted, as well as keep the stack trace that originated those. If a double free or user-\/after-\/free occurs it will print out the backtrace where the object was created and where it was deleted. If only errors should be displayed decrease the log level to 2\+:

\begin{DoxyVerb}  export EO_LIFECYCLE_DEBUG=1
  export EINA_LOG_LEVELS=eo_lifecycle:2  # just critical, error and warning
  eo_debug my_app
* \end{DoxyVerb}


Keep in mind that the log will consume memory for all objects and that main loop primitives such as timers, jobs, promises and futures are all objects. If created in large numbers, they will consume large amounts of of memory.

To address log pollution and memory consumption, you can select just a handful classes to be logged using {\ttfamily E\+O\+\_\+\+L\+I\+F\+E\+C\+Y\+C\+L\+E\+\_\+\+D\+E\+B\+UG} with a list of comma-\/separated class names. Use {\ttfamily E\+O\+\_\+\+L\+I\+F\+E\+C\+Y\+C\+L\+E\+\_\+\+D\+E\+B\+UG=1} or {\ttfamily E\+O\+\_\+\+L\+I\+F\+E\+C\+Y\+C\+L\+E\+\_\+\+D\+E\+B\+UG=$\ast$} to log all classes, otherwise just the classes listed will be (whitelist).

\begin{DoxyVerb}  # Log only 2 classes: Efl_Loop and Efl_Net_Dialer_Tcp
  export EO_LIFECYCLE_DEBUG=Efl_Loop,Efl_Net_Dialer_Tcp
  export EINA_LOG_LEVELS=eo_lifecycle:4
  eo_debug my_app
* \end{DoxyVerb}


Another approach is to log all but a few classes, also known as a blacklist. This is done with another environment variable {\ttfamily E\+O\+\_\+\+L\+I\+F\+E\+C\+Y\+C\+L\+E\+\_\+\+N\+O\+\_\+\+D\+E\+B\+UG=class1},class2.

\begin{DoxyVerb}  # Log all but Efl_Loop_Timer
  export EO_LIFECYCLE_NO_DEBUG=Efl_Loop_Timer
  export EINA_LOG_LEVELS=eo_lifecycle:4
  eo_debug my_app
* \end{DoxyVerb}
\hypertarget{eo_main_eo_main_intro_example}{}\section{Introductory Example}\label{eo_main_eo_main_intro_example}
\mbox{\hyperlink{Eo_Tutorial}{Eo Tutorial}} 