Hello, On Fri, Sep 6, 2013 at 12:01 PM, Christophe Sadoine <[email protected]> wrote: > On 4 September 2013 15:25, Cedric BAIL <[email protected]> wrote: >> On Wed, Sep 4, 2013 at 5:24 AM, Christophe Sadoine <[email protected]> >> wrote: >>> On 3 September 2013 15:26, Cedric BAIL <[email protected]> wrote: >>>> On Tue, Sep 3, 2013 at 7:04 AM, Christophe Sadoine <[email protected]> >>>> wrote: >>>>> I have some questions concerning eet :) >>>>> >>>>> 1) I have a struct like this: >>>>> >>>>> struct Vec3{ >>>>> double x; >>>>> double y; >>>>> double ; >>>>> } >>>>> >>>>> struct Object { >>>>> Vec3 position; >>>>> Vec3 rotation; >>>>> } >>>>> >>>>> I want to serialize Object. >>>>> >>>>> I have an eet descriptor for Vec3 that I want to use but >>>>> EET_DATA_DESCRIPTOR_ADD_SUB takes a pointer, right? >>>>> I want to avoid using EET_DATA_DESCRIPTOR_ADD_BASIC with position.x, >>>>> position.y, position.z and use the eet descriptor for vec3. >>>>> Is it possible to handle this use case? >>>> >>>> Nop, use macro. I agree it would be nice to have such a feature. >>> >>> Then is it ok to introduce something like: >>> EET_DATA_DESCRIPTOR_ADD_SUB_NESTED and EET_G_UNKNOWN_NESTED? >> >> Could be indeed ! A patch would be welcome :-) > > Here it is. > This patch is only for this feature. > There is also an example. > I don't know eet so I may have missed something.
I think the dump/undump is not handled here, but the rest is pretty straight forward. > I added EET_G_UNKNOWN_NESTED. > I considered just adding a bool in Eet_Data_Element to say nested or > pointed... but then I would have to change/make a new > eet_data_descriptor_element_add function... Yup, that prototype has turned quite hackish overtime... that's life. One day we will do a new API there, but for the time being that's the way of doing it. So I have pushed your patch, it would be nice to integrate your example into the examples tree of efl and also had tests (with dump/undump) if you have time. Thanks, -- Cedric BAIL ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
