On Monday 05 August 2013 18:23, Felipe Magno de Almeida wrote : > Hello, Hello, > > Is there any reason in eo2 why the eo wrapper function (the ones > defined by EO2_FUNC_BODY et al) doesn't call the function directly, > instead of registering it with Eo2_Op_Description. Which adds an > unnecessary indirection. yes, it's inheritence and overriding, we need an EAPI func (the one with the body defined by EO2_FUNC_BODY) to resolve it's private func at run time. If you read eo2_simple and eo2_inherit in eo2test, you will see that the EAPI func is declared and defined only once. But the private body exists or not (pure virtual) or is redifined (OVERRIDING) in the class hierarchy. And we have to support do_super as well. > > Also, I've been experimenting with changing Eo to make the class > interface available at preprocessing-time, which allow interesting > uses by preprocessor metaprogramming and/or by custom preprocessors, > without requiring an almost C parser. > > I'm calling Eo3 here just to differentiate (and be able to compile and > link along-side eo2). > > The header would declare the class like this: > > #define EO3_SIMPLE_CLASS eo3_simple \ > , EO3_FUNCTION(inc, _inc, void) \ > , EO3_FUNCTION(get, _get, int) \ > , EO3_FUNCTION(set, _set, void, int) > , EO3_VIRTUAL_FUNCTION(virtual, int, int) > , EO3_STATIC_FUNCTION(hello, int) > > EO3_DECLARE_CLASS(EO3_SIMPLE_CLASS) I strongly pushed in the direction of a as 'classical' as possible header. but still it is interesting. > > And define it doing something like this: > > typedef struct > { > int x; > } Private_Data; > > static void _inc(Eo *objid EINA_UNUSED, Private_Data* self) > { > self->x += 1; > } > static int _get(Eo *objid EINA_UNUSED, Private_Data* self) > { > return self->x; > } > static void _set(Eo *objid EINA_UNUSED, Private_Data* self, int x) > { > self->x = x; > } > > EO3_DEFINE_CLASS(EO3_SIMPLE_CLASS, (EO2_BASE_CLASS), Private_Data) > > Is this syntax interesting? > > Regards, > -- > Felipe Magno de Almeida > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel --- Hell'O from Yverdoom
Jérémy (jeyzu) ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel