summaryrefslogtreecommitdiff
path: root/src/examples/eolian_cxx
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-09-12 16:12:04 -0300
committerSavio Sena <savio@expertisesolutions.com.br>2014-09-12 16:12:04 -0300
commit1eb8967deea3962c893a0734bd9fcd50b2da7037 (patch)
treee6dc006d47124ea816090f21f5f06c9f710f4620 /src/examples/eolian_cxx
parentb2d8a216f1c7d9068b1ee41cc500ee93ce2f7057 (diff)
eolian-cxx: Update examples syntax and fix implementation accordingly.
Diffstat (limited to 'src/examples/eolian_cxx')
-rw-r--r--src/examples/eolian_cxx/colourable.c4
-rw-r--r--src/examples/eolian_cxx/colourable.eo9
-rw-r--r--src/examples/eolian_cxx/colourable_cxx.cc4
-rw-r--r--src/examples/eolian_cxx/colourable_stub.h3
-rw-r--r--src/examples/eolian_cxx/colourablesquare.eo12
5 files changed, 16 insertions, 16 deletions
diff --git a/src/examples/eolian_cxx/colourable.c b/src/examples/eolian_cxx/colourable.c
index 5b33566..a677f64 100644
--- a/src/examples/eolian_cxx/colourable.c
+++ b/src/examples/eolian_cxx/colourable.c
@@ -27,7 +27,7 @@ struct _Colourable_Data
27typedef struct _Colourable_Data Colourable_Data; 27typedef struct _Colourable_Data Colourable_Data;
28 28
29void 29void
30_colourable_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED) 30_colourable_eo_base_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
31{ 31{
32 if(!_colourable_impl_logdomain) 32 if(!_colourable_impl_logdomain)
33 { 33 {
@@ -39,7 +39,7 @@ _colourable_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
39} 39}
40 40
41void 41void
42_colourable_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED) 42_colourable_eo_base_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
43{ 43{
44 if(_colourable_impl_logdomain) 44 if(_colourable_impl_logdomain)
45 { 45 {
diff --git a/src/examples/eolian_cxx/colourable.eo b/src/examples/eolian_cxx/colourable.eo
index a262387..e0b011b 100644
--- a/src/examples/eolian_cxx/colourable.eo
+++ b/src/examples/eolian_cxx/colourable.eo
@@ -4,10 +4,6 @@ class Colourable (Eo.Base)
4 legacy_prefix: legacy; 4 legacy_prefix: legacy;
5 data: Colourable_Data; 5 data: Colourable_Data;
6 methods { 6 methods {
7 constructor {
8 /*@ Default constructor. */
9 legacy: null;
10 }
11 rgb_composite_constructor { 7 rgb_composite_constructor {
12 /*@ Composite RGB Constructor. */ 8 /*@ Composite RGB Constructor. */
13 legacy: null; 9 legacy: null;
@@ -59,8 +55,11 @@ class Colourable (Eo.Base)
59 } 55 }
60 } 56 }
61 } 57 }
58 implements {
59 Eo.Base.constructor;
60 Eo.Base.destructor;
61 }
62 constructors { 62 constructors {
63 .constructor;
64 .rgb_composite_constructor; 63 .rgb_composite_constructor;
65 .rgb_24bits_constructor; 64 .rgb_24bits_constructor;
66 } 65 }
diff --git a/src/examples/eolian_cxx/colourable_cxx.cc b/src/examples/eolian_cxx/colourable_cxx.cc
index 8de02aa..4d9ef78 100644
--- a/src/examples/eolian_cxx/colourable_cxx.cc
+++ b/src/examples/eolian_cxx/colourable_cxx.cc
@@ -20,7 +20,7 @@ extern "C"
20static efl::eina::log_domain domain("colourable"); 20static efl::eina::log_domain domain("colourable");
21 21
22void 22void
23_colourable_constructor(Eo *obj, Colourable_Data *self) 23_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;
@@ -28,7 +28,7 @@ _colourable_constructor(Eo *obj, Colourable_Data *self)
28} 28}
29 29
30void 30void
31_colourable_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_do_super(obj, MY_CLASS, eo_destructor());
diff --git a/src/examples/eolian_cxx/colourable_stub.h b/src/examples/eolian_cxx/colourable_stub.h
index fbf913f..ae3ac94 100644
--- a/src/examples/eolian_cxx/colourable_stub.h
+++ b/src/examples/eolian_cxx/colourable_stub.h
@@ -13,7 +13,8 @@ struct _Colourable_Data
13}; 13};
14typedef struct _Colourable_Data Colourable_Data; 14typedef struct _Colourable_Data Colourable_Data;
15 15
16void _colourable_constructor(Eo *obj, Colourable_Data *self); 16void _colourable_eo_base_constructor(Eo *obj, Colourable_Data *self);
17void _colourable_eo_base_destructor(Eo *obj, Colourable_Data *self);
17void _colourable_rgb_composite_constructor(Eo *obj, Colourable_Data *self, int r, int g, int b); 18void _colourable_rgb_composite_constructor(Eo *obj, Colourable_Data *self, int r, int g, int b);
18void _colourable_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb); 19void _colourable_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb);
19void _colourable_print_colour(Eo *obj, Colourable_Data *self); 20void _colourable_print_colour(Eo *obj, Colourable_Data *self);
diff --git a/src/examples/eolian_cxx/colourablesquare.eo b/src/examples/eolian_cxx/colourablesquare.eo
index f21f7b4..1ee4e47 100644
--- a/src/examples/eolian_cxx/colourablesquare.eo
+++ b/src/examples/eolian_cxx/colourablesquare.eo
@@ -3,12 +3,6 @@ class ColourableSquare (Colourable)
3 legacy_prefix: legacy; 3 legacy_prefix: legacy;
4 data: ColourableSquare_Data; 4 data: ColourableSquare_Data;
5 properties { 5 properties {
6 size_constructor {
7 legacy: null;
8 params {
9 @in int size;
10 }
11 }
12 size { 6 size {
13 set { 7 set {
14 /*@ Sets size. */ 8 /*@ Sets size. */
@@ -22,6 +16,12 @@ class ColourableSquare (Colourable)
22 } 16 }
23 } 17 }
24 methods { 18 methods {
19 size_constructor {
20 legacy: null;
21 params {
22 @in int size;
23 }
24 }
25 size_print { /*@ Show the square. */ } 25 size_print { /*@ Show the square. */ }
26 } 26 }
27 constructors { 27 constructors {