summaryrefslogtreecommitdiff
path: root/src/examples/eolian_cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/eolian_cxx')
-rw-r--r--src/examples/eolian_cxx/Makefile.am14
-rw-r--r--src/examples/eolian_cxx/colourable.c1
-rw-r--r--src/examples/eolian_cxx/colourable_cxx.cc1
-rw-r--r--src/examples/eolian_cxx/colourablesquare.c1
-rw-r--r--src/examples/eolian_cxx/colourablesquare_cxx.cc1
-rw-r--r--src/examples/eolian_cxx/eolian_cxx_simple_01.cc12
-rw-r--r--src/examples/eolian_cxx/ns_colourable.eo1
-rw-r--r--src/examples/eolian_cxx/ns_colourablesquare.eo1
8 files changed, 12 insertions, 20 deletions
diff --git a/src/examples/eolian_cxx/Makefile.am b/src/examples/eolian_cxx/Makefile.am
index 8b6b68f6dd..f0b82d1da9 100644
--- a/src/examples/eolian_cxx/Makefile.am
+++ b/src/examples/eolian_cxx/Makefile.am
@@ -93,15 +93,15 @@ IMPL = \
93 93
94SRCS = \ 94SRCS = \
95 eolian_cxx_simple_01.cc \ 95 eolian_cxx_simple_01.cc \
96 eolian_cxx_inherit_01.cc \
97 eolian_cxx_callbacks_01.cc \ 96 eolian_cxx_callbacks_01.cc \
98 $(IMPL) 97 $(IMPL)
98# eolian_cxx_inherit_01.cc
99 99
100EXTRA_PROGRAMS = \ 100EXTRA_PROGRAMS = \
101 eolian_cxx_simple_01 \ 101 eolian_cxx_simple_01 \
102 eolian_cxx_simple_01_cxx_impl \ 102 eolian_cxx_simple_01_cxx_impl \
103 eolian_cxx_inherit_01 \
104 eolian_cxx_callbacks_01 103 eolian_cxx_callbacks_01
104# eolian_cxx_inherit_01
105 105
106DATA_FILES = Makefile.examples $(ECXX_EXAMPLE_EOS) 106DATA_FILES = Makefile.examples $(ECXX_EXAMPLE_EOS)
107EXTRA_DIST = $(DATA_FILES) 107EXTRA_DIST = $(DATA_FILES)
@@ -120,11 +120,11 @@ eolian_cxx_simple_01_cxx_impl_SOURCES = \
120 colourablesquare_cxx.cc 120 colourablesquare_cxx.cc
121eolian_cxx_simple_01_cxx_impl.$(OBJEXT): $(GENERATED) 121eolian_cxx_simple_01_cxx_impl.$(OBJEXT): $(GENERATED)
122 122
123eolian_cxx_inherit_01_SOURCES = \ 123# eolian_cxx_inherit_01_SOURCES = \
124 eolian_cxx_inherit_01.cc \ 124# eolian_cxx_inherit_01.cc \
125 colourable.c \ 125# colourable.c \
126 colourablesquare.c 126# colourablesquare.c
127eolian_cxx_inherit_01.$(OBJEXT): $(GENERATED) 127# eolian_cxx_inherit_01.$(OBJEXT): $(GENERATED)
128 128
129eolian_cxx_callbacks_01_SOURCES = eolian_cxx_callbacks_01.cc 129eolian_cxx_callbacks_01_SOURCES = eolian_cxx_callbacks_01.cc
130 130
diff --git a/src/examples/eolian_cxx/colourable.c b/src/examples/eolian_cxx/colourable.c
index dd2cc11833..04c233a2d7 100644
--- a/src/examples/eolian_cxx/colourable.c
+++ b/src/examples/eolian_cxx/colourable.c
@@ -63,7 +63,6 @@ _ns_colourable_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb)
63 self->g = (rgb & 0x0000ff00) >> 8; 63 self->g = (rgb & 0x0000ff00) >> 8;
64 self->b = rgb & 0x000000ff; 64 self->b = rgb & 0x000000ff;
65 DBG("_ns_colourable_rgb_24bits_constructor(0x%.6x)\n", (int)rgb); 65 DBG("_ns_colourable_rgb_24bits_constructor(0x%.6x)\n", (int)rgb);
66 eo_constructor(eo_super(obj, MY_CLASS));
67} 66}
68 67
69void 68void
diff --git a/src/examples/eolian_cxx/colourable_cxx.cc b/src/examples/eolian_cxx/colourable_cxx.cc
index 513e3dc4ba..30f1bb318f 100644
--- a/src/examples/eolian_cxx/colourable_cxx.cc
+++ b/src/examples/eolian_cxx/colourable_cxx.cc
@@ -42,7 +42,6 @@ _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_constructor(eo_super(obj, MY_CLASS));
46} 45}
47 46
48void 47void
diff --git a/src/examples/eolian_cxx/colourablesquare.c b/src/examples/eolian_cxx/colourablesquare.c
index f367c59ae4..f67d3e2ff1 100644
--- a/src/examples/eolian_cxx/colourablesquare.c
+++ b/src/examples/eolian_cxx/colourablesquare.c
@@ -35,7 +35,6 @@ _ns_colourablesquare_size_constructor(Eo *obj, ColourableSquare_Data *self, int
35 } 35 }
36 self->size = size; 36 self->size = size;
37 DBG("_ns_colourablesquare_constructor(%d)\n", size); 37 DBG("_ns_colourablesquare_constructor(%d)\n", size);
38 eo_constructor(eo_super(obj, MY_CLASS));
39} 38}
40 39
41static int 40static int
diff --git a/src/examples/eolian_cxx/colourablesquare_cxx.cc b/src/examples/eolian_cxx/colourablesquare_cxx.cc
index b4c92b8e88..ecaf757ac7 100644
--- a/src/examples/eolian_cxx/colourablesquare_cxx.cc
+++ b/src/examples/eolian_cxx/colourablesquare_cxx.cc
@@ -25,7 +25,6 @@ _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_constructor(eo_super(obj, MY_CLASS));
29} 28}
30 29
31int 30int
diff --git a/src/examples/eolian_cxx/eolian_cxx_simple_01.cc b/src/examples/eolian_cxx/eolian_cxx_simple_01.cc
index 0bf9642284..eb093d904b 100644
--- a/src/examples/eolian_cxx/eolian_cxx_simple_01.cc
+++ b/src/examples/eolian_cxx/eolian_cxx_simple_01.cc
@@ -18,15 +18,13 @@ main()
18 eina_log_domain_level_set("colourablesquare", EINA_LOG_LEVEL_DBG); 18 eina_log_domain_level_set("colourablesquare", EINA_LOG_LEVEL_DBG);
19 19
20 int r, g, b; 20 int r, g, b;
21 ::ns::Colourable obj1( 21 ::ns::Colourable obj1
22 obj1.rgb_24bits_constructor(0x123456) 22 ([&] { obj1.rgb_24bits_constructor(0x123456); });
23 );
24 obj1.colour_set(0xc0ffee); 23 obj1.colour_set(0xc0ffee);
25 obj1.composite_colour_get(&r, &g, &b); 24 obj1.composite_colour_get(r, g, b);
26 25
27 ::ns::ColourableSquare obj2( 26 ::ns::ColourableSquare obj2
28 obj2.size_constructor(10) 27 ([&] { obj2.size_constructor(10); });
29 );
30 obj2.composite_colour_set(r, g, b); 28 obj2.composite_colour_set(r, g, b);
31 obj2.size_set(11); 29 obj2.size_set(11);
32 assert(obj1.colour_get() == obj2.colour_get()); 30 assert(obj1.colour_get() == obj2.colour_get());
diff --git a/src/examples/eolian_cxx/ns_colourable.eo b/src/examples/eolian_cxx/ns_colourable.eo
index 90abc65ae8..21af926274 100644
--- a/src/examples/eolian_cxx/ns_colourable.eo
+++ b/src/examples/eolian_cxx/ns_colourable.eo
@@ -1,7 +1,6 @@
1class Ns.Colourable (Eo.Base) 1class Ns.Colourable (Eo.Base)
2{ 2{
3 [[Colourable class.]] 3 [[Colourable class.]]
4 legacy_prefix: legacy;
5 data: Colourable_Data; 4 data: Colourable_Data;
6 methods { 5 methods {
7 rgb_24bits_constructor { 6 rgb_24bits_constructor {
diff --git a/src/examples/eolian_cxx/ns_colourablesquare.eo b/src/examples/eolian_cxx/ns_colourablesquare.eo
index 70fb471e1f..66fe8ae5cd 100644
--- a/src/examples/eolian_cxx/ns_colourablesquare.eo
+++ b/src/examples/eolian_cxx/ns_colourablesquare.eo
@@ -1,6 +1,5 @@
1class Ns.ColourableSquare (Ns.Colourable) 1class Ns.ColourableSquare (Ns.Colourable)
2{ 2{
3 legacy_prefix: legacy;
4 data: ColourableSquare_Data; 3 data: ColourableSquare_Data;
5 methods { 4 methods {
6 @property size { 5 @property size {