summaryrefslogtreecommitdiff
path: root/src/examples/eolian_cxx
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2016-03-03 15:10:13 -0300
committerVitor Sousa <vitorsousasilva@gmail.com>2016-03-03 16:05:40 -0300
commit9cbda57bf03bfdaa5c0379023a05868b2f0986aa (patch)
treedebe60f34d6352ae562a575693289c068fc689b3 /src/examples/eolian_cxx
parent5c7d78d1040b5bdfe6430e84c90d36ab8bf27064 (diff)
eolian-cxx: Fix Eolian C++ constructing methods with new eo_add
Also fix Eolian C++ examples using the new "eo_super".
Diffstat (limited to 'src/examples/eolian_cxx')
-rw-r--r--src/examples/eolian_cxx/colourable_cxx.cc6
-rw-r--r--src/examples/eolian_cxx/colourablesquare_cxx.cc2
-rw-r--r--src/examples/eolian_cxx/eolian_cxx_inherit_01.cc4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/examples/eolian_cxx/colourable_cxx.cc b/src/examples/eolian_cxx/colourable_cxx.cc
index 934a5d0..f1f6bec 100644
--- a/src/examples/eolian_cxx/colourable_cxx.cc
+++ b/src/examples/eolian_cxx/colourable_cxx.cc
@@ -24,14 +24,14 @@ _colourable_eo_base_constructor(Eo *obj, Colourable_Data *self)
24{ 24{
25 EINA_CXX_DOM_LOG_DBG(domain) << __func__ << std::endl; 25 EINA_CXX_DOM_LOG_DBG(domain) << __func__ << std::endl;
26 self->r = self->g = self->b = 0; 26 self->r = self->g = self->b = 0;
27 return eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 27 return eo_constructor(eo_super(obj, MY_CLASS));
28} 28}
29 29
30void 30void
31_colourable_eo_base_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED) 31_colourable_eo_base_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
32{ 32{
33 EINA_CXX_DOM_LOG_DBG(domain) << __func__ << std::endl; 33 EINA_CXX_DOM_LOG_DBG(domain) << __func__ << std::endl;
34 eo_do_super(obj, MY_CLASS, eo_destructor()); 34 eo_destructor(eo_super(obj, MY_CLASS));
35} 35}
36 36
37void 37void
@@ -42,7 +42,7 @@ _colourable_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb)
42 self->r = (rgb & 0x00ff0000) >> 16; 42 self->r = (rgb & 0x00ff0000) >> 16;
43 self->g = (rgb & 0x0000ff00) >> 8; 43 self->g = (rgb & 0x0000ff00) >> 8;
44 self->b = rgb & 0x000000ff; 44 self->b = rgb & 0x000000ff;
45 eo_do_super(obj, MY_CLASS, eo_constructor()); 45 eo_constructor(eo_super(obj, MY_CLASS));
46} 46}
47 47
48void 48void
diff --git a/src/examples/eolian_cxx/colourablesquare_cxx.cc b/src/examples/eolian_cxx/colourablesquare_cxx.cc
index 906183a2..6908f73 100644
--- a/src/examples/eolian_cxx/colourablesquare_cxx.cc
+++ b/src/examples/eolian_cxx/colourablesquare_cxx.cc
@@ -25,7 +25,7 @@ _colourablesquare_size_constructor(Eo *obj, ColourableSquare_Data *self, int siz
25{ 25{
26 self->size = size; 26 self->size = size;
27 EINA_CXX_DOM_LOG_DBG(domain) << __func__ << " [ size = " << size << " ]" << std::endl; 27 EINA_CXX_DOM_LOG_DBG(domain) << __func__ << " [ size = " << size << " ]" << std::endl;
28 eo_do_super(obj, MY_CLASS, eo_constructor()); 28 eo_constructor(eo_super(obj, MY_CLASS));
29} 29}
30 30
31int 31int
diff --git a/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc b/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc
index bdfa3ad..b0fb169 100644
--- a/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc
+++ b/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc
@@ -23,7 +23,7 @@ struct ColourableCircle
23 int colour_get() 23 int colour_get()
24 { 24 {
25 int rgb = 0; 25 int rgb = 0;
26 eo_do_super(_eo_ptr(), _eo_class(), rgb = ::colourable_colour_get()); 26 rgb = ::colourable_colour_get(eo_super(_eo_ptr(), _eo_class()));
27 std::cout << "ColourableCircle::colour_get(" << this << ") ==> " 27 std::cout << "ColourableCircle::colour_get(" << this << ") ==> "
28 << std::hex << rgb << std::endl; 28 << std::hex << rgb << std::endl;
29 return rgb; 29 return rgb;
@@ -52,7 +52,7 @@ struct ColourableBar
52 int colour_get() 52 int colour_get()
53 { 53 {
54 int rgb = 0; 54 int rgb = 0;
55 eo_do_super(_eo_ptr(), _eo_class(), rgb = ::colourable_colour_get()); 55 rgb = ::colourable_colour_get(eo_super(_eo_ptr(), _eo_class()));
56 std::cout << "ColourableBar::colour_get(" << this << ") ==> " 56 std::cout << "ColourableBar::colour_get(" << this << ") ==> "
57 << std::hex << rgb << std::endl; 57 << std::hex << rgb << std::endl;
58 return rgb; 58 return rgb;