On Wed, Jan 11, 2012 at 7:06 AM, Cedric BAIL <cedric.b...@free.fr> wrote: > On Wed, Jan 11, 2012 at 3:20 AM, Enlightenment SVN > <no-re...@enlightenment.org> wrote: >> Log: >> add eina_value. >> >> eina value is a generic value storage, it's quite efficient to space >> (16 bytes) and speed (inlines for basic types). >> >> It's basically a structure describing how to manage memory >> (Eina_Value_Type), with default implementation for char, short, int, >> long, int64_t (and unsigned variants), float, double, stringshare and >> string. >> >> If a type 'value_size' is smaller than 8 bytes, it's stored >> inline. Otherwise a value is allocated and managed. >> >> Most of the methods are inline, with special handling for char, short, >> int... Then no extra calls are made, allowing the compiler to optimize >> them. >> >> For array of a single type it is recommend to use Eina_Value_Array, as >> it will efficiently store and access members (just a char if subtype >> is EINA_VALUE_TYPE_CHAR, etc). >> >> It can copy itself, compare itself. Including arrays. >> >> It would be nice to have something that converts between EET and this. > > Oh yes ! I was never satisfied by the way, we produce an EET Node for > bindings and such. I just need some more feature in eina_value for > that. We do have structure, list, array and hash in EET. I could map > all of them with just iterator and accessor I think. If I could store > them inside an Eina_Value, that would make thinks very easy. I am just > starting to look at the code, so maybe what I am asking is just > stupid. Will see that in a few hours.
that's why I did Eina_Value_Array, to show case how to do it. (and because I'll use it in my next commits). It's also very optimized, an array of chars have COUNT bytes only, not 16 * COUNT. The list would be very similar. For hash and structure it is also similar, you can do like I did for Eina_Value_Array, there are the eina_value_array_* functions that takes an integer, you can take a const void* key. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel