From b2a07ca150c96515df83800f078ccef84723a7eb Mon Sep 17 00:00:00 2001 From: Felipe Magno de Almeida Date: Mon, 6 Jun 2016 04:09:23 -0300 Subject: [PATCH] eo-cxx: Remove commented headers --- src/Makefile_Cxx.am | 2 - src/bindings/cxx/eo_cxx/eo_inherit.hh | 155 ------------------ .../cxx/eo_cxx/eo_inherit_bindings.hh | 141 ---------------- 3 files changed, 298 deletions(-) delete mode 100644 src/bindings/cxx/eo_cxx/eo_inherit.hh delete mode 100644 src/bindings/cxx/eo_cxx/eo_inherit_bindings.hh diff --git a/src/Makefile_Cxx.am b/src/Makefile_Cxx.am index 4343b5d875..671db7a158 100644 --- a/src/Makefile_Cxx.am +++ b/src/Makefile_Cxx.am @@ -10,8 +10,6 @@ bindings/cxx/eo_cxx/eo_concrete.hh \ bindings/cxx/eo_cxx/eo_cxx_interop.hh \ bindings/cxx/eo_cxx/eo_event.hh \ bindings/cxx/eo_cxx/Eo.hh \ -bindings/cxx/eo_cxx/eo_inherit.hh \ -bindings/cxx/eo_cxx/eo_inherit_bindings.hh \ bindings/cxx/eo_cxx/eo_init.hh \ bindings/cxx/eo_cxx/eo_ops.hh \ bindings/cxx/eo_cxx/eo_wref.hh \ diff --git a/src/bindings/cxx/eo_cxx/eo_inherit.hh b/src/bindings/cxx/eo_cxx/eo_inherit.hh deleted file mode 100644 index 96ee1dc3bf..0000000000 --- a/src/bindings/cxx/eo_cxx/eo_inherit.hh +++ /dev/null @@ -1,155 +0,0 @@ - -// /// -// /// @file eo_inherit.hh -// /// - -// #ifndef EFL_CXX_EO_INHERIT_HH -// #define EFL_CXX_EO_INHERIT_HH - -// #include -// #include - -// #include - -// #include "eo_ops.hh" -// #include "eo_private.hh" -// #include "eo_cxx_interop.hh" - -// namespace efl { namespace eo { - -// namespace detail { - -// template -// Eo_Class const* create_class(eina::index_sequence); - -// /// @internal -// /// -// /// @brief Find the correct function for the "constructor" -// /// operation and invoke it. -// /// -// /// @param this_ The user data to be passed to the resolved function. -// /// @param args An heterogeneous sequence of arguments. -// /// -// inline EO_VOID_FUNC_BODYV(inherit_constructor, EO_FUNC_CALL(this_), void* this_); - -// } - -// /// @addtogroup Efl_Cxx_API -// /// @{ - -// /// @brief Template-class that allows client code to inherit from -// /// EO C++ Classes without the need to make explicit calls to -// /// EO methods --- that would naturally be necessary to -// /// register itself in the EO Subsystem. -// /// -// /// @param D The derived class -// /// @param O The parent class -// /// @param E Class extensions (either mixins or interfaces) -// /// -// /// The derived class @p D will inherit all EO operations and event -// /// callbacks from the parent class @p P, as well as from the Base -// /// Class (@ref efl::eo::concrete) since every EO C++ Class must -// /// inherit from it. -// /// -// /// efl::eo::inherit makes use of meta-template elements to build (in -// /// compile-time) code capable of registering @p D as an EO -// /// Class within EO Subsystem. Each class is registered -// /// only once upon instantiation of an object of its type. -// /// -// /// @note Function overriding is currently not supported. -// /// -// template -// struct inherit; - -// /// @} - -// /// @addtogroup Efl_Cxx_API -// /// @{ - -// template -// struct inherit -// : detail::operations::template type > ... -// , detail::conversion_operator, E>... -// { -// /// @typedef inherit_base -// /// -// typedef inherit inherit_base; - -// //@{ -// /// @brief Class constructor. -// /// -// /// @ref inherit has a "variadic" constructor implementation that -// /// allows from zero to EFL_MAX_ARGS heterogeneous parameters. -// /// -// template -// inherit(efl::eo::parent_type _p, Args&& ... args) -// { -// _eo_cls = detail::create_class (eina::make_index_sequence()); -// _eo_raw = eo_add_ref(_eo_cls, _p._eo_raw, detail::inherit_constructor(eo_self, this), ::efl::eolian::call_ctors(eo_self, args...)); -// ::efl::eolian::register_ev_del_free_callback(_eo_raw, args...); -// } - -// template -// inherit(Args&& ... args) -// : inherit(::efl::eo::parent = nullptr, std::forward(args)...) -// {} -// //@} - -// /// @brief Class destructor. -// /// -// ~inherit() -// { -// detail::unref(_eo_raw); -// } - -// /// @brief Gets the EO Object corresponding to this EO -// /// C++ Object. -// /// -// /// @return A pointer to the EO Object. -// /// -// Eo* _eo_ptr() const { return _eo_raw; } - -// /// @brief Gets the EO Class corresponding to this EO -// /// C++ Class. -// /// -// /// @return A pointer to the EO Class. -// /// -// Eo_Class const* _eo_class() const { return _eo_cls; } - -// Eo* _release() -// { -// Eo* tmp = _eo_raw; -// _eo_raw = nullptr; -// return tmp; -// } - -// protected: -// /// @brief Copy constructor. -// /// -// inherit(inherit const& other) -// : _eo_cls(other._eo_cls) -// , _eo_raw(other._eo_raw) -// { detail::ref(_eo_raw); } - -// /// @brief Assignment Operator -// /// -// inherit& operator=(inherit const& other) -// { -// _eo_cls = other._eo_cls; -// _eo_raw = other._eo_raw; -// detail::ref(_eo_raw); -// return *this; -// } - -// private: -// Eo_Class const* _eo_cls; ///< The EO Class. -// Eo* _eo_raw; ///< The EO Object. -// }; - -// /// @} - -// } } // namespace efl { namespace eo { - -// #include "eo_inherit_bindings.hh" - -// #endif // EFL_CXX_INHERIT_HH diff --git a/src/bindings/cxx/eo_cxx/eo_inherit_bindings.hh b/src/bindings/cxx/eo_cxx/eo_inherit_bindings.hh deleted file mode 100644 index bb29b9e67a..0000000000 --- a/src/bindings/cxx/eo_cxx/eo_inherit_bindings.hh +++ /dev/null @@ -1,141 +0,0 @@ - -#ifndef EFL_CXX_DETAIL_INHERIT_BINDINGS_HH -#define EFL_CXX_DETAIL_INHERIT_BINDINGS_HH - -#include -#include - -namespace efl { namespace eo { namespace detail { - -/// @addtogroup Efl_Cxx_Detail -/// @{ - -/// @internal -/// -/// @brief Sums up the number of EO Operations of each class -/// passed as argument to the template. -/// -/// @see efl::eo::detail::operation_description_class_size -/// -template -struct operation_description_size; - -template -struct operation_description_size -{ - static const int value = operation_description_class_size::value + - operation_description_size::value; -}; - -template <> -struct operation_description_size<> -{ - static const int value = 0; -}; - -template -void call_varargs(Args...) -{ -} - -/// @internal -/// -/// @brief The procedure that actually is invoked when the constructor -/// of @c D is sought from the EO Subsystem. -/// -/// @param self A pointer to @p obj's private data. -/// @param this_ A void pointer to the opaque EO Class --- -/// passed as user data. -/// -inline -void inherit_constructor_impl(Eo*, Inherit_Private_Data* self, void* this_) -{ - self->this_ = this_; -} - -template -int initialize_operation_description(detail::tag, void*); - -template -struct -operation_description_index -{ - typedef std::tuple tuple_type; - static const std::size_t value = - detail::operation_description_size - < typename std::tuple_element - ::type >::value + - operation_description_index::value; -}; -template -struct -operation_description_index<0u, E...> -{ - static const std::size_t value = 0u; -}; - -/// @internal -/// -/// @brief This function is responsible for declaring a new EO C -/// Class representing @p D within EO Subsystem. -/// -/// @param D The derived class -/// @param P The parent class -/// @param En Class extensions (either mixins or interfaces) -/// @param Args An heterogeneous list of arguments to be passed to the -/// constructor of this class. -/// -/// @see efl::eo::inherit::inherit -/// -template -Eo_Class const* create_class(eina::index_sequence) -{ - static const Eo_Class* my_class = NULL; - static Eo_Op_Description op_descs - [ detail::operation_description_size::value + 2 ]; - - op_descs[detail::operation_description_size::value].func = - reinterpret_cast - ( - &detail::inherit_constructor_impl - ); - op_descs[detail::operation_description_size::value].api_func = - reinterpret_cast - ( - &detail::inherit_constructor - ); - op_descs[detail::operation_description_size::value].op_type = EO_OP_TYPE_REGULAR; - - op_descs[detail::operation_description_size::value+1].func = 0; - op_descs[detail::operation_description_size::value+1].api_func = 0; - op_descs[detail::operation_description_size::value+1].op_type = EO_OP_TYPE_INVALID; - - typedef inherit inherit_type; - using namespace detail; - call_varargs( - initialize_operation_description - (detail::tag(), - &op_descs[operation_description_index::value]) ... - ); - - //locks - if(!my_class) - { - static Eo_Class_Description class_desc = { - EO_VERSION, - "Eo C++ Class", - EO_CLASS_TYPE_REGULAR, - EO_CLASS_DESCRIPTION_OPS(op_descs), - NULL, - sizeof(detail::Inherit_Private_Data), - NULL, - NULL - }; - my_class = detail::do_eo_class_new(class_desc); - } - return my_class; -} - -} } } // namespace efl { namespace eo { namespace detail { - -#endif // EFL_CXX_DETAIL_INHERIT_BINDINGS_HH