summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2018-08-23 02:47:47 +0000
committerStefan Schmidt <s.schmidt@samsung.com>2018-08-24 11:42:49 +0200
commit2032e7d787a19fff9688040a0713ca3e8ad15fda (patch)
tree4d1728041d82d24af94e050ff2aa0d6143703d27
parenta806fe3d9923e521130f5a195138008754db4579 (diff)
eolian-cxx: Remove test that can't be implemented
The feature required by this test was removed. When the feature is reincluded with newer syntax the test will be rewritten and readded. Differential Revision: https://phab.enlightenment.org/D6897
-rw-r--r--src/examples/eolian_cxx/eolian_cxx_inherit_01.cc89
1 files changed, 0 insertions, 89 deletions
diff --git a/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc b/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc
deleted file mode 100644
index 5cd6b20596..0000000000
--- a/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc
+++ /dev/null
@@ -1,89 +0,0 @@
1
2#include <iostream>
3#include <cassert>
4
5#ifdef HAVE_CONFIG_H
6# include <config.h>
7#endif
8
9#include "ns_colourable.eo.hh"
10#include "ns_colourablesquare.eo.hh"
11#include "ns_colourable.eo.impl.hh"
12#include "ns_colourablesquare.eo.impl.hh"
13
14#include <eo_inherit.hh>
15
16using namespace efl;
17
18struct ColourableCircle
19 : efl::eo::inherit<ColourableCircle, ::ns::Colourable>
20{
21 ColourableCircle(int rgb)
22 : inherit_base(::ns::Colourable::rgb_24bits_constructor(rgb))
23 {}
24
25 int colour_get()
26 {
27 int rgb = 0;
28 rgb = ::ns_colourable_colour_get(eo_super(_eo_ptr(), _eo_class()));
29 std::cout << "ColourableCircle::colour_get(" << this << ") ==> "
30 << std::hex << rgb << std::endl;
31 return rgb;
32 }
33};
34
35/*
36struct ColourableFoo
37 : efl::eo::inherit<ColourableFoo,
38 ::colourable,
39 ::colourablesquare>
40{
41 ColourableFoo(int size, int rgb)
42 : inherit_base(efl::eo::args<::colourable>(size)
43 , efl::eo::args<::colourablesquare>(rgb))
44 {}
45};*/
46
47struct ColourableBar
48 : efl::eo::inherit<ColourableBar, ::ns::ColourableSquare>
49{
50 ColourableBar()
51 : inherit_base(::ns::Colourable::rgb_24bits_constructor(0))
52 {}
53
54 int colour_get()
55 {
56 int rgb = 0;
57 rgb = ::ns_colourable_colour_get(eo_super(_eo_ptr(), _eo_class()));
58 std::cout << "ColourableBar::colour_get(" << this << ") ==> "
59 << std::hex << rgb << std::endl;
60 return rgb;
61 }
62
63};
64
65int
66main()
67{
68 efl::eo::eo_init init;
69 eina_log_domain_level_set("colourable", EINA_LOG_LEVEL_DBG);
70
71 ColourableCircle obj1(0x0);
72 obj1.composite_colour_set(0xc0, 0xff, 0xee);
73
74 ColourableCircle obj2(0xc0ffee);
75 int r, g, b;
76 obj2.composite_colour_get(&r, &g, &b);
77
78
79 ColourableBar obj3;
80 obj3.composite_colour_get(&r, &g, &b);
81
82 assert(r == 0xc0);
83 assert(g == 0xff);
84 assert(b == 0xee);
85
86 assert(obj1.colour_get() == obj2.colour_get());
87
88 return 0;
89}