From 3e8db298f70932ce7b2f5296d44b262a615ea87c Mon Sep 17 00:00:00 2001 From: Felipe Magno de Almeida Date: Sun, 8 May 2016 12:19:48 -0300 Subject: [PATCH] eolian-cxx: Disable example and fix new naming standard Fixed naming standard in some tests and disabled the callback test while Ecore Eo API is still rapidly changing --- src/examples/eolian_cxx/Makefile.am | 20 ++++++++++---------- src/examples/eolian_cxx/eolian_cxx_callbacks_01.cc | 9 ++++++++- src/examples/eolian_cxx/eolian_cxx_inherit_01.cc | 16 ++++++++-------- src/examples/eolian_cxx/eolian_cxx_simple_01.cc | 12 ++++++------ .../eolian_cxx/{colourable.eo => ns_colourable.eo} | 2 +- .../{colourablesquare.eo => ns_colourablesquare.eo} | 2 +- 6 files changed, 34 insertions(+), 27 deletions(-) rename src/examples/eolian_cxx/{colourable.eo => ns_colourable.eo} (97%) rename src/examples/eolian_cxx/{colourablesquare.eo => ns_colourablesquare.eo} (92%) diff --git a/src/examples/eolian_cxx/Makefile.am b/src/examples/eolian_cxx/Makefile.am index 26e3e4b..bfc44b7 100644 --- a/src/examples/eolian_cxx/Makefile.am +++ b/src/examples/eolian_cxx/Makefile.am @@ -69,21 +69,21 @@ LDADD = \ $(top_builddir)/src/lib/ecore_evas/libecore_evas.la GENERATED = \ - colourable.eo.c \ - colourable.eo.h \ - colourable.eo.hh \ - colourable.eo.impl.hh \ - colourablesquare.eo.c \ - colourablesquare.eo.h \ - colourablesquare.eo.hh \ - colourablesquare.eo.impl.hh + ns_colourable.eo.c \ + ns_colourable.eo.h \ + ns_colourable.eo.hh \ + ns_colourable.eo.impl.hh \ + ns_colourablesquare.eo.c \ + ns_colourablesquare.eo.h \ + ns_colourablesquare.eo.hh \ + ns_colourablesquare.eo.impl.hh BUILT_SOURCES = $(GENERATED) CLEANFILES += $(BUILT_SOURCES) ECXX_EXAMPLE_EOS = \ - colourable.eo \ - colourablesquare.eo + ns_colourable.eo \ + ns_colourablesquare.eo IMPL = \ colourable.c \ diff --git a/src/examples/eolian_cxx/eolian_cxx_callbacks_01.cc b/src/examples/eolian_cxx/eolian_cxx_callbacks_01.cc index c9334bc..9f9845e 100644 --- a/src/examples/eolian_cxx/eolian_cxx_callbacks_01.cc +++ b/src/examples/eolian_cxx/eolian_cxx_callbacks_01.cc @@ -1,3 +1,6 @@ + +// Disabled test while Ecore Eo API is still rapidly changing +#if 0 #include #include #include @@ -56,4 +59,8 @@ int main() return 0; } - +#else +int main() +{ +} +#endif diff --git a/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc b/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc index b0fb169..2fedf12 100644 --- a/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc +++ b/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc @@ -6,24 +6,24 @@ # include #endif -#include "colourable.eo.hh" -#include "colourablesquare.eo.hh" +#include "ns_colourable.eo.hh" +#include "ns_colourablesquare.eo.hh" #include using namespace efl; struct ColourableCircle - : efl::eo::inherit + : efl::eo::inherit { ColourableCircle(int rgb) - : inherit_base(::colourable::rgb_24bits_constructor(rgb)) + : inherit_base(::ns::Colourable::rgb_24bits_constructor(rgb)) {} int colour_get() { int rgb = 0; - rgb = ::colourable_colour_get(eo_super(_eo_ptr(), _eo_class())); + rgb = ::ns_colourable_colour_get(eo_super(_eo_ptr(), _eo_class())); std::cout << "ColourableCircle::colour_get(" << this << ") ==> " << std::hex << rgb << std::endl; return rgb; @@ -43,16 +43,16 @@ struct ColourableFoo };*/ struct ColourableBar - : efl::eo::inherit + : efl::eo::inherit { ColourableBar() - : inherit_base(::colourable::rgb_24bits_constructor(0)) + : inherit_base(::ns::Colourable::rgb_24bits_constructor(0)) {} int colour_get() { int rgb = 0; - rgb = ::colourable_colour_get(eo_super(_eo_ptr(), _eo_class())); + rgb = ::ns_colourable_colour_get(eo_super(_eo_ptr(), _eo_class())); std::cout << "ColourableBar::colour_get(" << this << ") ==> " << std::hex << rgb << std::endl; return rgb; diff --git a/src/examples/eolian_cxx/eolian_cxx_simple_01.cc b/src/examples/eolian_cxx/eolian_cxx_simple_01.cc index 04acebb..0bf9642 100644 --- a/src/examples/eolian_cxx/eolian_cxx_simple_01.cc +++ b/src/examples/eolian_cxx/eolian_cxx_simple_01.cc @@ -7,8 +7,8 @@ # include #endif -#include "colourable.eo.hh" -#include "colourablesquare.eo.hh" +#include "ns_colourable.eo.hh" +#include "ns_colourablesquare.eo.hh" int main() @@ -18,21 +18,21 @@ main() eina_log_domain_level_set("colourablesquare", EINA_LOG_LEVEL_DBG); int r, g, b; - ::colourable obj1( + ::ns::Colourable obj1( obj1.rgb_24bits_constructor(0x123456) ); obj1.colour_set(0xc0ffee); obj1.composite_colour_get(&r, &g, &b); - ::colourablesquare obj2( + ::ns::ColourableSquare obj2( obj2.size_constructor(10) ); obj2.composite_colour_set(r, g, b); obj2.size_set(11); assert(obj1.colour_get() == obj2.colour_get()); - efl::eo::wref<::colourable> ref = obj1; - efl::eina::optional<::colourable> obj3 = ref.lock(); + efl::eo::wref< ::ns::Colourable> ref = obj1; + efl::eina::optional< ::ns::Colourable> obj3 = ref.lock(); assert(obj3); obj3->colour_set(0x00); diff --git a/src/examples/eolian_cxx/colourable.eo b/src/examples/eolian_cxx/ns_colourable.eo similarity index 97% rename from src/examples/eolian_cxx/colourable.eo rename to src/examples/eolian_cxx/ns_colourable.eo index 810ef40..90abc65 100644 --- a/src/examples/eolian_cxx/colourable.eo +++ b/src/examples/eolian_cxx/ns_colourable.eo @@ -1,4 +1,4 @@ -class Colourable (Eo.Base) +class Ns.Colourable (Eo.Base) { [[Colourable class.]] legacy_prefix: legacy; diff --git a/src/examples/eolian_cxx/colourablesquare.eo b/src/examples/eolian_cxx/ns_colourablesquare.eo similarity index 92% rename from src/examples/eolian_cxx/colourablesquare.eo rename to src/examples/eolian_cxx/ns_colourablesquare.eo index f4f4d4c..70fb471 100644 --- a/src/examples/eolian_cxx/colourablesquare.eo +++ b/src/examples/eolian_cxx/ns_colourablesquare.eo @@ -1,4 +1,4 @@ -class ColourableSquare (Colourable) +class Ns.ColourableSquare (Ns.Colourable) { legacy_prefix: legacy; data: ColourableSquare_Data; -- 2.7.4