summaryrefslogtreecommitdiff
path: root/src/examples/eolian_cxx
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2014-12-19 14:34:15 -0200
committerVitor Sousa <vitorsousasilva@gmail.com>2015-01-05 15:52:27 -0200
commit6519ae6ed98789857722cd1d6e3c1c254ad229e7 (patch)
treed31f19962327a4baf92c0694da724aa32b3c2c2d /src/examples/eolian_cxx
parented75aa32d6ccdea66a952ed5c82203b0cd1961b2 (diff)
eolian_cxx: Fix "dreaded diamond" inheritance problem for C++ wrappers
Solved diamond inheritance problem by completely removing inheritance in the abstract class. All ancestors are inherited directly in the concrete class. The algorithm that list the ancestors also avoid repetition. Now concrete classes define methods too. This helps referring the correct method directly by the object type (when there are methods with the same name). Moved the declaration and definition of constructor methods to the concrete class, since they should not be used in derived classes. Updated example that call "color_set". With this model, if two ancestor classes have a method with the same name, to call one of them from a derived class you must write the scoped name of the member function in the wrapper. In this case, either Evas.Object and Evas.SmartObject have a property named "color". Added "from_global" option to the full_name grammar too.
Diffstat (limited to 'src/examples/eolian_cxx')
-rw-r--r--src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc b/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc
index 264ece2..8dd5d29 100644
--- a/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc
+++ b/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc
@@ -74,7 +74,7 @@ example_complex_types()
74 74
75 efl::evas::grid grid(efl::eo::parent = canvas); 75 efl::evas::grid grid(efl::eo::parent = canvas);
76 grid.position_set(0, 0); 76 grid.position_set(0, 0);
77 grid.color_set(0, 0, 0, 255); 77 grid.object_smart::color_set(0, 0, 0, 255);
78 grid.size_set(5, 5); 78 grid.size_set(5, 5);
79 grid.visibility_set(true); 79 grid.visibility_set(true);
80 80