summaryrefslogtreecommitdiff
path: root/src/lib/efl
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-28 16:21:40 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-05 15:01:45 +0900
commit09cf28274166bdf8cccc945cbc3b4083af1f9c6c (patch)
tree4ef83774aefac8be324ed07da188f9dc87c768ca /src/lib/efl
parent5d6a5343b7949daf2bdb5c24af8f7dac66519386 (diff)
cxx: Use per-function guards in efl object
This prevents generation of del(). I also removed constructor, finalize and destructor as I believe this requires special work with eo_inherit (where did this work go??).
Diffstat (limited to 'src/lib/efl')
-rw-r--r--src/lib/efl/Efl.hh11
-rw-r--r--src/lib/efl/cxx/efl_part_impl.hh33
2 files changed, 13 insertions, 31 deletions
diff --git a/src/lib/efl/Efl.hh b/src/lib/efl/Efl.hh
index a7efc5f8f6..e6473eafce 100644
--- a/src/lib/efl/Efl.hh
+++ b/src/lib/efl/Efl.hh
@@ -1,16 +1,9 @@
1#ifndef EFL_EFL_HH 1#ifndef EFL_EFL_HH
2#define EFL_EFL_HH 2#define EFL_EFL_HH
3 3
4#ifdef EFL_BETA_API_SUPPORT 4#include "cxx/efl_part_impl.hh"
5
6#define EFL_PART_IMPL_HH
7#define EFL_OBJECT_BETA
8#define EFL_OBJECT_PROTECTED
9 5
6#include <Eo.hh>
10#include <Efl.eo.hh> 7#include <Efl.eo.hh>
11#include "cxx/efl_part_impl.hh"
12 8
13#endif 9#endif
14#endif
15
16
diff --git a/src/lib/efl/cxx/efl_part_impl.hh b/src/lib/efl/cxx/efl_part_impl.hh
index c1c99e785a..f40292c6e0 100644
--- a/src/lib/efl/cxx/efl_part_impl.hh
+++ b/src/lib/efl/cxx/efl_part_impl.hh
@@ -1,26 +1,15 @@
1//#ifndef EFL_PART_IMPL_HH 1#ifndef EFL_PART_MANUAL_IMPL_HH
2//#define EFL_PART_IMPL_HH 2#define EFL_PART_MANUAL_IMPL_HH
3 3
4namespace efl { 4#define EOLIAN_CXX_EFL_PART_DECLARATION \
5inline ::efl::eolian::return_traits< ::efl::Object>::type Part::part( ::efl::eolian::in_traits< ::efl::eina::string_view>::type name) const 5 ::efl::Object part(::efl::eina::string_view const& name) const;
6{
7 Eo *handle = ::efl_part(this->_eo_ptr(), name.c_str());
8 ::efl_auto_unref_set(handle, false);
9 return ::efl::Object{handle};
10}
11}
12 6
13namespace eo_cxx { 7#define EOLIAN_CXX_EFL_PART_IMPLEMENTATION \
14namespace efl { 8inline ::efl::Object Part::part(::efl::eina::string_view const& name) const \
15inline ::efl::eolian::return_traits< ::efl::Object>::type Part::part( ::efl::eolian::in_traits< ::efl::eina::string_view>::type name) const 9{ \
16{ 10 ::Eo *handle = ::efl_part(_eo_ptr(), name.c_str()); \
17 Eo *handle = ::efl_part(this->_eo_ptr(), name.c_str()); 11 ::efl_auto_unref_set(handle, false); \
18 ::efl_auto_unref_set(handle, false); 12 return ::efl::Object{handle}; \
19 return ::efl::Object{handle};
20} 13}
21inline efl::Part::operator ::efl::Part() const { return *static_cast< ::efl::Part const*>(static_cast<void const*>(this)); }
22inline efl::Part::operator ::efl::Part&() { return *static_cast< ::efl::Part*>(static_cast<void*>(this)); }
23inline efl::Part::operator ::efl::Part const&() const { return *static_cast< ::efl::Part const*>(static_cast<void const*>(this)); }
24} }
25 14
26//#endif 15#endif