#ifndef EFL_GENERATED_ECORE_POLLER_HH
#define EFL_GENERATED_ECORE_POLLER_HH

#include <Eo.hh>

#include <eo_cxx_interop.hh>

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

#include <Ecore.h>

namespace ecore { 

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

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

   poller(efl::eo::parent_type _p = (efl::eo::parent = nullptr))
      : poller(_c0(_p))
   {}

   /// @param type 
   /// @param interval 
   /// @param func 
   /// @param data 
   ///
   template <typename F>
   poller(Ecore_Poller_Type type_, int interval_, F && func_, efl::eo::parent_type _p = (efl::eo::parent = nullptr))
      : poller(_c1(type_, interval_, std::forward<F>(func_), _p))
   {}

   /// @brief Copy Constructor.
   ///
   poller(poller const& other)
      : efl::eo::base(eo_ref(other._eo_ptr()))
   {}

   ~poller() {}

   /// @param interval The tick interval to set; must be a power of 2 and <= 32768.
   ///
   int interval_get() const
   {
      int _tmp_ret;
      eo_do(_eo_ptr(), _tmp_ret = ::ecore_poller_interval_get());
      return _tmp_ret;
   }

   /// @param interval The tick interval to set; must be a power of 2 and <= 32768.
   ///
   bool interval_set(int interval_) const
   {
      Eina_Bool _tmp_ret;
      eo_do(_eo_ptr(), _tmp_ret = ::ecore_poller_interval_set(interval_));
      return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
   }

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

private:
   static Eo* _c0(efl::eo::parent_type _p)
   {
      return eo_add_custom(ECORE_POLLER_CLASS, _p._eo_raw, eo_constructor());
   }

   template <typename F>
   static Eo* _c1(Ecore_Poller_Type type_, int interval_, F && func_, efl::eo::parent_type _p)
   {
      typedef typename std::remove_reference<F>::type function_type;
function_type* _tmp_f = new F(std::forward<F>(func_));
      return eo_add_custom(ECORE_POLLER_CLASS, _p._eo_raw, ecore_poller_constructor(type_, interval_, efl::eolian::get_callback<Ecore_Task_Cb, function_type>(), _tmp_f));
   }

};
} 

template <typename T>
int ecore_poller_interval_get_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self)
{
   return static_cast<T*>(self->this_)->interval_get();
}

template <typename T>
bool ecore_poller_interval_set_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self, int interval_)
{
   return static_cast<T*>(self->this_)->interval_set(interval_);
}

namespace efl { namespace eo { namespace detail {

template<>
struct operations< ecore::poller >
{
   template <typename T>
   struct type
   {
      virtual int interval_get()
      {
         int _tmp_ret = {};
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               _tmp_ret = ::ecore_poller_interval_get());
            return _tmp_ret;
      }

      virtual bool interval_set(int interval_)
      {
         Eina_Bool _tmp_ret = {};
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               _tmp_ret = ::ecore_poller_interval_set(interval_));
            return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
      }

   };
};


template<>
struct operation_description_class_size< ecore::poller >
{
   static const int value = 2;
};

template <typename T>
int initialize_operation_description(efl::eo::detail::tag<ecore::poller>
                                 , Eo_Op_Description* ops)
{
   (void)ops;
   ops[0].func = reinterpret_cast<void*>(& ::ecore_poller_interval_get_wrapper<T>);
   ops[0].api_func = reinterpret_cast<void*>(& ::ecore_poller_interval_get);
   ops[0].op = EO_OP_OVERRIDE;
   ops[0].op_type = EO_OP_TYPE_REGULAR;
   ops[0].doc = NULL;

   ops[1].func = reinterpret_cast<void*>(& ::ecore_poller_interval_set_wrapper<T>);
   ops[1].api_func = reinterpret_cast<void*>(& ::ecore_poller_interval_set);
   ops[1].op = EO_OP_OVERRIDE;
   ops[1].op_type = EO_OP_TYPE_REGULAR;
   ops[1].doc = NULL;

   return 0;
}
inline void
call_constructor(tag< ecore::poller >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               args_class<ecore::poller, ::std::tuple<> > const& args)
{
   (void)args;
   eo_do_super(eo, cls, ::eo_constructor());
}

inline void
call_constructor(tag< ecore::poller >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               args_class<ecore::poller, ::std::tuple<Ecore_Poller_Type, int, Ecore_Task_Cb, const void *> > const& args)
{
   (void)args;
   eo_do_super(eo, cls, ::ecore_poller_constructor(::efl::eolian::to_c(args.get<0>()), ::efl::eolian::to_c(args.get<1>()), ::efl::eolian::to_c(args.get<2>()), ::efl::eolian::to_c(args.get<3>())));
}

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

template<>
struct extension_inheritance< ecore::poller>
{
   template <typename U>
   struct type
   {
      operator ecore::poller() const
      {
         return ecore::poller(eo_ref(static_cast<U const*>(this)->_eo_ptr()));
      }

      int interval_get()
      {
         int _tmp_ret = {};
         eo_do(static_cast<U*>(this)->_eo_ptr(), _tmp_ret = ::ecore_poller_interval_get());
            return _tmp_ret;
      }

      bool interval_set(int interval_)
      {
         Eina_Bool _tmp_ret = {};
         eo_do(static_cast<U*>(this)->_eo_ptr(), _tmp_ret = ::ecore_poller_interval_set(interval_));
            return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
      }

   };
};

inline Eo_Class const* get_eo_class(tag<ecore::poller>)
{
   return (ECORE_POLLER_CLASS);
}

} } }
#endif // EFL_GENERATED_ECORE_POLLER_HH

