_generate_ref(const Eolian_Unit *src, const char *refn, Eina_Strbuf *wbuf,
Eina_Bool use_legacy)
{
- const Eolian_Declaration *decl = eolian_declaration_get_by_name(src, refn);
+ const Eolian_Object *decl = eolian_unit_object_by_name_get(src, refn);
if (decl)
{
- char *n = strdup(eolian_declaration_name_get(decl));
+ char *n = strdup(eolian_object_name_get(decl));
char *p = n;
while ((p = strchr(p, '.'))) *p = '_';
eina_strbuf_append(wbuf, n);
INF("generating header: %s (legacy: %d)", ofname, legacy);
Eina_Strbuf *buf = eina_strbuf_new();
- eo_gen_types_header_gen(src, eolian_declarations_get_by_file(eos, ifname),
+ eo_gen_types_header_gen(src, eolian_state_objects_by_file_get(eos, ifname),
buf, EINA_TRUE, legacy);
buf = _include_guard(ifname, "TYPES", buf);
INF("generating stub header: %s", ofname);
Eina_Strbuf *buf = eina_strbuf_new();
- eo_gen_types_header_gen(src, eolian_declarations_get_by_file(eos, ifname),
+ eo_gen_types_header_gen(src, eolian_state_objects_by_file_get(eos, ifname),
buf, EINA_FALSE, EINA_FALSE);
Eina_Strbuf *cltd = eo_gen_class_typedef_gen(eos, ifname);
Eina_Strbuf *buf = eina_strbuf_new();
const Eolian_Class *cl = eolian_state_class_by_file_get(eos, ifname);
- eo_gen_types_source_gen(eolian_declarations_get_by_file(eos, ifname), buf);
+ eo_gen_types_source_gen(eolian_state_objects_by_file_get(eos, ifname), buf);
eo_gen_source_gen(cl, buf);
if (cl || (eot && eina_strbuf_length_get(buf)))
{
Eina_Iterator *itr, Eina_Strbuf *buf,
Eina_Bool full, Eina_Bool legacy)
{
- const Eolian_Declaration *decl;
+ const Eolian_Object *decl;
EINA_ITERATOR_FOREACH(itr, decl)
{
- Eolian_Declaration_Type dt = eolian_declaration_type_get(decl);
+ Eolian_Object_Type dt = eolian_object_type_get(decl);
- if (dt == EOLIAN_DECL_VAR)
+ if (dt == EOLIAN_OBJECT_VARIABLE)
{
- const Eolian_Variable *vr = eolian_declaration_variable_get(decl);
+ const Eolian_Variable *vr = (const Eolian_Variable *)decl;
if (!vr || eolian_variable_is_extern(vr))
continue;
continue;
}
- if ((dt != EOLIAN_DECL_ALIAS) &&
- (dt != EOLIAN_DECL_STRUCT) &&
- (dt != EOLIAN_DECL_ENUM))
+ if (dt != EOLIAN_OBJECT_TYPEDECL)
continue;
- if (dt == EOLIAN_DECL_ENUM && !full)
+
+ const Eolian_Typedecl *tp = (const Eolian_Typedecl *)decl;
+
+ if (eolian_typedecl_is_extern(tp))
continue;
- const Eolian_Typedecl *tp = eolian_declaration_data_type_get(decl);
- if (!tp || eolian_typedecl_is_extern(tp))
+ Eolian_Typedecl_Type tpt = eolian_typedecl_type_get(tp);
+
+ if (tpt == EOLIAN_TYPEDECL_ENUM && !full)
continue;
- if (eolian_typedecl_type_get(tp) == EOLIAN_TYPEDECL_ALIAS)
+ if (tpt == EOLIAN_TYPEDECL_ALIAS)
{
const Eolian_Type *btp = eolian_typedecl_base_type_get(tp);
if (eolian_type_type_get(btp) == EOLIAN_TYPE_UNDEFINED)
void eo_gen_types_source_gen(Eina_Iterator *itr, Eina_Strbuf *buf)
{
- const Eolian_Declaration *decl;
+ const Eolian_Object *decl;
EINA_ITERATOR_FOREACH(itr, decl)
{
- Eolian_Declaration_Type dt = eolian_declaration_type_get(decl);
+ Eolian_Object_Type dt = eolian_object_type_get(decl);
- if (dt != EOLIAN_DECL_VAR)
+ if (dt != EOLIAN_OBJECT_VARIABLE)
continue;
- const Eolian_Variable *vr = eolian_declaration_variable_get(decl);
- if (!vr || eolian_variable_is_extern(vr))
+ const Eolian_Variable *vr = (const Eolian_Variable *)decl;
+ if (eolian_variable_is_extern(vr))
continue;
if (eolian_variable_type_get(vr) == EOLIAN_VAR_CONSTANT)