#ifndef EFL_GENERATED_EFL_TEXT_HH
#define EFL_GENERATED_EFL_TEXT_HH

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

#include <eo_cxx_interop.hh>

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

#include <string>

namespace efl {

struct text;

}

namespace eo_cxx {

namespace efl {

struct text
{
   /// @brief Retrieves the text string currently being displayed by the given
   /// text object.
   ///
   /// @return The text string currently being displayed on it.
   ///
   /// @note Do not free() the return value.
   ///
   /// @see evas_object_text_text_set()
   ///
   /// @param text Text string to display on it.
   ///
   ::efl::eina::optional< std::string > text_get() const;


   /// @brief Sets the text string to be displayed by the given text object.
   ///
   /// @see evas_object_text_text_get()
   ///
   /// @param text Text string to display on it.
   ///
   void text_set(::efl::eina::optional< std::string > text_) const;



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

   operator ::efl::text() const;
   operator ::efl::text&();
   operator ::efl::text const&() const;

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

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

struct text
      : ::efl::eo::concrete
{
   text(::efl::eo::parent_type _p = (::efl::eo::parent = nullptr))
      : text(_ctors_call(_p))
   {}

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

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

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

   ~text() {}

   /// @brief Retrieves the text string currently being displayed by the given
   /// text object.
   ///
   /// @return The text string currently being displayed on it.
   ///
   /// @note Do not free() the return value.
   ///
   /// @see evas_object_text_text_set()
   ///
   /// @param text Text string to display on it.
   ///
   ::efl::eina::optional< std::string > text_get() const;


   /// @brief Sets the text string to be displayed by the given text object.
   ///
   /// @see evas_object_text_text_get()
   ///
   /// @param text Text string to display on it.
   ///
   void text_set(::efl::eina::optional< std::string > text_) const;



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

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

   struct address_const_of
      : ::eo_cxx::efl::text::address_const_of<address_const_of>
      , ::efl::eo::detail::concrete_address_const_of
   {
      explicit address_const_of(::efl::text 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(EFL_TEXT_INTERFACE, _p._eo_raw, );

      return _ret_eo;
   }

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

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

}

inline ::efl::eina::optional< std::string > efl::text::text_get() const
{
   const char * _tmp_ret;
   eo_do(_concrete_eo_ptr(), _tmp_ret = ::efl_text_get());
   return ::efl::eolian::to_cxx<::efl::eina::optional< std::string >>(_tmp_ret, std::tuple<std::false_type>());
}


inline void efl::text::text_set(::efl::eina::optional< std::string > text_) const
{
   eo_do(_concrete_eo_ptr(), ::efl_text_set(::efl::eolian::to_c(text_)));
}


inline ::efl::eina::optional< std::string > eo_cxx::efl::text::text_get() const
{
   const char * _tmp_ret;
   eo_do(_concrete_eo_ptr(), _tmp_ret = ::efl_text_get());
   return ::efl::eolian::to_cxx<::efl::eina::optional< std::string >>(_tmp_ret, std::tuple<std::false_type>());
}


inline void eo_cxx::efl::text::text_set(::efl::eina::optional< std::string > text_) const
{
   eo_do(_concrete_eo_ptr(), ::efl_text_set(::efl::eolian::to_c(text_)));
}


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

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

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

template <typename T>
::efl::eina::optional< std::string > efl_text_text_get_wrapper(Eo* objid EINA_UNUSED, ::efl::eo::detail::Inherit_Private_Data* self)
{
   ::efl::eina::optional< std::string > _tmp_ret{};
   try
      {
         _tmp_ret = static_cast<T*>(self->this_)->text_get();
      }
   catch (...)
      {
         eina_error_set( ::efl::eina::unknown_error() );
      }
   return _tmp_ret;
}

template <typename T>
void efl_text_text_set_wrapper(Eo* objid EINA_UNUSED, ::efl::eo::detail::Inherit_Private_Data* self, const char * text_)
{
   try
      {
         static_cast<T*>(self->this_)->text_set(::efl::eolian::to_cxx<::efl::eina::optional< std::string >>(text_, std::tuple<std::false_type>()));
      }
   catch (...)
      {
         eina_error_set( ::efl::eina::unknown_error() );
      }
}

namespace efl { namespace eo { namespace detail {

template<>
struct operations< ::efl::text >
{
   template <typename T>
   struct type
   {
      virtual ::efl::eina::optional< std::string > text_get()
      {
         const char * _tmp_ret = {};

         eo_do_super(dynamic_cast<T*>(this)->_eo_ptr(),
               dynamic_cast<T*>(this)->_eo_class(),
               _tmp_ret = ::efl_text_get());
            return ::efl::eolian::to_cxx<::efl::eina::optional< std::string >>(_tmp_ret, std::tuple<std::false_type>());
      }

      virtual void text_set(::efl::eina::optional< std::string > text_)
      {

         eo_do_super(dynamic_cast<T*>(this)->_eo_ptr(),
               dynamic_cast<T*>(this)->_eo_class(),
               ::efl_text_set(::efl::eolian::to_c(text_)));
      }

   };
};


template<>
struct operation_description_class_size< ::efl::text >
{
   static const int value = 2;
};

template <typename T>
int initialize_operation_description(::efl::eo::detail::tag<::efl::text>
                                 , Eo_Op_Description* ops)
{
   (void)ops;
   ops[0].func = reinterpret_cast<void*>(& ::efl_text_text_get_wrapper<T>);
   ops[0].api_func = reinterpret_cast<void*>(& ::efl_text_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*>(& ::efl_text_text_set_wrapper<T>);
   ops[1].api_func = reinterpret_cast<void*>(& ::efl_text_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(::efl::eo::detail::tag< ::efl::text >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               ::efl::eo::detail::args_class<::efl::text, ::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<::efl::text>)
{
   return (EFL_TEXT_INTERFACE);
}

} } }
#endif // EFL_GENERATED_EFL_TEXT_HH

