-I$(top_srcdir)/src/lib/efl \
-I$(builddir)/src/lib/efl \
-I$(srcdir)/src/lib/efl \
+-I$(top_builddir)/src/lib/evas/canvas/ \
-DTESTS_WD=\"`pwd`\" \
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_audio_cxx\" \
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)/src/tests/ecore_audio_cxx\" \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_audio_cxx\" \
-@CHECK_CFLAGS@ @ECORE_CFLAGS@ @EINA_CFLAGS@ @EO_CFLAGS@ @ECORE_AUDIO_CFLAGS@ \
-@ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EO_CXX_CFLAGS@ @ECORE_AUDIO_CXX_CFLAGS@
+@CHECK_CFLAGS@ @ECORE_CFLAGS@ @EINA_CFLAGS@ @EVAS_CFLAGS@ @EO_CFLAGS@ @ECORE_AUDIO_CFLAGS@ \
+@ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EVAS_CXX_CFLAGS@ @EO_CXX_CFLAGS@ @ECORE_AUDIO_CXX_CFLAGS@
tests_ecore_audio_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_ECORE_LIBS@
tests_ecore_audio_cxx_cxx_compile_test_DEPENDENCIES = @USE_ECORE_INTERNAL_LIBS@
-I$(top_builddir)/src/lib/ecore \
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_cxx\" \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_cxx\" \
-@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EINA_CFLAGS@ \
-@ECORE_CFLAGS@ @EO_CFLAGS@ @EO_CXX_CFLAGS@
+@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EVAS_CXX_CFLAGS@ @EINA_CFLAGS@ \
+@ECORE_CFLAGS@ @EVAS_CFLAGS@ @EO_CFLAGS@ @EO_CXX_CFLAGS@
tests_ecore_cxx_ecore_cxx_suite_LDADD = @CHECK_LIBS@ @USE_ECORE_LIBS@
tests_ecore_cxx_ecore_cxx_suite_DEPENDENCIES = @USE_ECORE_INTERNAL_LIBS@
tests_ecore_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_builddir)/src/lib/ecore \
-I$(top_builddir)/src/lib/efl/interfaces/ \
+-I$(top_builddir)/src/lib/evas/canvas/ \
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_cxx\" \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_cxx\" \
@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EINA_CFLAGS@ \
-I$(top_builddir)/src/lib/efl/interfaces/ \
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/edje_cxx\" \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/edje_cxx\" \
-@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EDJE_CXX_CFLAGS@ @EO_CXX_CFLAGS@ \
+@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EVAS_CXX_CFLAGS@ @EDJE_CXX_CFLAGS@ @EO_CXX_CFLAGS@ \
@ECORE_CFLAGS@ @EINA_CFLAGS@ @EVAS_CFLAGS@ @EDJE_CFLAGS@ @EO_CFLAGS@
tests_edje_cxx_cxx_compile_test_LDADD = @CHECK_LIBS@ @USE_EDJE_LIBS@
tests_edje_cxx_cxx_compile_test_DEPENDENCIES = @USE_EDJE_INTERNAL_LIBS@
tests_evas_cxx_cxx_compile_test_SOURCES = tests/evas_cxx/cxx_compile_test.cc
tests_evas_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_builddir)/src/lib/efl/interfaces/ \
+ -I$(top_builddir)/src/lib/evas/canvas/ \
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/evas_cxx\" \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/evas_cxx\" \
@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EVAS_CXX_CFLAGS@ @EO_CXX_CFLAGS@ \
Eolian_Function const& func = *(::eolian_constructor_function_get(&ctor));
efl::eolian::eo_function f;
- if (::eolian_function_type_get(&func) != EOLIAN_PROPERTY)
+ if (function_op_type(func) == EOLIAN_METHOD)
f = _convert_function(klass, func);
else
f = _convert_property_set_to_function(klass, func);
(find_replace(class_full_name(klass) + "_" + suffix, ".", "_"));
}
-inline std::string
-class_format_cxx(std::string const& fullname)
-{
- std::string s = fullname;
- auto found = s.find(".");
- while (found != std::string::npos)
- {
- s.replace(found, 1, "::");
- found = s.find(".");
- }
- return s;
-}
-
inline efl::eolian::eo_class::eo_class_type
class_type(Eolian_Class const& klass)
{
#include <vector>
#include <cctype>
#include <iterator>
+#include <stdexcept>
#include <cassert>
#include <cstddef>
typedef std::vector<efl::eolian::eolian_type> lookup_table_type;
extern const lookup_table_type type_lookup_table;
+inline std::string
+class_format_cxx(std::string const& fullname)
+{
+ std::string s = fullname;
+ auto found = s.find(".");
+ while (found != std::string::npos)
+ {
+ s.replace(found, 1, "::");
+ found = s.find(".");
+ }
+ return s;
+}
+
inline bool
type_is_complex(Eolian_Type const& type)
{
type_from_eolian(Eolian_Type const& type)
{
efl::eolian::eolian_type x;
+
+ Eolian_Type_Type tpt = ::eolian_type_type_get(&type);
+ if (tpt == EOLIAN_TYPE_POINTER || tpt == EOLIAN_TYPE_ALIAS || tpt == EOLIAN_TYPE_REGULAR)
+ {
+ Eolian_Type const* base_type = ::eolian_type_base_type_get(&type);
+ if (base_type && ::eolian_type_type_get(base_type) == EOLIAN_TYPE_CLASS)
+ {
+ Eolian_Class const* klass = ::eolian_type_class_get(base_type);
+ if (klass)
+ {
+ x.category = efl::eolian::eolian_type::simple_;
+ x.is_class = true;
+ x.binding_requires_optional = false;
+ x.binding = "::" + class_format_cxx(safe_lower(safe_str(::eolian_class_full_name_get(klass))));
+
+ Eina_Stringshare* klass_file = ::eolian_class_file_get(klass);
+ if (klass_file)
+ x.includes = {safe_str(klass_file) + ".hh"};
+ }
+ }
+ }
+
x.native = normalize_spaces(safe_str(::eolian_type_c_type_get(&type)));
x.is_own = ::eolian_type_is_own(&type);
x.is_const = ::eolian_type_is_const(&type);
{"Eina_List *", eolian_type::complex_, false, true, true, true, "::efl::eina::list", {"eina-cxx/eina_list.hh"}},
{"const Eina_List *", eolian_type::complex_, true, false, true, true, "::efl::eina::crange_list", {"eina-cxx/eina_list.hh"}},
{"Eio_Filter_Direct_Cb", eolian_type::callback_, {"Eio.h"}},
- {"Emodel *", eolian_type::simple_, false, false, true, false, "::emodel", {"Emodel.hh"}},
{"Eo *", eolian_type::simple_, false, true, true, false, "::efl::eo::concrete", {"eo_concrete.hh"}},
{"Eo *", eolian_type::simple_, false, false, true, false, "::efl::eo::concrete", {"eo_concrete.hh"}},
//{"Evas_Object_Box_Layout", eolian_type::callback_, {"Evas.h"}},
- {"Evas_Object *", eolian_type::simple_, false, false, true, false, "::evas::object", {"canvas/evas_object.eo.hh"}},
- {"char *", eolian_type::simple_, false, true, true, false, "std::unique_ptr<char*>", {"memory"}},
+ //{"char *", eolian_type::simple_, false, true, true, false, "std::unique_ptr<char*>", {"memory"}},
{"const Eina_Inlist *", eolian_type::complex_, false, false, true, true, "::efl::eina::range_inlist", {"eina-cxx/eina_inlist.hh"}},
{"const Eina_List *", eolian_type::complex_, false, false, true, true, "::efl::eina::range_list", {"eina-cxx/eina_ptrlist.hh"}},
{"const char *", eolian_type::simple_, false, false, true, true, "::efl::eina::string_view", {"string"}},
}
template <typename R, typename T>
-R to_native(T const& v)
+R to_native(T& v)
{
static_assert(sizeof(T) == sizeof(R), "");
return v.native_handle();
}
template <typename R, typename T>
-R to_native(eina::optional<T> const& v)
+R to_native(eina::optional<T>& v)
{
static_assert(sizeof(T) == sizeof(R), "");
if (!v)
evas_cxx_rectangle_SOURCES = evas_cxx_rectangle.cc
evas_cxx_rectangle_LDADD = $(ECORE_EVAS_COMMON_LDADD)
evas_cxx_rectangle_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS) @EINA_CXX_CFLAGS@ @EO_CXX_CFLAGS@ @EVAS_CXX_CFLAGS@ \
+-I$(top_builddir)/src/lib/evas/canvas/ \
$(AM_CPPFLAGS) @EVAS_CFLAGS@
endif
struct include_dependencies
{
eo_class const& _cls;
- include_dependencies(eo_class const& cls)
+ eo_generator_options const& _opts;
+ include_dependencies(eo_class const& cls, eo_generator_options const& opts)
: _cls(cls)
+ , _opts(opts)
{}
};
it_p != last_p; ++it_p)
for (eolian_type const& subtype : (*it_p).type.parts)
for (std::string header : subtype.includes)
- headers.insert(header);
+ if (header != x._opts.header_decl_file_name)
+ headers.insert(header);
for (auto it = cls.functions.begin(), last = cls.functions.end();
it != last; ++it)
it_p != last_p; ++it_p)
for (eolian_type const& subtype : (*it_p).type.parts)
for (std::string header : subtype.includes)
- headers.insert(header);
+ if (header != x._opts.header_decl_file_name)
+ headers.insert(header);
for (std::string header : headers)
out << "#include <" << header << ">" << endl;
{
out << "#include \"" << cxx_header << "\"" << endl;
}
- out << include_dependencies(cls) << endl;
+ out << include_dependencies(cls, opts) << endl;
}
inline void