1 /* EINA - EFL data type library
2 * Copyright (C) 2008-2012 Enlightenment Developers:
3 * Albin "Lutin" Tonnerre <albin.tonnerre@gmail.com>
4 * Alexandre "diaxen" Becoulet <diaxen@free.fr>
5 * Andre Dieb <andre.dieb@gmail.com>
6 * Arnaud de Turckheim "quarium" <quarium@gmail.com>
7 * Carsten Haitzler <raster@rasterman.com>
8 * Cedric Bail <cedric.bail@free.fr>
9 * Corey "atmos" Donohoe <atmos@atmos.org>
10 * Fabiano FidĂȘncio <fidencio@profusion.mobi>
11 * Gustavo Chaves <glima@profusion.mobi>
12 * Gustavo Sverzut Barbieri <barbieri@gmail.com>
13 * Jorge Luis "turran" Zapata <jorgeluis.zapata@gmail.com>
14 * Peter "pfritz" Wehrfritz <peter.wehrfritz@web.de>
15 * Raphael Kubo da Costa <kubo@profusion.mobi>
16 * Tilman Sauerbeck <tilman@code-monkey.de>
17 * Vincent "caro" Torri <vtorri at univ-evry dot fr>
18 * Tom Hacohen <tom@stosb.com>
19 * Jonas M. Gastal <jgastal@profusion.mobi>
21 * This library is free software; you can redistribute it and/or
22 * modify it under the terms of the GNU Lesser General Public
23 * License as published by the Free Software Foundation; either
24 * version 2.1 of the License, or (at your option) any later version.
26 * This library is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 * Lesser General Public License for more details.
31 * You should have received a copy of the GNU Lesser General Public
32 * License along with this library;
33 * if not, see <http://www.gnu.org/licenses/>.
41 * @brief Eina Utility library
43 * These routines are used for Eina.
52 * @section eina_intro_sec Introduction
54 * The Eina library is a library that implements an API for data types
55 * in an efficient way. It also provides some useful tools like
56 * opening shared libraries, errors management, type conversion,
57 * time accounting and memory pool.
59 * This library is cross-platform and can be compiled and used on
60 * Linux, BSD, Opensolaris and Windows (XP and CE).
62 * The data types that are available are (see @ref Eina_Data_Types_Group):
63 * @li @ref Eina_Inline_Array_Group standard array of inlined members.
64 * @li @ref Eina_Array_Group standard array of @c void* data.
65 * @li @ref Eina_Hash_Group standard hash of @c void* data.
66 * @li @ref Eina_Inline_List_Group list with nodes inlined into user type.
67 * @li @ref Eina_CList_Group Compact List.
68 * @li @ref Eina_List_Group standard list of @c void* data.
69 * @li @ref Eina_Iterator_Group Iterator functions.
70 * @li @ref Eina_Matrixsparse_Group sparse matrix of @c void* data.
71 * @li @ref Eina_Rbtree_Group red-black tree with nodes inlined into user type.
72 * @li @ref Eina_String_Buffer_Group mutable string to prepend, insert or append strings to a buffer.
73 * @li @ref Eina_Stringshare_Group saves memory by sharing read-only string references.
74 * @li @ref Eina_Tiler_Group split, merge and navigates into 2D tiled regions.
75 * @li @ref Eina_Trash_Group container of unused but allocated data.
76 * @li @ref Eina_Value_Group container for generic value storage and access.
77 * @li @ref Eina_Model_Group container for data with user defined hierarchy/structure.
79 * The tools that are available are (see @ref Eina_Tools_Group):
80 * @li @ref Eina_Benchmark_Group helper to write benchmarks.
81 * @li @ref Eina_Convert_Group faster conversion from strings to integers, double, etc.
82 * @li @ref Eina_Counter_Group measures number of calls and their time.
83 * @li @ref Eina_Error_Group error identifiers.
84 * @li @ref Eina_File_Group simple file list and path split.
85 * @li @ref Eina_Lalloc_Group simple lazy allocator.
86 * @li @ref Eina_Log_Group full-featured logging system.
87 * @li @ref Eina_Magic_Group provides runtime type checking.
88 * @li @ref Eina_Memory_Pool_Group abstraction for various memory allocators.
89 * @li @ref Eina_Module_Group lists, loads and share modules using Eina_Module standard.
90 * @li @ref Eina_Rectangle_Group rectangle structure and standard manipulation methods.
91 * @li @ref Eina_Safety_Checks_Group extra checks that will report unexpected conditions and can be disabled at compile time.
92 * @li @ref Eina_String_Group a set of functions that manages C strings.
94 * Please see the @ref authors page for contact details.
96 * @defgroup Eina_Data_Types_Group Data Types
98 * Eina provide easy to use and optimized data types and structures.
101 * @defgroup Eina_Containers_Group Containers
103 * @section Intro Introduction
104 * Containers are data types that hold data and allow iteration over
105 * their elements with an @ref Eina_Iterator_Group, or eventually an
106 * @ref Eina_Accessor_Group.
108 * The containers in eina are designed with performance in mind, one consequence
109 * of this is that they @b don't check the validity of data structures given to
110 * them(@ref Eina_Magic_Group).
112 * @section Choice Choosing container type
114 * The choice of which container to use in each situation is very important in
115 * achieving good performance and readable code. The most common container types
123 * All types have virtues and vices. The following considerations are good
124 * starting point in deciding which container to use:
125 * @li Hashes are appropriate for datasets which will be searched often;
126 * @li arrays are good when accessing members by position;
127 * @li lists provide good versatility for adding elements in any position with
129 * @li inline arrays use very little memory and don't cause fragmentation and
130 * therefore are a good option in memory constrained systems;
131 * @li inline lists are the appropriate type to use when the flexibility of a
132 * list is required but the overhead of pointer indirection is not acceptable.
133 * @warning These are general considerations, every situation is different,
134 * don't follow these recommendations blindly.
136 * @section Creation Creating custom container types
138 * @note Before creating a custom container check if one of the existing ones
139 * doesn't suit your needs. For example, while there is no stack type @ref
140 * Eina_Array_Group is a very good substitute, similarly there is no queue type
141 * however an @ref Eina_List_Group works very well as a queue.
143 * If creating a custom container type consider allowing access to the data in
144 * your container through @ref Eina_Iterator_Group "Iterators" and @ref
145 * Eina_Accessor_Group "Accessors". To do so your container should have an
146 * iterator creation function and an accessor creation function, these functions
147 * should return properly populated @ref _Eina_Iterator and @ref _Eina_Accessor.
149 * @defgroup Eina_Tools_Group Tools
151 * Eina tools aims to help application development, providing ways to
152 * make it safer, log errors, manage memory more efficiently and more.
158 * @page authors Authors
160 * @author Albin "Lutin" Tonnerre <albin.tonnerre@@gmail.com>
161 * @author Alexandre "diaxen" Becoulet <diaxen@@free.fr>
162 * @author Andre Dieb <andre.dieb@@gmail.com>
163 * @author Arnaud de Turckheim "quarium" <quarium@@gmail.com>
164 * @author Carsten Haitzler <raster@@rasterman.com>
165 * @author Cedric Bail <cedric.bail@@free.fr>
166 * @author Corey "atmos" Donohoe <atmos@@atmos.org>
167 * @author Vincent "caro" Torri <vtorri at univ-evry dot fr>
168 * @author Fabiano FidĂȘncio <fidencio@@profusion.mobi>
169 * @author Gustavo Chaves <glima@@profusion.mobi>
170 * @author Gustavo Sverzut Barbieri <barbieri@@profusion.mobi>
171 * @author Jorge Luis "turran" Zapata <jorgeluis.zapata@@gmail.com>
172 * @author Tilman Sauerbeck <tilman@@code-monkey.de>
173 * @author Peter "pfritz" Wehrfritz <peter.wehrfritz@@web.de>
174 * @author Raphael Kubo da Costa <kubo@@profusion.mobi>
175 * @author Tom Hacohen <tom@@stosb.com>
176 * @author Brett Nash <nash@@nash.id.au>
177 * @author Sebastian Dransfeld <sd@@tango.flipp.net>
178 * @author Myungjae Lee <mjae.lee@@samsung.com>
179 * @author Youness Alaoui <kakaroto@@kakaroto.homelinux.net>
180 * @author Boris "billiob" Faure <billiob@@gmail.com>
181 * @author Sung W. Park <sungwoo@@gmail.com>
182 * @author Guillaume Friloux <guillaume.friloux@@asp64.com>
184 * Please contact <enlightenment-devel@lists.sourceforge.net> to get in
185 * contact with the developers and maintainers.
197 #include "eina_config.h"
198 #include "eina_types.h"
199 #include "eina_main.h"
201 #include "eina_rectangle.h"
202 #include "eina_clist.h"
203 #include "eina_inlist.h"
204 #include "eina_file.h"
205 #include "eina_list.h"
206 #include "eina_hash.h"
207 #include "eina_trash.h"
208 #include "eina_lalloc.h"
209 #include "eina_module.h"
210 #include "eina_mempool.h"
211 #include "eina_error.h"
212 #include "eina_log.h"
213 #include "eina_inarray.h"
214 #include "eina_array.h"
215 #include "eina_binshare.h"
216 #include "eina_stringshare.h"
217 #include "eina_ustringshare.h"
218 #include "eina_magic.h"
219 #include "eina_counter.h"
220 #include "eina_rbtree.h"
221 #include "eina_accessor.h"
222 #include "eina_iterator.h"
223 #include "eina_benchmark.h"
224 #include "eina_convert.h"
225 #include "eina_cpu.h"
226 #include "eina_sched.h"
227 #include "eina_tiler.h"
228 #include "eina_hamster.h"
229 #include "eina_matrixsparse.h"
230 #include "eina_str.h"
231 #include "eina_strbuf.h"
232 #include "eina_binbuf.h"
233 #include "eina_ustrbuf.h"
234 #include "eina_unicode.h"
235 #include "eina_quadtree.h"
236 #include "eina_simple_xml_parser.h"
237 #include "eina_lock.h"
238 #include "eina_prefix.h"
239 #include "eina_refcount.h"
240 #include "eina_mmap.h"
241 #include "eina_xattr.h"
242 #include "eina_value.h"