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??).
bindings/cxx/eo_cxx/eo_future.hh \
bindings/cxx/eo_cxx/eo_promise.hh \
bindings/cxx/eo_cxx/eo_promise_meta.hh \
-bindings/cxx/eo_cxx/eo_private.hh
+bindings/cxx/eo_cxx/eo_private.hh \
+bindings/cxx/eo_cxx/efl_object_impl.hh
### Elementary C++
installed_elementarycxxmainheadersdir = $(includedir)/elementary-cxx-@VMAJ@/
#ifndef EFL_CXX_EO_HH
#define EFL_CXX_EO_HH
+#include "efl_object_impl.hh"
+
#include <eo_concrete.hh>
#include <eo_init.hh>
#include <eo_wref.hh>
#include <eo_cxx_interop.hh>
#include <eo_event.hh>
+#include "efl_object.eo.hh"
+#include "efl_object.eo.impl.hh"
+
#endif // EFL_CXX_EO_HH
--- /dev/null
+#ifndef EFL_OBJECT_MANUAL_IMPL_HH
+#define EFL_OBJECT_MANUAL_IMPL_HH
+
+#define EFL_OBJECT_BETA
+#define EFL_OBJECT_PROTECTED
+
+// Skip del. Must be implemented in eo::concrete.
+#define EOLIAN_CXX_EFL_DEL_DECLARATION
+#define EOLIAN_CXX_EFL_DEL_IMPLEMENTATION
+
+// Skip constructor, destructor and finalize.
+#define EOLIAN_CXX_EFL_CONSTRUCTOR_DECLARATION
+#define EOLIAN_CXX_EFL_CONSTRUCTOR_IMPLEMENTATION
+#define EOLIAN_CXX_EFL_DESTRUCTOR_DECLARATION
+#define EOLIAN_CXX_EFL_DESTRUCTOR_IMPLEMENTATION
+#define EOLIAN_CXX_EFL_FINALIZE_DECLARATION
+#define EOLIAN_CXX_EFL_FINALIZE_IMPLEMENTATION
+
+// Skip auto_unref
+#define EOLIAN_CXX_EFL_AUTO_UNREF_SET_DECLARATION
+#define EOLIAN_CXX_EFL_AUTO_UNREF_SET_IMPLEMENTATION
+
+#endif
#ifndef EFL_EFL_HH
#define EFL_EFL_HH
-#ifdef EFL_BETA_API_SUPPORT
-
-#define EFL_PART_IMPL_HH
-#define EFL_OBJECT_BETA
-#define EFL_OBJECT_PROTECTED
+#include "cxx/efl_part_impl.hh"
+#include <Eo.hh>
#include <Efl.eo.hh>
-#include "cxx/efl_part_impl.hh"
#endif
-#endif
-
-
-//#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<void const*>(this)); }
-inline efl::Part::operator ::efl::Part&() { return *static_cast< ::efl::Part*>(static_cast<void*>(this)); }
-inline efl::Part::operator ::efl::Part const&() const { return *static_cast< ::efl::Part const*>(static_cast<void const*>(this)); }
-} }
-//#endif
+#endif
<< "(const_cast<" << string << " *>(this))); }\n"
).generate(sink, cls.cxx_name, context))
return false;
-
+
for (auto&& e : cls.events)
{
if (e.beta)
if(!as_generator( scope_tab << "using ::efl::eo::concrete::_eo_ptr;\n"
<< scope_tab << "using ::efl::eo::concrete::_release;\n"
<< scope_tab << "using ::efl::eo::concrete::_reset;\n"
+ << scope_tab << "using ::efl::eo::concrete::_delete;\n"
<< scope_tab << "using ::efl::eo::concrete::operator bool;\n"
).generate(sink, attributes::unused, context)) return false;
}
if(f.is_beta &&
- !as_generator("#ifdef " << *(string << "_") << string << "_" << string << "_BETA\n")
- .generate(sink, std::make_tuple(_klass_name.namespaces, _klass_name.eolian_name, suffix), add_upper_case_context(ctx)))
+ !as_generator("#ifdef " << *(string << "_") << string << "_BETA\n")
+ .generate(sink, std::make_tuple(_klass_name.namespaces, _klass_name.eolian_name), add_upper_case_context(ctx)))
+ return false;
+ if(f.is_protected &&
+ !as_generator("#ifdef " << *(string << "_") << string << "_PROTECTED\n")
+ .generate(sink, std::make_tuple(_klass_name.namespaces, _klass_name.eolian_name), add_upper_case_context(ctx)))
return false;
if(!as_generator
.generate(sink, f.c_name, add_upper_case_context(ctx)))
return false;
+ if(f.is_protected &&
+ !as_generator("#endif\n").generate(sink, attributes::unused, ctx))
+ return false;
if(f.is_beta &&
!as_generator("#endif\n").generate(sink, attributes::unused, ctx))
return false;