database_type_del(tp);
}
-Eina_Bool
+void
database_type_add(Eolian_Type *def)
{
- if (!_aliases) return EINA_FALSE;
eina_hash_set(_aliases, def->full_name, def);
eina_hash_set(_aliasesf, def->base.file, eina_list_append
((Eina_List*)eina_hash_find(_aliasesf, def->base.file), def));
- return EINA_TRUE;
}
-Eina_Bool database_struct_add(Eolian_Type *tp)
+void
+database_struct_add(Eolian_Type *tp)
{
- if (!_structs) return EINA_FALSE;
eina_hash_set(_structs, tp->full_name, tp);
eina_hash_set(_structsf, tp->base.file, eina_list_append
((Eina_List*)eina_hash_find(_structsf, tp->base.file), tp));
- return EINA_TRUE;
}
-Eina_Bool database_enum_add(Eolian_Type *tp)
+void
+database_enum_add(Eolian_Type *tp)
{
- if (!_enums) return EINA_FALSE;
eina_hash_set(_enums, tp->full_name, tp);
eina_hash_set(_enumsf, tp->base.file, eina_list_append
((Eina_List*)eina_hash_find(_enumsf, tp->base.file), tp));
- return EINA_TRUE;
}
static void
free(var);
}
-static Eina_Bool
+static void
database_var_global_add(Eolian_Variable *var)
{
- if (!_globals) return EINA_FALSE;
eina_hash_set(_globals, var->full_name, var);
eina_hash_set(_globalsf, var->base.file, eina_list_append
((Eina_List*)eina_hash_find(_globalsf, var->base.file), var));
- return EINA_TRUE;
}
-static Eina_Bool
+static void
database_var_constant_add(Eolian_Variable *var)
{
- if (!_constants) return EINA_FALSE;
eina_hash_set(_constants, var->full_name, var);
eina_hash_set(_constantsf, var->base.file, eina_list_append
((Eina_List*)eina_hash_find(_constantsf, var->base.file), var));
- return EINA_TRUE;
}
-Eina_Bool
+void
database_var_add(Eolian_Variable *var)
{
if (var->type == EOLIAN_VAR_GLOBAL)
- return database_var_global_add(var);
- return database_var_constant_add(var);
+ database_var_global_add(var);
+ else
+ database_var_constant_add(var);
}
EAPI Eina_Bool
eolian_eot_file_parse(const char *filepath)
{
+ if (_database_init_count <= 0)
+ return EINA_FALSE;
return eo_parser_database_fill(filepath, EINA_TRUE);
}
Eina_Iterator *itr;
Eina_List *depl;
Eolian_Dependency *dep;
+
+ if (_database_init_count <= 0)
+ return EINA_FALSE;
+
char *bfiledup = strdup(filepath);
char *bfilename = basename(bfiledup);
const Eolian_Class *class = eolian_class_get_by_file(bfilename);
eolian_all_eot_files_parse()
{
Eina_Bool ret = EINA_TRUE;
+
+ if (_database_init_count <= 0)
+ return EINA_FALSE;
+
eina_hash_foreach(_tfilenames, _tfile_parse, &ret);
return ret;
}
eolian_all_eo_files_parse()
{
Eina_Bool ret = EINA_TRUE;
+
+ if (_database_init_count <= 0)
+ return EINA_FALSE;
+
eina_hash_foreach(_filenames, _file_parse, &ret);
return ret;
}
EAPI Eina_Bool
eolian_database_validate(void)
{
+ if (_database_init_count <= 0)
+ return EINA_FALSE;
+
return database_validate();
}
/* types */
-Eina_Bool database_type_add(Eolian_Type *def);
-Eina_Bool database_struct_add(Eolian_Type *tp);
-Eina_Bool database_enum_add(Eolian_Type *tp);
+void database_type_add(Eolian_Type *def);
+void database_struct_add(Eolian_Type *tp);
+void database_enum_add(Eolian_Type *tp);
void database_type_del(Eolian_Type *tp);
void database_typedef_del(Eolian_Type *tp);
/* variables */
void database_var_del(Eolian_Variable *var);
-Eina_Bool database_var_add(Eolian_Variable *var);
+void database_var_add(Eolian_Variable *var);
/* classes */
void database_class_del(Eolian_Class *cl);