From 09cf28274166bdf8cccc945cbc3b4083af1f9c6c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 28 Nov 2017 16:21:40 +0900 Subject: 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??). --- src/lib/efl/cxx/efl_part_impl.hh | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'src/lib/efl/cxx') 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 @@ -//#ifndef EFL_PART_IMPL_HH -//#define EFL_PART_IMPL_HH +#ifndef EFL_PART_MANUAL_IMPL_HH +#define EFL_PART_MANUAL_IMPL_HH -namespace efl { -inline ::efl::eolian::return_traits< ::efl::Object>::type Part::part( ::efl::eolian::in_traits< ::efl::eina::string_view>::type name) const -{ - Eo *handle = ::efl_part(this->_eo_ptr(), name.c_str()); - ::efl_auto_unref_set(handle, false); - return ::efl::Object{handle}; -} -} +#define EOLIAN_CXX_EFL_PART_DECLARATION \ + ::efl::Object part(::efl::eina::string_view const& name) const; -namespace eo_cxx { -namespace efl { -inline ::efl::eolian::return_traits< ::efl::Object>::type Part::part( ::efl::eolian::in_traits< ::efl::eina::string_view>::type name) const -{ - Eo *handle = ::efl_part(this->_eo_ptr(), name.c_str()); - ::efl_auto_unref_set(handle, false); - return ::efl::Object{handle}; +#define EOLIAN_CXX_EFL_PART_IMPLEMENTATION \ +inline ::efl::Object Part::part(::efl::eina::string_view const& name) const \ +{ \ + ::Eo *handle = ::efl_part(_eo_ptr(), name.c_str()); \ + ::efl_auto_unref_set(handle, false); \ + return ::efl::Object{handle}; \ } -inline efl::Part::operator ::efl::Part() const { return *static_cast< ::efl::Part const*>(static_cast(this)); } -inline efl::Part::operator ::efl::Part&() { return *static_cast< ::efl::Part*>(static_cast(this)); } -inline efl::Part::operator ::efl::Part const&() const { return *static_cast< ::efl::Part const*>(static_cast(this)); } -} } -//#endif +#endif -- cgit v1.2.1