#ifndef EFL_GENERATED_ECORE_IDLE_EXITER_HH
#define EFL_GENERATED_ECORE_IDLE_EXITER_HH

extern "C"
{
#include <Efl.h>
}
#include <Eo.hh>

#include <eo_cxx_interop.hh>

extern "C"
{
#include "ecore_idle_exiter.eo.h"
}

#include "eo_base.eo.hh"
#include <Ecore.h>

namespace ecore { namespace idle {

struct exiter;

} }

namespace eo_cxx {

namespace ecore { namespace idle {

struct exiter
{

   static Eo_Class const* _eo_class()
   {
      return(ECORE_IDLE_EXITER_CLASS);
   }

   operator ::ecore::idle::exiter() const;
   operator ::ecore::idle::exiter&();
   operator ::ecore::idle::exiter const&() const;

   template <typename D>
   struct address_of
   {
      operator ::ecore::idle::exiter*() const { return static_cast<::ecore::idle::exiter*>(static_cast<D const*>(this)->p); }
      operator ::ecore::idle::exiter const*() const { return static_cast<::ecore::idle::exiter const*>(static_cast<D const*>(this)->p); }
   };

   template <typename D>
   struct address_const_of
   {
      operator ::ecore::idle::exiter const*() const { return static_cast<::ecore::idle::exiter const*>(static_cast<D const*>(this)->p); }
   };

private:
   Eo* _concrete_eo_ptr() const
   {
      return static_cast<::efl::eo::concrete const*>(static_cast<void const*>(this))->_eo_ptr();
   }

};

} }

}

namespace ecore { namespace idle {

struct exiter
      : ::efl::eo::concrete
      , ::eo_cxx::eo::base
{
   template <typename F_func_>
   struct _c_ecore_idle_exiter_constructor
   {
      typedef typename std::remove_reference<F_func_>::type _no_ref_F_func_;

      _c_ecore_idle_exiter_constructor(F_func_ && func_)
         : _tmp_func_(new F_func_(std::forward<F_func_>(func_)))
      {}
      void operator()()
      {
         ::ecore_idle_exiter_constructor(::efl::eolian::get_callback<Ecore_Task_Cb, _no_ref_F_func_ >(), _tmp_func_);
      }

      _no_ref_F_func_* _tmp_func_;
   };

   template <typename F0>
   exiter(_c_ecore_idle_exiter_constructor<F0> _c0, ::efl::eo::parent_type _p = (::efl::eo::parent = nullptr))
      : exiter(_ctors_call(_c0, _p))
   {}

   /// @brief Eo Constructor.
   ///
   /// Constructs the object from an Eo* pointer stealing its ownership.
   ///
   /// @param eo The Eo object pointer.
   ///
   explicit exiter(Eo* eo)
      : ::efl::eo::concrete(eo)
   {}

   /// @brief nullptr_t Constructor.
   ///
   /// Constructs an empty (null) object.
   ///
   explicit exiter(std::nullptr_t)
      : ::efl::eo::concrete(nullptr)
   {}

   /// @brief Copy Constructor.
   ///
   exiter(exiter const& other)
      : exiter(eo_ref(other._eo_ptr()))
   {}

   ~exiter() {}

/// @brief Constructor.
///
/// @param func 
/// @param data 
///
   template <typename F_func_>
   _c_ecore_idle_exiter_constructor<F_func_> ecore_idle_exiter_constructor(F_func_ && func_) const;


   static Eo_Class const* _eo_class()
   {
      return(ECORE_IDLE_EXITER_CLASS);
   }

   struct address_of
      : ::eo_cxx::ecore::idle::exiter::address_of<address_of>
      , ::eo_cxx::eo::base::address_of<address_of>
      , ::efl::eo::detail::concrete_address_of
   {
      explicit address_of(::ecore::idle::exiter* p)
         : ::efl::eo::detail::concrete_address_of(p)
      {}
   };
   address_of operator&() { return address_of(this); }

   struct address_const_of
      : ::eo_cxx::ecore::idle::exiter::address_const_of<address_const_of>
      , ::eo_cxx::eo::base::address_const_of<address_const_of>
      , ::efl::eo::detail::concrete_address_const_of
   {
      explicit address_const_of(::ecore::idle::exiter const* p)
         : ::efl::eo::detail::concrete_address_const_of(p)
      {}
   };
   address_const_of operator&() const { return address_const_of(this); }

private:
   template <typename F0>
   static Eo* _ctors_call(_c_ecore_idle_exiter_constructor<F0> _c0, ::efl::eo::parent_type _p)
   {
      Eo* _ret_eo = eo_add_ref(ECORE_IDLE_EXITER_CLASS, _p._eo_raw, _c0(); );

      eo_do(_ret_eo,
         eo_event_callback_add(EO_EV_DEL, &::efl::eolian::free_callback_calback<F0>, _c0._tmp_func_));

      return _ret_eo;
   }

      Eo* _concrete_eo_ptr() const { return _eo_ptr(); }
};

static_assert(sizeof(::ecore::idle::exiter) == sizeof(Eo*), "");
static_assert(std::is_standard_layout<::ecore::idle::exiter>::value, "");

} }

