Changes between Initial Version and Version 1 of SummaryEFL


Ignore:
Timestamp:
Nov 1, 2009, 7:03:06 PM (15 years ago)
Author:
Thanatermesis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SummaryEFL

    v1 v1  
     1,,SVN revion 2009-11-02 - !r43404,,
     2[[TOC]]
     3
     4'''Important Note''': the included code should be used only as conceptual idea of how something works.
     5
     6
     7== Eina ==
     8
     9=== Accessor ===
     10Accessors allow a random access of the data of a container. They can access an element at any position.
     11
     12=== Arrays ===
     13Create and manage arrays, very fast access to data list.
     14
     15=== Benchmarks ===
     16Allow you to add benchmark framework in a project for timing critical part and detect slow parts of code.
     17
     18=== Convert ===
     19These functions allow you to convert integer or real numbers to string or conversely.
     20
     21=== Cpu ===
     22Get the features of a cpu, like mmx, se, altivec, etc
     23
     24
     25=== File ===
     26 * list the content of a directory, recusrsively or not, and can call a callback function for eachfound file.
     27 * split a path into all the subdirectories that compose it, according to the separator of the file system.
     28
     29=== Hash ===
     30Hash management
     31
     32Hash functions are mostly used to speed up table lookup or data comparison tasks such as finding items in a database, detecting duplicated or similar records in a large file, finding similar stretches in DNA sequences, and so on.
     33
     34=== Rectangle ===
     35Rectangle coordenades and calculations
     36
     37=== Stringshare ===
     38These functions allow you to store one copy of a string, and use it throughout your program.
     39
     40It sounds like micro-optimizing, but profiling has shown this can have a significant impact as you scale the number of copies up. It improves string creation/destruction speed, reduces memory use and decreases memory fragmentation, so a win all-around.
     41
     42=== Trash ===
     43Instead to malloc/free pointers, just put them in the trash, you can reuse it later too, you can free the entire trash later. FIXME: is that ok ?
     44
     45=== List ===
     46Lists management
     47 * for (foreach)
     48 * free lists
     49 * next/prev/last
     50 * append/prepend/*relative
     51 * data get
     52 * counter
     53 * find
     54 * sort
     55 * remove
     56 * promote: move the specified data to the first of the list
     57 * nth: get the nth number of the member in the list
     58 * merge/split
     59 * iterator
     60
     61
     62=== Iterator ===
     63This is like a cursor to access the elements sequentially in a container
     64
     65=== Lalloc ===
     66Lazy Allocator, that is, for lazy developers or ppl that has a cheapo keyboard. FIXME
     67
     68=== Log ===
     69Functions to add logs in your code with level of verbosity control and the management of specific-code logs
     70{{{
     71#!C
     72EINA_LOG_ERR("BIG FAT ERROR!");
     73EINA_LOG_INFO("Message only visible running app with high log level set");
     74EINA_LOG_DBG("Running foo, only with big verbosity");
     75}}}
     76
     77=== Error ===
     78The Eina error module provides a way to manage errors in a simple but powerful way in libraries and modules.
     79
     80You can register your own error messages, and so get the last error message ocurred too.
     81
     82{{{
     83#!C
     84Eina_Error MY_ERROR_NEGATIVE;
     85
     86void *data_new()
     87{
     88   eina_error_set(MY_ERROR_NEGATIVE);
     89   return;
     90}
     91
     92int main(void)
     93{
     94   Eina_Error err;
     95   void *data;
     96
     97   MY_ERROR_NEGATIVE = eina_error_msg_register("Your data is Negative!");
     98
     99   if (err)
     100      printf ("Error is: %s\n", eina_error_msg_get(err));
     101
     102   data = data_new();      // We set the state of an error
     103   err  = eina_error_get(); // We get the message for the ID of the error
     104
     105   if (err)
     106      printf ("Error is: %s\n", eina_error_msg_get(err));
     107}
     108}}}
     109
     110=== Magic ===
     111Magic checks (WTF, better description) FIXME.
     112Add example FIXME
     113
     114
     115=== Matrix Sparse ===
     116What's that for, what means the sparse thing there ? FIXME
     117
     118=== Red & Black Tree ===
     119Self-balancing binary search tree, a data structure, good for use in associative arays, very efficient and fast, removes and insert intelligently the data on the tree, so it is balanced for optimization reasons. FIXME ?
     120
     121=== Memory Pool ===
     122FIXME: description
     123FIXME: elements:
     124 * register/unregister ?
     125 * malloc/realloc ?
     126 * add/del/free ?
     127 * statistics
     128
     129=== Modules ===
     130Which kind of modules ? eina modules so extra libs features ? FIXME
     131
     132=== Safety Checks ===
     133Set of macros to check for parameters or values that should never happen, doesn't abort the program but it logs instead
     134
     135The meant of this is to remove possible segfaults when they will be not so important and continue with the process of program
     136
     137FIXME: is this code good ?
     138{{{
     139#!C
     140EAPI void
     141my_func(Ethumb *e)
     142{
     143   EINA_SAFETY_ON_NULL_RETURN(e); // return if our pointer is null
     144   do_something;
     145}}}
     146
     147
     148=== Tiler ===
     149FIXME: description
     150repetitive fill for rectangles (???)
     151
     152=== MACROS ===
     153FIXME: Add description of these usages:
     154 * EINA_WARN_UNUSED_RESULT
     155 * EINA_ARG_NONNULL
     156 * EINA_DEPRECATED
     157 * EINA_PURE
     158 * EINA_UNLIKELY/LIKELY
     159 * EINA_FALSE/TRUE: equivalent to FALSE/TRUE macros