#ifndef EFL_GENERATED_EVAS_POLYGON_HH
#define EFL_GENERATED_EVAS_POLYGON_HH

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

#include <eo_cxx_interop.hh>

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

#include "evas_object.eo.hh"

namespace evas {

struct polygon;

}

namespace eo_cxx {

namespace evas {

struct polygon
{
   /// @brief Adds the given point to the given evas polygon object.
   /// @ingroup Evas_Polygon_Group
   ///
   /// @param x The X coordinate of the given point.
   /// @param y The Y coordinate of the given point.
   ///
   void point_add(Evas_Coord x_, Evas_Coord y_) const;


   /// @brief Removes all of the points from the given evas polygon object.
   ///
   void points_clear() const;



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

   operator ::evas::polygon() const;
   operator ::evas::polygon&();
   operator ::evas::polygon const&() const;

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

   template <typename D>
   struct address_const_of
   {
      operator ::evas::polygon const*() const { return static_cast<::evas::polygon 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 evas {

struct polygon
      : ::efl::eo::concrete
      , ::eo_cxx::eo::base
      , ::eo_cxx::evas::common_interface
      , ::eo_cxx::evas::object
{
   polygon(::efl::eo::parent_type _p = (::efl::eo::parent = nullptr))
      : polygon(_ctors_call(_p))
   {}

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

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

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

   ~polygon() {}

   /// @brief Adds the given point to the given evas polygon object.
   /// @ingroup Evas_Polygon_Group
   ///
   /// @param x The X coordinate of the given point.
   /// @param y The Y coordinate of the given point.
   ///
   void point_add(Evas_Coord x_, Evas_Coord y_) const;


   /// @brief Removes all of the points from the given evas polygon object.
   ///
   void points_clear() const;



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

   struct address_of
      : ::eo_cxx::evas::polygon::address_of<address_of>
      , ::eo_cxx::eo::base::address_of<address_of>
      , ::eo_cxx::evas::common_interface::address_of<address_of>
      , ::eo_cxx::evas::object::address_of<address_of>
      , ::efl::eo::detail::concrete_address_of
   {
      explicit address_of(::evas::polygon* p)
         : ::efl::eo::detail::concrete_address_of(p)
      {}
   };
   address_of operator&() { return address_of(this); }

   struct address_const_of
      : ::eo_cxx::evas::polygon::address_const_of<address_const_of>
      , ::eo_cxx::eo::base::address_const_of<address_const_of>
      , ::eo_cxx::evas::common_interface::address_const_of<address_const_of>
      , ::eo_cxx::evas::object::address_const_of<address_const_of>
      , ::efl::eo::detail::concrete_address_const_of
   {
      explicit address_const_of(::evas::polygon const* p)
         : ::efl::eo::detail::concrete_address_const_of(p)
      {}
   };
   address_const_of operator&() const { return address_const_of(this); }

private:
   static Eo* _ctors_call(::efl::eo::parent_type _p)
   {
      Eo* _ret_eo = eo_add_ref(EVAS_POLYGON_CLASS, _p._eo_raw, );

      return _ret_eo;
   }

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

static_assert(sizeof(::evas::polygon) == sizeof(Eo*), "");
static_assert(std::is_standard_layout<::evas::polygon>::value, "");

}

inline void evas::polygon::point_add(Evas_Coord x_, Evas_Coord y_) const
{
   eo_do(_concrete_eo_ptr(), ::evas_obj_polygon_point_add(x_, y_));
}


inline void evas::polygon::points_clear() const
{
   eo_do(_concrete_eo_ptr(), ::evas_obj_polygon_points_clear());
}


inline void eo_cxx::evas::polygon::point_add(Evas_Coord x_, Evas_Coord y_) const
{
   eo_do(_concrete_eo_ptr(), ::evas_obj_polygon_point_add(x_, y_));
}


inline void eo_cxx::evas::polygon::points_clear() const
{
   eo_do(_concrete_eo_ptr(), ::evas_obj_polygon_points_clear());
}


inline ::eo_cxx::evas::polygon::operator ::evas::polygon() const
{
   return *static_cast<::evas::polygon const*>(static_cast<void const*>(this));
}

inline ::eo_cxx::evas::polygon::operator ::evas::polygon&()
{
   return *static_cast<::evas::polygon*>(static_cast<void*>(this));
}

inline ::eo_cxx::evas::polygon::operator ::evas::polygon const&() const
{
   return *static_cast<::evas::polygon const*>(static_cast<void const*>(this));
}

template <typename T>
void evas_polygon_point_add_wrapper(Eo* objid EINA_UNUSED, ::efl::eo::detail::Inherit_Private_Data* self, Evas_Coord x_, Evas_Coord y_)
{
   try
      {
         static_cast<T*>(self->this_)->point_add(x_, y_);
      }
   catch (...)
      {
         eina_error_set( ::efl::eina::unknown_error() );
      }
}

template <typename T>
void evas_polygon_points_clear_wrapper(Eo* objid EINA_UNUSED, ::efl::eo::detail::Inherit_Private_Data* self)
{
   try
      {
         static_cast<T*>(self->this_)->points_clear();
      }
   catch (...)
      {
         eina_error_set( ::efl::eina::unknown_error() );
      }
}

namespace efl { namespace eo { namespace detail {

template<>
struct operations< ::evas::polygon >
{
   template <typename T>
   struct type
         : virtual operations< ::evas::object >::template type<T>
   {
      virtual void point_add(Evas_Coord x_, Evas_Coord y_)
      {

         eo_do_super(dynamic_cast<T*>(this)->_eo_ptr(),
               dynamic_cast<T*>(this)->_eo_class(),
               ::evas_obj_polygon_point_add(x_, y_));
      }

      virtual void points_clear()
      {

         eo_do_super(dynamic_cast<T*>(this)->_eo_ptr(),
               dynamic_cast<T*>(this)->_eo_class(),
               ::evas_obj_polygon_points_clear());
      }

   };
};


template<>
struct operation_description_class_size< ::evas::polygon >
{
   static const int value = 2 + operation_description_class_size<::evas::object >::value;
};

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

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

   initialize_operation_description<T>(::efl::eo::detail::tag<::evas::object>(), &ops[2]);
   return 0;
}
inline void
call_constructor(::efl::eo::detail::tag< ::evas::polygon >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               ::efl::eo::detail::args_class<::evas::polygon, ::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<::evas::polygon>)
{
   return (EVAS_POLYGON_CLASS);
}

} } }
#endif // EFL_GENERATED_EVAS_POLYGON_HH