template <typename F_func_>
inline ::ecore::idle::exiter::_c_ecore_idle_exiter_constructor<F_func_> ecore::idle::exiter::ecore_idle_exiter_constructor(F_func_ && func_) const
{
   return _c_ecore_idle_exiter_constructor<F_func_>(std::forward<F_func_>(func_));
}

inline ::eo_cxx::ecore::idle::exiter::operator ::ecore::idle::exiter() const
{
   return *static_cast<::ecore::idle::exiter const*>(static_cast<void const*>(this));
}

inline ::eo_cxx::ecore::idle::exiter::operator ::ecore::idle::exiter&()
{
   return *static_cast<::ecore::idle::exiter*>(static_cast<void*>(this));
}

inline ::eo_cxx::ecore::idle::exiter::operator ::ecore::idle::exiter const&() const
{
   return *static_cast<::ecore::idle::exiter const*>(static_cast<void const*>(this));
}

namespace efl { namespace eo { namespace detail {

template<>
struct operations< ::ecore::idle::exiter >
{
   template <typename T>
   struct type
         : virtual operations< ::eo::base >::template type<T>
   {
   };
};


template<>
struct operation_description_class_size< ::ecore::idle::exiter >
{
   static const int value = 0 + operation_description_class_size<::eo::base >::value;
};

template <typename T>
int initialize_operation_description(::efl::eo::detail::tag<::ecore::idle::exiter>
                                 , Eo_Op_Description* ops)
{
   (void)ops;
   initialize_operation_description<T>(::efl::eo::detail::tag<::eo::base>(), &ops[0]);
   return 0;
}
inline void
call_constructor(::efl::eo::detail::tag< ::ecore::idle::exiter >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               ::efl::eo::detail::args_class<::ecore::idle::exiter, ::std::tuple<Ecore_Task_Cb, const void *> > const& args)
{
   (void)args;
   eo_do_super(eo, cls, ::ecore_idle_exiter_constructor(::efl::eolian::to_c(args.get<0>()), ::efl::eolian::to_c(args.get<1>())));
}

inline void
call_constructor(::efl::eo::detail::tag< ::ecore::idle::exiter >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               ::efl::eo::detail::args_class<::ecore::idle::exiter, ::std::tuple<::efl::eo::parent_type> > const& args)
{
   eo_do(eo, ::eo_parent_set(args.get<0>()._eo_raw));
}

inline Eo_Class const* get_eo_class(tag<::ecore::idle::exiter>)
{
   return (ECORE_IDLE_EXITER_CLASS);
}

} } }
#endif // EFL_GENERATED_ECORE_IDLE_EXITER_HH

