#ifndef EFL_GENERATED_EDJE_EDIT_HH
#define EFL_GENERATED_EDJE_EDIT_HH

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

#include <eo_cxx_interop.hh>

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

#include "edje_object.eo.hh"
#include <string>

namespace edje {

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

   /// @brief nullptr_t Constructor.
   ///
   /// Constructs an empty (null) object.
   ///
   explicit edit(std::nullptr_t)
      : edje::object(nullptr)
   {}

   /// @brief Call the object's constructor.
   /// Should not be used with #eo_do. Only use it with #eo_do_super.
   ///
   edit(efl::eo::parent_type _p = (efl::eo::parent = nullptr))
      : edit(_c0(_p))
   {}

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

   ~edit() {}

   /// @brief Deletes a smart object.
   ///
   void del() const
   {
      eo_do(_eo_ptr(), ::evas_obj_smart_del());
   }

   /// @brief Set the source file from where an image object must fetch the real
   /// image data (it may be an Eet file, besides pure image ones).
   ///
   /// If the file supports multiple data stored in it (as Eet files do),
   /// you can specify the key to be used as the index of the image in
   /// this file.
   ///
   /// Example:
   /// @code
   /// img = evas_object_image_add(canvas);
   /// evas_object_image_file_set(img, "/path/to/img", NULL);
   /// err = evas_object_image_load_error_get(img);
   /// if (err != EVAS_LOAD_ERROR_NONE)
   /// {
   /// fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
   /// valid_path, evas_load_error_str(err));
   /// }
   /// else
   /// {
   /// evas_object_image_fill_set(img, 0, 0, w, h);
   /// evas_object_resize(img, w, h);
   /// evas_object_show(img);
   /// }
   /// @endcode
   ///
   /// @param file The image file path.
   /// @param key The image key in @p file (if its an Eet one), or @c
   /// NULL, otherwise.
   ///
   bool file_set(std::string file_, std::string key_) const
   {
      Eina_Bool _tmp_ret;
      eo_do(_eo_ptr(), _tmp_ret = ::efl_file_set(efl::eolian::to_c(file_), efl::eolian::to_c(key_)));
      return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
   }

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

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

};
} 

template <typename T>
void edje_edit_del_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self)
{
   static_cast<T*>(self->this_)->del();
}

template <typename T>
bool edje_edit_file_set_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self, const char * file_, const char * key_)
{
   return static_cast<T*>(self->this_)->file_set(efl::eolian::to_cxx<std::string>(file_, std::tuple<std::false_type>()), efl::eolian::to_cxx<std::string>(key_, std::tuple<std::false_type>()));
}

namespace efl { namespace eo { namespace detail {

template<>
struct operations< edje::edit >
{
   template <typename T>
   struct type
   {
      virtual void del()
      {
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               ::evas_obj_smart_del());
      }

      virtual bool file_set(std::string file_, std::string key_)
      {
         Eina_Bool _tmp_ret = {};
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               _tmp_ret = ::efl_file_set(efl::eolian::to_c(file_), efl::eolian::to_c(key_)));
            return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
      }

   };
};


template<>
struct operation_description_class_size< edje::edit >
{
   static const int value = 2;
};

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

   ops[1].func = reinterpret_cast<void*>(& ::edje_edit_file_set_wrapper<T>);
   ops[1].api_func = reinterpret_cast<void*>(& ::efl_file_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< edje::edit >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               args_class<edje::edit, ::std::tuple<> > const& args)
{
   (void)args;
   eo_do_super(eo, cls, ::eo_constructor());
}

inline void
call_constructor(tag< edje::edit >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               args_class<edje::edit, ::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< edje::edit>
{
   template <typename U>
   struct type
   {
      operator edje::edit() const
      {
         return edje::edit(eo_ref(static_cast<U const*>(this)->_eo_ptr()));
      }

      void del()
      {
         eo_do(static_cast<U*>(this)->_eo_ptr(), ::evas_obj_smart_del());
      }

      bool file_set(std::string file_, std::string key_)
      {
         Eina_Bool _tmp_ret = {};
         eo_do(static_cast<U*>(this)->_eo_ptr(), _tmp_ret = ::efl_file_set(efl::eolian::to_c(file_), efl::eolian::to_c(key_)));
            return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
      }

   };
};

inline Eo_Class const* get_eo_class(tag<edje::edit>)
{
   return (EDJE_EDIT_CLASS);
}

} } }
#endif // EFL_GENERATED_EDJE_EDIT_HH

