forked from enlightenment/efl
eolian cxx,csharp: Update after eolian changes
Closes D5829.
This commit is contained in:
parent
9e8d96671e
commit
6f092071ac
|
@ -279,7 +279,7 @@ run(options_type const& opts)
|
||||||
char* base = basename(dup);
|
char* base = basename(dup);
|
||||||
std::string cpp_types_header;
|
std::string cpp_types_header;
|
||||||
opts.unit = (Eolian_Unit*)opts.state;
|
opts.unit = (Eolian_Unit*)opts.state;
|
||||||
klass = ::eolian_class_get_by_file(opts.unit, base);
|
klass = ::eolian_state_class_by_file_get(opts.state, base);
|
||||||
free(dup);
|
free(dup);
|
||||||
if (klass)
|
if (klass)
|
||||||
{
|
{
|
||||||
|
@ -317,7 +317,7 @@ run(options_type const& opts)
|
||||||
}
|
}
|
||||||
char* dup = strdup(name.c_str());
|
char* dup = strdup(name.c_str());
|
||||||
char* base = basename(dup);
|
char* base = basename(dup);
|
||||||
Eolian_Class const* klass = ::eolian_class_get_by_file(unit, base);
|
Eolian_Class const* klass = ::eolian_state_class_by_file_get(opts.state, base);
|
||||||
free(dup);
|
free(dup);
|
||||||
if (klass)
|
if (klass)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1277,7 +1277,7 @@ struct native_convert_function_pointer_generator
|
||||||
// Getting the type through C api
|
// Getting the type through C api
|
||||||
std::string type_name = param.type.original_type.visit(type_name_visitor{});
|
std::string type_name = param.type.original_type.visit(type_name_visitor{});
|
||||||
|
|
||||||
const Eolian_Typedecl *tpd = ::eolian_typedecl_alias_get_by_name(param.unit, type_name.c_str());
|
const Eolian_Typedecl *tpd = ::eolian_unit_alias_by_name_get(param.unit, type_name.c_str());
|
||||||
if (!tpd)
|
if (!tpd)
|
||||||
{
|
{
|
||||||
EINA_LOG_ERR("Failed to get typedecl for c type [%s]", param.type.c_type.c_str());
|
EINA_LOG_ERR("Failed to get typedecl for c type [%s]", param.type.c_type.c_str());
|
||||||
|
|
|
@ -229,7 +229,7 @@ struct visitor_generate
|
||||||
// else
|
// else
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
// else if(Eolian_Typedecl const* typedecl = eolian_typedecl_struct_get_by_name(c_type.c_str()))
|
// else if(Eolian_Typedecl const* typedecl = eolian_state_struct_by_name_get(c_type.c_str()))
|
||||||
// {
|
// {
|
||||||
// return as_generator
|
// return as_generator
|
||||||
// (
|
// (
|
||||||
|
|
|
@ -99,8 +99,8 @@ run(options_type const& opts)
|
||||||
const Eolian_Typedecl *tp = NULL;
|
const Eolian_Typedecl *tp = NULL;
|
||||||
char* dup = strdup(opts.in_file.c_str());
|
char* dup = strdup(opts.in_file.c_str());
|
||||||
std::string basename_input = basename(dup);
|
std::string basename_input = basename(dup);
|
||||||
klass = ::eolian_class_get_by_file(opts.unit, basename_input.c_str());
|
klass = ::eolian_state_class_by_file_get(opts.state, basename_input.c_str());
|
||||||
aliases= ::eolian_typedecl_aliases_get_by_file(opts.unit, basename_input.c_str());
|
aliases= ::eolian_state_aliases_by_file_get(opts.state, basename_input.c_str());
|
||||||
free(dup);
|
free(dup);
|
||||||
|
|
||||||
std::string class_file_name = opts.out_file;
|
std::string class_file_name = opts.out_file;
|
||||||
|
@ -169,7 +169,7 @@ run(options_type const& opts)
|
||||||
}
|
}
|
||||||
//else
|
//else
|
||||||
{
|
{
|
||||||
for (efl::eina::iterator<const Eolian_Typedecl> enum_iterator( ::eolian_typedecl_enums_get_by_file(opts.unit, basename_input.c_str()))
|
for (efl::eina::iterator<const Eolian_Typedecl> enum_iterator( ::eolian_state_enums_by_file_get(opts.state, basename_input.c_str()))
|
||||||
, enum_last; enum_iterator != enum_last; ++enum_iterator)
|
, enum_last; enum_iterator != enum_last; ++enum_iterator)
|
||||||
{
|
{
|
||||||
efl::eolian::grammar::attributes::enum_def enum_(&*enum_iterator, opts.unit);
|
efl::eolian::grammar::attributes::enum_def enum_(&*enum_iterator, opts.unit);
|
||||||
|
@ -179,7 +179,7 @@ run(options_type const& opts)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (efl::eina::iterator<const Eolian_Typedecl> struct_iterator( ::eolian_typedecl_structs_get_by_file(opts.unit, basename_input.c_str()))
|
for (efl::eina::iterator<const Eolian_Typedecl> struct_iterator( ::eolian_state_structs_by_file_get(opts.state, basename_input.c_str()))
|
||||||
, struct_last; struct_iterator != struct_last; ++struct_iterator)
|
, struct_last; struct_iterator != struct_last; ++struct_iterator)
|
||||||
{
|
{
|
||||||
efl::eolian::grammar::attributes::struct_def struct_(&*struct_iterator, opts.unit);
|
efl::eolian::grammar::attributes::struct_def struct_(&*struct_iterator, opts.unit);
|
||||||
|
|
|
@ -1170,7 +1170,7 @@ inline Eolian_Class const* get_klass(klass_name const& klass_name_, Eolian_Unit
|
||||||
, context_null{}))
|
, context_null{}))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
else
|
else
|
||||||
return ::eolian_class_get_by_name(unit, klass_name.c_str());
|
return ::eolian_unit_class_by_name_get(unit, klass_name.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::vector<std::string> cpp_namespaces(std::vector<std::string> namespaces)
|
inline std::vector<std::string> cpp_namespaces(std::vector<std::string> namespaces)
|
||||||
|
|
|
@ -26,7 +26,7 @@ klass_def init_test_data(efl::eolian::eolian_state const& state)
|
||||||
ck_assert(::eolian_state_all_eot_files_parse(state.value));
|
ck_assert(::eolian_state_all_eot_files_parse(state.value));
|
||||||
ck_assert(::eolian_state_file_parse(state.value, PACKAGE_DATA_DIR"/docs.eo"));
|
ck_assert(::eolian_state_file_parse(state.value, PACKAGE_DATA_DIR"/docs.eo"));
|
||||||
|
|
||||||
const Eolian_Class *c_klass = ::eolian_class_get_by_name(state.as_unit(), "Docs");
|
const Eolian_Class *c_klass = ::eolian_state_class_by_name_get(state.value, "Docs");
|
||||||
ck_assert_ptr_ne(c_klass, NULL);
|
ck_assert_ptr_ne(c_klass, NULL);
|
||||||
|
|
||||||
klass_def klass(c_klass, state.as_unit());
|
klass_def klass(c_klass, state.as_unit());
|
||||||
|
@ -172,7 +172,7 @@ START_TEST(eolian_cxx_test_enum_docs)
|
||||||
klass_def klass = init_test_data(eolian_state);
|
klass_def klass = init_test_data(eolian_state);
|
||||||
|
|
||||||
auto unit = eolian_state.as_unit();
|
auto unit = eolian_state.as_unit();
|
||||||
enum_def _enum(::eolian_typedecl_enum_get_by_name(unit, "Bar"), unit);
|
enum_def _enum(::eolian_state_enum_by_name_get(eolian_state.value, "Bar"), unit);
|
||||||
|
|
||||||
documentation_def doc = _enum.documentation;
|
documentation_def doc = _enum.documentation;
|
||||||
ck_assert_str_eq(doc.summary.c_str(), "Docs for enum Bar.");
|
ck_assert_str_eq(doc.summary.c_str(), "Docs for enum Bar.");
|
||||||
|
@ -215,7 +215,7 @@ START_TEST(eolian_cxx_test_struct_docs)
|
||||||
klass_def klass = init_test_data(eolian_state);
|
klass_def klass = init_test_data(eolian_state);
|
||||||
|
|
||||||
auto unit = eolian_state.as_unit();
|
auto unit = eolian_state.as_unit();
|
||||||
struct_def _struct(::eolian_typedecl_struct_get_by_name(unit, "Foo"), unit);
|
struct_def _struct(::eolian_state_struct_by_name_get(eolian_state.value, "Foo"), unit);
|
||||||
|
|
||||||
documentation_def doc = _struct.documentation;
|
documentation_def doc = _struct.documentation;
|
||||||
ck_assert_str_eq(doc.summary.c_str(), "This is struct Foo. "
|
ck_assert_str_eq(doc.summary.c_str(), "This is struct Foo. "
|
||||||
|
|
Loading…
Reference in New Issue