path: root/src/examples/eolian_cxx/colourable.c
diff options
authorVitor Sousa <>2014-11-11 20:37:47 -0200
committerVitor Sousa <>2015-01-05 15:52:27 -0200
commit132abc353454a2653b5b2b40d6de5f1689323a37 (patch)
tree2184e0c8361e0da179cf72c1071d2e6be4af9af7 /src/examples/eolian_cxx/colourable.c
parented8ce801cb56644c12b395797c3f9e22a508811f (diff)
eolian_cxx: Fix Eolian C++ generated wrapper inconsistencies
In Reading functions instead of implements to convert the Eolian_Class. It avoids creation of methods that do not belong to the class, in special it avoids calling the default constructor twice in the generated code. No longer generating one constructor in the C++ wrapper for each eolian class constructor, since the correct behavior demands that all constructor should be called. Now the wrappers have "constructor methods" that must be called when creating a new object. Updated test cases and examples to match the new interface. Some class constructors and some test cases have to be removed since they were based on the wrong assumption that constructors are mutually exclusive. Created new generators for forwarding parameters and for looping over the relevant parameters to the C++ wrapper executing a generic lambda. Added a TODO comment regarding the call of constructor methods of all base classes. Currently there is no base type with constructors, so this situation should be discussed more. Added a TODO comment regarding the way callback parameters are being processed.
Diffstat (limited to 'src/examples/eolian_cxx/colourable.c')
1 files changed, 0 insertions, 18 deletions
diff --git a/src/examples/eolian_cxx/colourable.c b/src/examples/eolian_cxx/colourable.c
index a677f640d4..1c7ff5e445 100644
--- a/src/examples/eolian_cxx/colourable.c
+++ b/src/examples/eolian_cxx/colourable.c
@@ -51,24 +51,6 @@ _colourable_eo_base_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
51} 51}
52 52
53void 53void
54_colourable_rgb_composite_constructor(Eo *obj, Colourable_Data *self, int r, int g, int b)
56 if(!_colourable_impl_logdomain)
57 {
58 _colourable_impl_logdomain
59 = eina_log_domain_register("colourable", EINA_COLOR_BLUE);
60 }
61 self->r = r;
62 self->g = g;
63 self->b = b;
64 DBG("_colourable_rgb_composite_constructor(0x%2.x, %0x2.x, %0x2.x)\n",
65 (unsigned int)self->r,
66 (unsigned int)self->g,
67 (unsigned int)self->b);
68 eo_do_super(obj, MY_CLASS, eo_constructor());
72_colourable_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb) 54_colourable_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb)
73{ 55{
74 if(!_colourable_impl_logdomain) 56 if(!_colourable_impl_logdomain)