forked from enlightenment/efl
eolian: list_get -> get, find_by -> get_by
This commit is contained in:
parent
e26be1aca6
commit
fd0210f30e
|
@ -8,7 +8,7 @@ Eolian_Class *current_class;
|
|||
static void
|
||||
_class_name_concatenate(const Eolian_Class *class, char *buffer)
|
||||
{
|
||||
Eina_Iterator *itr = eolian_class_namespaces_list_get(class);
|
||||
Eina_Iterator *itr = eolian_class_namespaces_get(class);
|
||||
const char *name;
|
||||
buffer[0] = '\0';
|
||||
EINA_ITERATOR_FOREACH(itr, name)
|
||||
|
@ -75,7 +75,7 @@ _class_func_env_create(const Eolian_Class *class, const char *funcname, Eolian_F
|
|||
const char *ret;
|
||||
const char *suffix = "";
|
||||
const char *legacy = NULL;
|
||||
const Eolian_Function *funcid = eolian_class_function_find_by_name(class, funcname, ftype);
|
||||
const Eolian_Function *funcid = eolian_class_function_get_by_name(class, funcname, ftype);
|
||||
if (ftype == EOLIAN_PROP_GET)
|
||||
{
|
||||
suffix = "_get";
|
||||
|
|
|
@ -102,7 +102,7 @@ eo_fundef_generate(const Eolian_Class *class, Eolian_Function *func, Eolian_Func
|
|||
fsuffix = "_get";
|
||||
if (!rettypet)
|
||||
{
|
||||
itr = eolian_parameters_list_get(func);
|
||||
itr = eolian_parameters_get(func);
|
||||
/* We want to check if there is only one parameter */
|
||||
if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2))
|
||||
{
|
||||
|
@ -151,7 +151,7 @@ eo_fundef_generate(const Eolian_Class *class, Eolian_Function *func, Eolian_Func
|
|||
Eina_Strbuf *str_retdesc = eina_strbuf_new();
|
||||
Eina_Strbuf *str_typecheck = eina_strbuf_new();
|
||||
|
||||
itr = eolian_property_keys_list_get(func);
|
||||
itr = eolian_property_keys_get(func);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
|
@ -172,7 +172,7 @@ eo_fundef_generate(const Eolian_Class *class, Eolian_Function *func, Eolian_Func
|
|||
|
||||
if (!var_as_ret)
|
||||
{
|
||||
itr = eolian_parameters_list_get(func);
|
||||
itr = eolian_parameters_get(func);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
|
@ -272,7 +272,7 @@ eo_header_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
Eina_Strbuf *str_extrn_ev = eina_strbuf_new();
|
||||
Eina_Strbuf *tmpbuf = eina_strbuf_new();
|
||||
|
||||
itr = eolian_class_events_list_get(class);
|
||||
itr = eolian_class_events_get(class);
|
||||
EINA_ITERATOR_FOREACH(itr, event)
|
||||
{
|
||||
const char *evname = NULL;
|
||||
|
@ -298,7 +298,7 @@ eo_header_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
int i;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
itr = eolian_class_functions_list_get(class, ftype_order[i]);
|
||||
itr = eolian_class_functions_get(class, ftype_order[i]);
|
||||
EINA_ITERATOR_FOREACH(itr, fid)
|
||||
{
|
||||
const Eolian_Function_Type ftype = eolian_function_type_get(fid);
|
||||
|
@ -365,7 +365,7 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
add_star = EINA_TRUE;
|
||||
if (!rettypet)
|
||||
{
|
||||
itr = eolian_parameters_list_get(funcid);
|
||||
itr = eolian_parameters_get(funcid);
|
||||
/* We want to check if there is only one parameter */
|
||||
if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2))
|
||||
{
|
||||
|
@ -381,7 +381,7 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
suffix = "_set";
|
||||
}
|
||||
|
||||
itr = eolian_property_keys_list_get(funcid);
|
||||
itr = eolian_property_keys_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
|
@ -402,7 +402,7 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
eina_iterator_free(itr);
|
||||
if (!var_as_ret)
|
||||
{
|
||||
itr = eolian_parameters_list_get(funcid);
|
||||
itr = eolian_parameters_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
|
@ -446,13 +446,13 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
Eina_Strbuf *eo_func_decl = eina_strbuf_new();
|
||||
Eina_Bool has_params = EINA_FALSE;
|
||||
|
||||
itr = eolian_property_keys_list_get(funcid);
|
||||
itr = eolian_property_keys_get(funcid);
|
||||
has_params |= (eina_iterator_next(itr, &data));
|
||||
eina_iterator_free(itr);
|
||||
|
||||
if (!has_params && !var_as_ret)
|
||||
{
|
||||
itr = eolian_parameters_list_get(funcid);
|
||||
itr = eolian_parameters_get(funcid);
|
||||
has_params |= (eina_iterator_next(itr, &data));
|
||||
eina_iterator_free(itr);
|
||||
}
|
||||
|
@ -541,7 +541,7 @@ eo_source_beginning_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
Eina_Strbuf *str_ev = eina_strbuf_new();
|
||||
|
||||
Eolian_Event *event;
|
||||
itr = eolian_class_events_list_get(class);
|
||||
itr = eolian_class_events_get(class);
|
||||
EINA_ITERATOR_FOREACH(itr, event)
|
||||
{
|
||||
const char *evname;
|
||||
|
@ -645,7 +645,7 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
eina_strbuf_reset(tmpbuf);
|
||||
|
||||
//Implements - TODO one generate func def for all
|
||||
itr = eolian_class_implements_list_get(class);
|
||||
itr = eolian_class_implements_get(class);
|
||||
EINA_ITERATOR_FOREACH(itr, impl_desc)
|
||||
{
|
||||
_eolian_class_vars impl_env;
|
||||
|
@ -702,7 +702,7 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
eina_iterator_free(itr);
|
||||
|
||||
//Constructors
|
||||
itr = eolian_class_functions_list_get(class, EOLIAN_CTOR);
|
||||
itr = eolian_class_functions_get(class, EOLIAN_CTOR);
|
||||
EINA_ITERATOR_FOREACH(itr, fn)
|
||||
{
|
||||
char *desc = _source_desc_get(eolian_function_description_get(fn, "comment"));
|
||||
|
@ -715,7 +715,7 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
eina_iterator_free(itr);
|
||||
|
||||
//Properties
|
||||
itr = eolian_class_functions_list_get(class, EOLIAN_PROPERTY);
|
||||
itr = eolian_class_functions_get(class, EOLIAN_PROPERTY);
|
||||
EINA_ITERATOR_FOREACH(itr, fn)
|
||||
{
|
||||
const char *funcname = eolian_function_name_get(fn);
|
||||
|
@ -747,7 +747,7 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
eina_iterator_free(itr);
|
||||
|
||||
//Methods
|
||||
itr = eolian_class_functions_list_get(class, EOLIAN_METHOD);
|
||||
itr = eolian_class_functions_get(class, EOLIAN_METHOD);
|
||||
EINA_ITERATOR_FOREACH(itr, fn)
|
||||
{
|
||||
char *desc = _source_desc_get(eolian_function_description_get(fn, "comment"));
|
||||
|
@ -757,7 +757,7 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
}
|
||||
eina_iterator_free(itr);
|
||||
|
||||
itr = eolian_class_events_list_get(class);
|
||||
itr = eolian_class_events_get(class);
|
||||
EINA_ITERATOR_FOREACH(itr, event)
|
||||
{
|
||||
const char *evname;
|
||||
|
@ -791,10 +791,10 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
eina_strbuf_replace_all(str_end, "@#Events_Desc", eina_strbuf_string_get(tmpbuf));
|
||||
|
||||
eina_strbuf_reset(tmpbuf);
|
||||
itr = eolian_class_inherits_list_get(class);
|
||||
itr = eolian_class_inherits_get(class);
|
||||
EINA_ITERATOR_FOREACH(itr, inherit_name)
|
||||
{
|
||||
const Eolian_Class *inherit_class = eolian_class_find_by_name(inherit_name);
|
||||
const Eolian_Class *inherit_class = eolian_class_get_by_name(inherit_name);
|
||||
_eolian_class_vars inherit_env;
|
||||
_class_env_create(inherit_class, NULL, &inherit_env);
|
||||
eina_strbuf_append_printf(tmpbuf, "%s_%s, ", inherit_env.upper_classname,
|
||||
|
@ -865,7 +865,7 @@ eo_source_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
if (!eo_source_beginning_generate(class, buf)) goto end;
|
||||
|
||||
//Properties
|
||||
itr = eolian_class_functions_list_get(class, EOLIAN_PROPERTY);
|
||||
itr = eolian_class_functions_get(class, EOLIAN_PROPERTY);
|
||||
EINA_ITERATOR_FOREACH(itr, fn)
|
||||
{
|
||||
const Eolian_Function_Type ftype = eolian_function_type_get(fn);
|
||||
|
@ -885,7 +885,7 @@ eo_source_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
eina_iterator_free(itr);
|
||||
|
||||
//Methods
|
||||
itr = eolian_class_functions_list_get(class, EOLIAN_METHOD);
|
||||
itr = eolian_class_functions_get(class, EOLIAN_METHOD);
|
||||
EINA_ITERATOR_FOREACH(itr, fn)
|
||||
{
|
||||
if (!eo_bind_func_generate(class, fn, EOLIAN_UNRESOLVED, str_bodyf, NULL)) goto end;
|
||||
|
|
|
@ -14,7 +14,7 @@ _params_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina_Bo
|
|||
Eolian_Function_Parameter *param;
|
||||
eina_strbuf_reset(params);
|
||||
eina_strbuf_reset(short_params);
|
||||
itr = eolian_property_keys_list_get(foo);
|
||||
itr = eolian_property_keys_get(foo);
|
||||
EINA_ITERATOR_FOREACH(itr, param)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
|
@ -40,7 +40,7 @@ _params_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina_Bo
|
|||
if (!var_as_ret)
|
||||
{
|
||||
Eina_Bool add_star = (ftype == EOLIAN_PROP_GET);
|
||||
itr = eolian_parameters_list_get(foo);
|
||||
itr = eolian_parameters_get(foo);
|
||||
EINA_ITERATOR_FOREACH(itr, param)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
|
@ -149,7 +149,7 @@ _prototype_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina
|
|||
const Eolian_Type *rettypet = eolian_function_return_type_get(foo, ftype);
|
||||
if (ftype == EOLIAN_PROP_GET && !rettypet)
|
||||
{
|
||||
Eina_Iterator *itr = eolian_parameters_list_get(foo);
|
||||
Eina_Iterator *itr = eolian_parameters_get(foo);
|
||||
void *data, *data2;
|
||||
/* We want to check if there is only one parameter */
|
||||
if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2))
|
||||
|
@ -247,7 +247,7 @@ impl_source_generate(const Eolian_Class *class, Eina_Strbuf *buffer)
|
|||
eina_strbuf_free(begin);
|
||||
|
||||
/* Properties */
|
||||
itr = eolian_class_functions_list_get(class, EOLIAN_PROPERTY);
|
||||
itr = eolian_class_functions_get(class, EOLIAN_PROPERTY);
|
||||
EINA_ITERATOR_FOREACH(itr, foo)
|
||||
{
|
||||
const Eolian_Function_Type ftype = eolian_function_type_get(foo);
|
||||
|
@ -260,7 +260,7 @@ impl_source_generate(const Eolian_Class *class, Eina_Strbuf *buffer)
|
|||
eina_iterator_free(itr);
|
||||
|
||||
/* Methods */
|
||||
itr = eolian_class_functions_list_get(class, EOLIAN_METHOD);
|
||||
itr = eolian_class_functions_get(class, EOLIAN_METHOD);
|
||||
EINA_ITERATOR_FOREACH(itr, foo)
|
||||
{
|
||||
_prototype_generate(foo, EOLIAN_METHOD, data_type_buf, NULL, buffer);
|
||||
|
@ -268,14 +268,14 @@ impl_source_generate(const Eolian_Class *class, Eina_Strbuf *buffer)
|
|||
eina_iterator_free(itr);
|
||||
|
||||
/* Custom constructors */
|
||||
itr = eolian_class_functions_list_get(class, EOLIAN_CTOR);
|
||||
itr = eolian_class_functions_get(class, EOLIAN_CTOR);
|
||||
EINA_ITERATOR_FOREACH(itr, foo)
|
||||
{
|
||||
_prototype_generate(foo, EOLIAN_CTOR, data_type_buf, NULL, buffer);
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
|
||||
if (eolian_class_implements_list_get(class))
|
||||
if (eolian_class_implements_get(class))
|
||||
{
|
||||
Eolian_Implement *impl_desc;
|
||||
EINA_ITERATOR_FOREACH(itr, impl_desc)
|
||||
|
|
|
@ -68,7 +68,7 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
add_star = EINA_TRUE;
|
||||
if (!rettypet)
|
||||
{
|
||||
itr = eolian_parameters_list_get(funcid);
|
||||
itr = eolian_parameters_get(funcid);
|
||||
/* We want to check if there is only one parameter */
|
||||
if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2))
|
||||
{
|
||||
|
@ -103,7 +103,7 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
eina_strbuf_replace_all(fbody, "@#desc", eina_strbuf_string_get(linedesc));
|
||||
eina_strbuf_free(linedesc);
|
||||
|
||||
itr = eolian_property_keys_list_get(funcid);
|
||||
itr = eolian_property_keys_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
|
@ -132,7 +132,7 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
eina_iterator_free(itr);
|
||||
if (!var_as_ret)
|
||||
{
|
||||
itr = eolian_parameters_list_get(funcid);
|
||||
itr = eolian_parameters_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
|
@ -230,7 +230,7 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
add_star = EINA_TRUE;
|
||||
if (!rettypet)
|
||||
{
|
||||
itr = eolian_parameters_list_get(funcid);
|
||||
itr = eolian_parameters_get(funcid);
|
||||
/* We want to check if there is only one parameter */
|
||||
if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2))
|
||||
{
|
||||
|
@ -256,7 +256,7 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
|
||||
tmpstr[0] = '\0';
|
||||
|
||||
itr = eolian_property_keys_list_get(funcid);
|
||||
itr = eolian_property_keys_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
|
@ -274,7 +274,7 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
eina_iterator_free(itr);
|
||||
if (!var_as_ret)
|
||||
{
|
||||
itr = eolian_parameters_list_get(funcid);
|
||||
itr = eolian_parameters_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
|
@ -350,7 +350,7 @@ legacy_header_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
void *data;
|
||||
Eina_Iterator *itr = eolian_class_functions_list_get(class, ftype_order[i]);
|
||||
Eina_Iterator *itr = eolian_class_functions_get(class, ftype_order[i]);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Function_Type ftype = eolian_function_type_get((Eolian_Function*)data);
|
||||
|
@ -388,7 +388,7 @@ legacy_source_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
Eina_Strbuf *str_bodyf = eina_strbuf_new();
|
||||
|
||||
//Properties
|
||||
itr = eolian_class_functions_list_get(class, EOLIAN_PROPERTY);
|
||||
itr = eolian_class_functions_get(class, EOLIAN_PROPERTY);
|
||||
EINA_ITERATOR_FOREACH(itr, fn)
|
||||
{
|
||||
const Eolian_Function_Type ftype = eolian_function_type_get(fn);
|
||||
|
@ -408,7 +408,7 @@ legacy_source_generate(const Eolian_Class *class, Eina_Strbuf *buf)
|
|||
eina_iterator_free(itr);
|
||||
|
||||
//Methods
|
||||
itr = eolian_class_functions_list_get(class, EOLIAN_METHOD);
|
||||
itr = eolian_class_functions_get(class, EOLIAN_METHOD);
|
||||
EINA_ITERATOR_FOREACH(itr, fn)
|
||||
{
|
||||
_eapi_func_generate(class, fn, EOLIAN_UNRESOLVED, str_bodyf);
|
||||
|
|
|
@ -327,7 +327,7 @@ int main(int argc, char **argv)
|
|||
{
|
||||
EINA_LIST_FOREACH(files4gen, itr, filename)
|
||||
{
|
||||
class = eolian_class_find_by_file(filename);
|
||||
class = eolian_class_get_by_file(filename);
|
||||
if (class) eolian_show_class(class);
|
||||
}
|
||||
}
|
||||
|
@ -338,7 +338,7 @@ int main(int argc, char **argv)
|
|||
goto end;
|
||||
}
|
||||
|
||||
class = eolian_class_find_by_file(eina_list_data_get(files4gen));
|
||||
class = eolian_class_get_by_file(eina_list_data_get(files4gen));
|
||||
|
||||
if (gen_opt)
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ static efl::eolian::parameters_container_type
|
|||
convert_eolian_parameters(Eolian_Function const& func, getter_t func_type)
|
||||
{
|
||||
return convert_eolian_parameters
|
||||
(::eolian_parameters_list_get(&func), func_type.value);
|
||||
(::eolian_parameters_get(&func), func_type.value);
|
||||
}
|
||||
|
||||
static efl::eolian::parameters_container_type
|
||||
|
@ -69,7 +69,7 @@ convert_eolian_parameters(Eolian_Function const& func)
|
|||
{
|
||||
assert(function_type(func) != EOLIAN_PROPERTY);
|
||||
return convert_eolian_parameters
|
||||
(::eolian_parameters_list_get(&func), function_type(func));
|
||||
(::eolian_parameters_get(&func), function_type(func));
|
||||
}
|
||||
|
||||
static efl::eolian::functions_container_type
|
||||
|
@ -78,7 +78,7 @@ convert_eolian_property_to_functions(Eolian_Class const& klass)
|
|||
efl::eolian::functions_container_type container;
|
||||
std::string cxx_classname = safe_lower(class_name(klass));
|
||||
Eina_Iterator *properties =
|
||||
::eolian_class_functions_list_get(&klass, EOLIAN_PROPERTY); // XXX
|
||||
::eolian_class_functions_get(&klass, EOLIAN_PROPERTY); // XXX
|
||||
void *curr;
|
||||
std::string prefix(class_prefix(klass));
|
||||
EINA_ITERATOR_FOREACH(properties, curr)
|
||||
|
@ -122,7 +122,7 @@ convert_eolian_property_to_functions(Eolian_Class const& klass)
|
|||
});
|
||||
}
|
||||
efl::eolian::parameters_container_type keys =
|
||||
convert_eolian_parameters(::eolian_property_keys_list_get(prop_),
|
||||
convert_eolian_parameters(::eolian_property_keys_get(prop_),
|
||||
eolian_cxx::getter);
|
||||
if (!keys.empty())
|
||||
{
|
||||
|
@ -141,10 +141,10 @@ convert_eolian_property_to_functions(Eolian_Class const& klass)
|
|||
set_.name = function_name(*prop_) + "_set";
|
||||
set_.impl = function_impl(*prop_, prefix) + "_set";
|
||||
efl::eolian::parameters_container_type keys =
|
||||
convert_eolian_parameters(::eolian_property_keys_list_get(prop_),
|
||||
convert_eolian_parameters(::eolian_property_keys_get(prop_),
|
||||
eolian_cxx::setter);
|
||||
efl::eolian::parameters_container_type params =
|
||||
convert_eolian_parameters(::eolian_parameters_list_get(prop_),
|
||||
convert_eolian_parameters(::eolian_parameters_get(prop_),
|
||||
eolian_cxx::setter);
|
||||
set_.params = params;
|
||||
if (!keys.empty())
|
||||
|
@ -175,7 +175,7 @@ void
|
|||
convert_eolian_inheritances(efl::eolian::eo_class& cls, Eolian_Class const& klass)
|
||||
{
|
||||
Eina_Iterator *inheritances =
|
||||
::eolian_class_inherits_list_get(&klass);
|
||||
::eolian_class_inherits_get(&klass);
|
||||
void *curr;
|
||||
|
||||
if (!eina_iterator_next(inheritances, &curr) || !curr)
|
||||
|
@ -203,7 +203,7 @@ void
|
|||
convert_eolian_implements(efl::eolian::eo_class& cls, Eolian_Class const& klass)
|
||||
{
|
||||
std::string prefix(class_prefix(klass));
|
||||
Eina_Iterator *itr = ::eolian_class_implements_list_get(&klass);
|
||||
Eina_Iterator *itr = ::eolian_class_implements_get(&klass);
|
||||
void *impl_desc_;
|
||||
|
||||
EINA_ITERATOR_FOREACH(itr, impl_desc_)
|
||||
|
@ -234,7 +234,7 @@ convert_eolian_constructors(efl::eolian::eo_class& cls, Eolian_Class const& klas
|
|||
void *curr;
|
||||
std::string prefix(class_prefix(klass));
|
||||
Eina_Iterator *constructors =
|
||||
::eolian_class_functions_list_get(&klass, EOLIAN_CTOR);
|
||||
::eolian_class_functions_get(&klass, EOLIAN_CTOR);
|
||||
EINA_ITERATOR_FOREACH(constructors, curr)
|
||||
{
|
||||
Eolian_Function *eo_constructor = static_cast<Eolian_Function*>(curr);
|
||||
|
@ -253,7 +253,7 @@ convert_eolian_functions(efl::eolian::eo_class& cls, Eolian_Class const& klass)
|
|||
void *curr;
|
||||
|
||||
Eina_Iterator *eolian_functions =
|
||||
::eolian_class_functions_list_get(&klass, EOLIAN_METHOD);
|
||||
::eolian_class_functions_get(&klass, EOLIAN_METHOD);
|
||||
EINA_ITERATOR_FOREACH(eolian_functions, curr)
|
||||
{
|
||||
efl::eolian::eo_function func_;
|
||||
|
|
|
@ -50,7 +50,7 @@ _comment_brief_and_params(Eolian_Function const& function,
|
|||
{
|
||||
doc += "@brief " + func + "\n\n";
|
||||
}
|
||||
std::string params = _comment_parameters_list(::eolian_parameters_list_get(&function));
|
||||
std::string params = _comment_parameters_list(::eolian_parameters_get(&function));
|
||||
if (params != "")
|
||||
{
|
||||
doc += params + "\n";
|
||||
|
|
|
@ -94,10 +94,10 @@ generator_options(const Eolian_Class& klass)
|
|||
gen_opts.c_headers.push_back(class_base_file(klass) + ".h");
|
||||
|
||||
void *cur = NULL;
|
||||
Eina_Iterator *inheritances = ::eolian_class_inherits_list_get(&klass);
|
||||
Eina_Iterator *inheritances = ::eolian_class_inherits_get(&klass);
|
||||
EINA_ITERATOR_FOREACH(inheritances, cur)
|
||||
{
|
||||
const Eolian_Class *ext = ::eolian_class_find_by_name(static_cast<const char*>(cur));
|
||||
const Eolian_Class *ext = ::eolian_class_get_by_name(static_cast<const char*>(cur));
|
||||
std::string eo_parent_file = class_base_file(*ext);
|
||||
if (!eo_parent_file.empty())
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ ctor_t const ctor = {};
|
|||
inline const Eolian_Class*
|
||||
class_from_file(std::string const& file)
|
||||
{
|
||||
return ::eolian_class_find_by_file(file.c_str());
|
||||
return ::eolian_class_get_by_file(file.c_str());
|
||||
}
|
||||
|
||||
inline std::string
|
||||
|
@ -60,7 +60,7 @@ class_full_name(Eolian_Class const& klass)
|
|||
inline const Eolian_Class *
|
||||
class_from_name(std::string const& classname)
|
||||
{
|
||||
return ::eolian_class_find_by_name(classname.c_str());
|
||||
return ::eolian_class_get_by_name(classname.c_str());
|
||||
}
|
||||
|
||||
inline std::string
|
||||
|
@ -137,7 +137,7 @@ inline std::string
|
|||
class_namespace_full(Eolian_Class const& klass)
|
||||
{
|
||||
std::string s;
|
||||
Eina_Iterator* itr = ::eolian_class_namespaces_list_get(&klass);
|
||||
Eina_Iterator* itr = ::eolian_class_namespaces_get(&klass);
|
||||
void* name;
|
||||
EINA_ITERATOR_FOREACH(itr, name)
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ private:
|
|||
inline iterator_iterator<const Eolian_Class>
|
||||
class_list_all()
|
||||
{
|
||||
return iterator_iterator<const Eolian_Class>(::eolian_all_classes_list_get());
|
||||
return iterator_iterator<const Eolian_Class>(::eolian_all_classes_get());
|
||||
}
|
||||
|
||||
inline std::string
|
||||
|
@ -364,7 +364,7 @@ inline efl::eolian::events_container_type
|
|||
event_list(Eolian_Class const& klass)
|
||||
{
|
||||
efl::eolian::events_container_type events;
|
||||
Eina_Iterator *itr = ::eolian_class_events_list_get(&klass);
|
||||
Eina_Iterator *itr = ::eolian_class_events_get(&klass);
|
||||
Eolian_Event *e;
|
||||
EINA_ITERATOR_FOREACH(itr, e)
|
||||
{
|
||||
|
|
|
@ -52,7 +52,7 @@ type_lookup(const Eolian_Type* type,
|
|||
if (type == NULL) return { efl::eolian::void_type }; // XXX shouldn't
|
||||
|
||||
std::vector<Eolian_Type const*> types; types.push_back(type);
|
||||
efl::eina::iterator<Eolian_Type const> iterator ( ::eolian_type_subtypes_list_get(type) );
|
||||
efl::eina::iterator<Eolian_Type const> iterator ( ::eolian_type_subtypes_get(type) );
|
||||
while(iterator != efl::eina::iterator<Eolian_Type const>())
|
||||
if(Eolian_Type const* t = &*iterator)
|
||||
types.push_back(t), ++iterator;
|
||||
|
|
|
@ -287,24 +287,24 @@ EAPI Eina_Bool eolian_show_struct(const char *name);
|
|||
EAPI void eolian_show_all();
|
||||
|
||||
/*
|
||||
* @brief Finds a class by its name
|
||||
* @brief Gets a class by its name
|
||||
*
|
||||
* @param[in] class_name name of the class to find.
|
||||
* @param[in] class_name name of the class to get.
|
||||
* @return the class
|
||||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI const Eolian_Class *eolian_class_find_by_name(const char *class_name);
|
||||
EAPI const Eolian_Class *eolian_class_get_by_name(const char *class_name);
|
||||
|
||||
/*
|
||||
* @brief Finds a class by its location (.eo file)
|
||||
* @brief Gets a class by its location (.eo file)
|
||||
*
|
||||
* @param[in] file_name filename where the class is stored.
|
||||
* @return the class stored in the file
|
||||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI const Eolian_Class *eolian_class_find_by_file(const char *file_name);
|
||||
EAPI const Eolian_Class *eolian_class_get_by_file(const char *file_name);
|
||||
|
||||
/*
|
||||
* @brief Returns the name of the file containing the given class.
|
||||
|
@ -347,7 +347,7 @@ EAPI Eina_Stringshare *eolian_class_name_get(const Eolian_Class *klass);
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_class_namespaces_list_get(const Eolian_Class *klass);
|
||||
EAPI Eina_Iterator *eolian_class_namespaces_get(const Eolian_Class *klass);
|
||||
|
||||
/*
|
||||
* @brief Returns the class type of the given class
|
||||
|
@ -366,7 +366,7 @@ EAPI Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass);
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_all_classes_list_get(void);
|
||||
EAPI Eina_Iterator *eolian_all_classes_get(void);
|
||||
|
||||
/*
|
||||
* @brief Returns the description of a class.
|
||||
|
@ -416,7 +416,7 @@ EAPI Eina_Stringshare *eolian_class_data_type_get(const Eolian_Class *klass);
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_class_inherits_list_get(const Eolian_Class *klass);
|
||||
EAPI Eina_Iterator *eolian_class_inherits_get(const Eolian_Class *klass);
|
||||
|
||||
/*
|
||||
* @brief Returns an iterator to functions of a class.
|
||||
|
@ -427,7 +427,7 @@ EAPI Eina_Iterator *eolian_class_inherits_list_get(const Eolian_Class *klass);
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_class_functions_list_get(const Eolian_Class *klass, Eolian_Function_Type func_type);
|
||||
EAPI Eina_Iterator *eolian_class_functions_get(const Eolian_Class *klass, Eolian_Function_Type func_type);
|
||||
|
||||
/*
|
||||
* @brief Returns the type of a function
|
||||
|
@ -473,7 +473,7 @@ EAPI Eina_Stringshare *eolian_function_name_get(const Eolian_Function *function_
|
|||
EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, const char *prefix);
|
||||
|
||||
/*
|
||||
* @brief Find a function in a class by its name and type
|
||||
* @brief Get a function in a class by its name and type
|
||||
*
|
||||
* @param[in] klass the class
|
||||
* @param[in] func_name name of the function
|
||||
|
@ -482,7 +482,7 @@ EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *fu
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI const Eolian_Function *eolian_class_function_find_by_name(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type);
|
||||
EAPI const Eolian_Function *eolian_class_function_get_by_name(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type);
|
||||
|
||||
/*
|
||||
* @brief Returns a specific data for a function.
|
||||
|
@ -535,7 +535,7 @@ EAPI const Eolian_Function_Parameter *eolian_function_parameter_get(const Eolian
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_property_keys_list_get(const Eolian_Function *foo_id);
|
||||
EAPI Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id);
|
||||
|
||||
/*
|
||||
* @brief Returns an iterator to the values params of a given function.
|
||||
|
@ -545,7 +545,7 @@ EAPI Eina_Iterator *eolian_property_keys_list_get(const Eolian_Function *foo_id)
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_property_values_list_get(const Eolian_Function *foo_id);
|
||||
EAPI Eina_Iterator *eolian_property_values_get(const Eolian_Function *foo_id);
|
||||
|
||||
/*
|
||||
* @brief Returns an iterator to the parameter handles for a method/ctor/dtor.
|
||||
|
@ -555,7 +555,7 @@ EAPI Eina_Iterator *eolian_property_values_list_get(const Eolian_Function *foo_i
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_parameters_list_get(const Eolian_Function *function_id);
|
||||
EAPI Eina_Iterator *eolian_parameters_get(const Eolian_Function *function_id);
|
||||
|
||||
/*
|
||||
* @brief Get information about a function parameter
|
||||
|
@ -713,7 +713,7 @@ EAPI Eina_Bool eolian_implement_information_get(const Eolian_Implement *impl, co
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_class_implements_list_get(const Eolian_Class *klass);
|
||||
EAPI Eina_Iterator *eolian_class_implements_get(const Eolian_Class *klass);
|
||||
|
||||
/*
|
||||
* @brief Get an iterator to the events defined in a class.
|
||||
|
@ -723,7 +723,7 @@ EAPI Eina_Iterator *eolian_class_implements_list_get(const Eolian_Class *klass);
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_class_events_list_get(const Eolian_Class *klass);
|
||||
EAPI Eina_Iterator *eolian_class_events_get(const Eolian_Class *klass);
|
||||
|
||||
/*
|
||||
* @brief Get information about an event.
|
||||
|
@ -761,24 +761,24 @@ EAPI Eina_Bool eolian_class_ctor_enable_get(const Eolian_Class *klass);
|
|||
EAPI Eina_Bool eolian_class_dtor_enable_get(const Eolian_Class *klass);
|
||||
|
||||
/*
|
||||
* @brief Find the an alias type by name. Supports namespaces.
|
||||
* @brief Get an alias type by name. Supports namespaces.
|
||||
*
|
||||
* @param[in] name the name of the alias
|
||||
* @return the alias type or NULL
|
||||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI const Eolian_Type *eolian_type_alias_find_by_name(const char *name);
|
||||
EAPI const Eolian_Type *eolian_type_alias_get_by_name(const char *name);
|
||||
|
||||
/*
|
||||
* @brief Find a struct by name. Supports namespaces.
|
||||
* @brief Get a struct by name. Supports namespaces.
|
||||
*
|
||||
* @param[in] name the name of the struct
|
||||
* @return the struct or NULL
|
||||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI const Eolian_Type *eolian_type_struct_find_by_name(const char *name);
|
||||
EAPI const Eolian_Type *eolian_type_struct_get_by_name(const char *name);
|
||||
|
||||
/*
|
||||
* @brief Get an iterator to all aliases contained in a file.
|
||||
|
@ -823,7 +823,7 @@ EAPI Eolian_Type_Type eolian_type_type_get(const Eolian_Type *tp);
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_type_arguments_list_get(const Eolian_Type *tp);
|
||||
EAPI Eina_Iterator *eolian_type_arguments_get(const Eolian_Type *tp);
|
||||
|
||||
/*
|
||||
* @brief Get an iterator to all subtypes of a type.
|
||||
|
@ -834,7 +834,7 @@ EAPI Eina_Iterator *eolian_type_arguments_list_get(const Eolian_Type *tp);
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_type_subtypes_list_get(const Eolian_Type *tp);
|
||||
EAPI Eina_Iterator *eolian_type_subtypes_get(const Eolian_Type *tp);
|
||||
|
||||
/*
|
||||
* @brief Get an iterator to all field names of a struct type.
|
||||
|
@ -844,7 +844,7 @@ EAPI Eina_Iterator *eolian_type_subtypes_list_get(const Eolian_Type *tp);
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_type_struct_field_names_list_get(const Eolian_Type *tp);
|
||||
EAPI Eina_Iterator *eolian_type_struct_field_names_get(const Eolian_Type *tp);
|
||||
|
||||
/*
|
||||
* @brief Get a field of a struct type.
|
||||
|
@ -1013,7 +1013,7 @@ EAPI Eina_Stringshare *eolian_type_full_name_get(const Eolian_Type *tp);
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_type_namespaces_list_get(const Eolian_Type *tp);
|
||||
EAPI Eina_Iterator *eolian_type_namespaces_get(const Eolian_Type *tp);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ Eina_Bool database_class_name_validate(const char *class_name, const Eolian_Clas
|
|||
{
|
||||
colon = strchr(colon, '.');
|
||||
if (colon) *colon = '\0';
|
||||
candidate = eolian_class_find_by_name(name);
|
||||
candidate = eolian_class_get_by_name(name);
|
||||
if (candidate)
|
||||
{
|
||||
if (found_class)
|
||||
|
|
|
@ -20,14 +20,14 @@ eolian_class_name_get(const Eolian_Class *cl)
|
|||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_class_namespaces_list_get(const Eolian_Class *cl)
|
||||
eolian_class_namespaces_get(const Eolian_Class *cl)
|
||||
{
|
||||
return ((cl && cl->namespaces) ? eina_list_iterator_new(cl->namespaces)
|
||||
: NULL);
|
||||
}
|
||||
|
||||
EAPI const Eolian_Class *
|
||||
eolian_class_find_by_name(const char *class_name)
|
||||
eolian_class_get_by_name(const char *class_name)
|
||||
{
|
||||
Eina_List *itr;
|
||||
Eolian_Class *cl;
|
||||
|
@ -41,7 +41,7 @@ end:
|
|||
}
|
||||
|
||||
EAPI const Eolian_Class *
|
||||
eolian_class_find_by_file(const char *file_name)
|
||||
eolian_class_get_by_file(const char *file_name)
|
||||
{
|
||||
Eina_List *itr;
|
||||
Eolian_Class *cl;
|
||||
|
@ -62,7 +62,7 @@ eolian_class_type_get(const Eolian_Class *cl)
|
|||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_all_classes_list_get(void)
|
||||
eolian_all_classes_get(void)
|
||||
{
|
||||
return (_classes ? eina_list_iterator_new(_classes) : NULL);
|
||||
}
|
||||
|
@ -96,21 +96,21 @@ eolian_class_data_type_get(const Eolian_Class *cl)
|
|||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_class_inherits_list_get(const Eolian_Class *cl)
|
||||
eolian_class_inherits_get(const Eolian_Class *cl)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
|
||||
return (cl->inherits ? eina_list_iterator_new(cl->inherits) : NULL);
|
||||
}
|
||||
|
||||
EAPI Eina_Iterator*
|
||||
eolian_class_implements_list_get(const Eolian_Class *cl)
|
||||
eolian_class_implements_get(const Eolian_Class *cl)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
|
||||
return (cl->implements ? eina_list_iterator_new(cl->implements) : NULL);
|
||||
}
|
||||
|
||||
EAPI const Eolian_Function *
|
||||
eolian_class_function_find_by_name(const Eolian_Class *cl, const char *func_name, Eolian_Function_Type f_type)
|
||||
eolian_class_function_get_by_name(const Eolian_Class *cl, const char *func_name, Eolian_Function_Type f_type)
|
||||
{
|
||||
Eina_List *itr;
|
||||
Eolian_Function *fid;
|
||||
|
@ -147,7 +147,7 @@ eolian_class_function_find_by_name(const Eolian_Class *cl, const char *func_name
|
|||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_class_functions_list_get(const Eolian_Class *cl, Eolian_Function_Type foo_type)
|
||||
eolian_class_functions_get(const Eolian_Class *cl, Eolian_Function_Type foo_type)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
|
||||
switch (foo_type)
|
||||
|
@ -163,7 +163,7 @@ eolian_class_functions_list_get(const Eolian_Class *cl, Eolian_Function_Type foo
|
|||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_class_events_list_get(const Eolian_Class *cl)
|
||||
eolian_class_events_get(const Eolian_Class *cl)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
|
||||
return (cl->events ? eina_list_iterator_new(cl->events) : NULL);
|
||||
|
|
|
@ -318,7 +318,7 @@ _db_fill_implement(Eolian_Class *cl, Eolian_Implement *impl)
|
|||
}
|
||||
|
||||
Eolian_Function *foo_id = (Eolian_Function*)
|
||||
eolian_class_function_find_by_name(cl,
|
||||
eolian_class_function_get_by_name(cl,
|
||||
func,
|
||||
ftype);
|
||||
|
||||
|
|
|
@ -89,20 +89,20 @@ eolian_function_parameter_get(const Eolian_Function *fid, const char *param_name
|
|||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_property_keys_list_get(const Eolian_Function *fid)
|
||||
eolian_property_keys_get(const Eolian_Function *fid)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
|
||||
return (fid->keys ? eina_list_iterator_new(fid->keys) : NULL);
|
||||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_property_values_list_get(const Eolian_Function *fid)
|
||||
eolian_property_values_get(const Eolian_Function *fid)
|
||||
{
|
||||
return eolian_parameters_list_get(fid);
|
||||
return eolian_parameters_get(fid);
|
||||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_parameters_list_get(const Eolian_Function *fid)
|
||||
eolian_parameters_get(const Eolian_Function *fid)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
|
||||
return (fid->params ? eina_list_iterator_new(fid->params) : NULL);
|
||||
|
|
|
@ -27,7 +27,7 @@ eolian_implement_information_get(const Eolian_Implement *impl, const Eolian_Clas
|
|||
else if (!strcmp(colon+1, "get")) type = EOLIAN_PROP_GET;
|
||||
}
|
||||
|
||||
const Eolian_Function *fid = eolian_class_function_find_by_name(class, func_name, type);
|
||||
const Eolian_Function *fid = eolian_class_function_get_by_name(class, func_name, type);
|
||||
if (func_out) *func_out = fid;
|
||||
if (type == EOLIAN_UNRESOLVED) type = eolian_function_type_get(fid);
|
||||
if (type_out) *type_out = type;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "eo_definitions.h"
|
||||
|
||||
EAPI const Eolian_Type *
|
||||
eolian_type_alias_find_by_name(const char *name)
|
||||
eolian_type_alias_get_by_name(const char *name)
|
||||
{
|
||||
if (!_aliases) return NULL;
|
||||
Eina_Stringshare *shr = eina_stringshare_add(name);
|
||||
|
@ -13,7 +13,7 @@ eolian_type_alias_find_by_name(const char *name)
|
|||
}
|
||||
|
||||
EAPI const Eolian_Type *
|
||||
eolian_type_struct_find_by_name(const char *name)
|
||||
eolian_type_struct_get_by_name(const char *name)
|
||||
{
|
||||
if (!_structs) return NULL;
|
||||
Eina_Stringshare *shr = eina_stringshare_add(name);
|
||||
|
@ -52,7 +52,7 @@ eolian_type_type_get(const Eolian_Type *tp)
|
|||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_type_arguments_list_get(const Eolian_Type *tp)
|
||||
eolian_type_arguments_get(const Eolian_Type *tp)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(eolian_type_type_get(tp) == EOLIAN_TYPE_FUNCTION, NULL);
|
||||
|
@ -61,7 +61,7 @@ eolian_type_arguments_list_get(const Eolian_Type *tp)
|
|||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_type_subtypes_list_get(const Eolian_Type *tp)
|
||||
eolian_type_subtypes_get(const Eolian_Type *tp)
|
||||
{
|
||||
Eolian_Type_Type tpt;
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
|
@ -74,7 +74,7 @@ eolian_type_subtypes_list_get(const Eolian_Type *tp)
|
|||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_type_struct_field_names_list_get(const Eolian_Type *tp)
|
||||
eolian_type_struct_field_names_get(const Eolian_Type *tp)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(tp->type == EOLIAN_TYPE_STRUCT, NULL);
|
||||
|
@ -212,7 +212,7 @@ eolian_type_full_name_get(const Eolian_Type *tp)
|
|||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_type_namespaces_list_get(const Eolian_Type *tp)
|
||||
eolian_type_namespaces_get(const Eolian_Type *tp)
|
||||
{
|
||||
Eolian_Type_Type tpp;
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
|
|
|
@ -133,23 +133,23 @@ EAPI Eina_Bool
|
|||
eolian_eo_file_parse(const char *filepath)
|
||||
{
|
||||
Eina_Iterator *itr;
|
||||
const Eolian_Class *class = eolian_class_find_by_file(filepath);
|
||||
const Eolian_Class *class = eolian_class_get_by_file(filepath);
|
||||
const char *inherit_name;
|
||||
Eolian_Implement *impl;
|
||||
if (!class)
|
||||
{
|
||||
if (!eo_parser_database_fill(filepath, EINA_FALSE)) return EINA_FALSE;
|
||||
class = eolian_class_find_by_file(filepath);
|
||||
class = eolian_class_get_by_file(filepath);
|
||||
if (!class)
|
||||
{
|
||||
ERR("No class for file %s", filepath);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
}
|
||||
itr = eolian_class_inherits_list_get(class);
|
||||
itr = eolian_class_inherits_get(class);
|
||||
EINA_ITERATOR_FOREACH(itr, inherit_name)
|
||||
{
|
||||
if (!eolian_class_find_by_name(inherit_name))
|
||||
if (!eolian_class_get_by_name(inherit_name))
|
||||
{
|
||||
char *filename = _eolian_class_to_filename(inherit_name);
|
||||
filepath = eina_hash_find(_filenames, filename);
|
||||
|
@ -159,7 +159,7 @@ eolian_eo_file_parse(const char *filepath)
|
|||
return EINA_FALSE;
|
||||
}
|
||||
if (!eolian_eo_file_parse(filepath)) return EINA_FALSE;
|
||||
if (!eolian_class_find_by_name(inherit_name))
|
||||
if (!eolian_class_get_by_name(inherit_name))
|
||||
{
|
||||
ERR("Unable to find class %s", inherit_name);
|
||||
return EINA_FALSE;
|
||||
|
@ -168,7 +168,7 @@ eolian_eo_file_parse(const char *filepath)
|
|||
}
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
itr = eolian_class_implements_list_get(class);
|
||||
itr = eolian_class_implements_get(class);
|
||||
EINA_ITERATOR_FOREACH(itr, impl)
|
||||
{
|
||||
const Eolian_Class *impl_class;
|
||||
|
|
|
@ -24,21 +24,21 @@ START_TEST(eolian_namespaces)
|
|||
fail_if(!eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/namespace.eo"));
|
||||
|
||||
/* Classes existence */
|
||||
fail_if(!(class11 = eolian_class_find_by_name("nmsp1.class1")));
|
||||
fail_if(!(class112 = eolian_class_find_by_name("nmsp1.nmsp11.class2")));
|
||||
fail_if(!(class21 = eolian_class_find_by_name("nmsp2.class1")));
|
||||
fail_if(!(class_no = eolian_class_find_by_name("no_nmsp")));
|
||||
fail_if(!(class11 = eolian_class_get_by_name("nmsp1.class1")));
|
||||
fail_if(!(class112 = eolian_class_get_by_name("nmsp1.nmsp11.class2")));
|
||||
fail_if(!(class21 = eolian_class_get_by_name("nmsp2.class1")));
|
||||
fail_if(!(class_no = eolian_class_get_by_name("no_nmsp")));
|
||||
|
||||
/* Check names and namespaces*/
|
||||
fail_if(strcmp(eolian_class_name_get(class11), "class1"));
|
||||
fail_if(!(iter = eolian_class_namespaces_list_get(class11)));
|
||||
fail_if(!(iter = eolian_class_namespaces_get(class11)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&val1)));
|
||||
fail_if(eina_iterator_next(iter, &dummy));
|
||||
fail_if(strcmp(val1, "nmsp1"));
|
||||
eina_iterator_free(iter);
|
||||
|
||||
fail_if(strcmp(eolian_class_name_get(class112), "class2"));
|
||||
fail_if(!(iter = eolian_class_namespaces_list_get(class112)));
|
||||
fail_if(!(iter = eolian_class_namespaces_get(class112)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&val1)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&val2)));
|
||||
fail_if(eina_iterator_next(iter, &dummy));
|
||||
|
@ -47,28 +47,28 @@ START_TEST(eolian_namespaces)
|
|||
eina_iterator_free(iter);
|
||||
|
||||
fail_if(strcmp(eolian_class_name_get(class21), "class1"));
|
||||
fail_if(!(iter = eolian_class_namespaces_list_get(class21)));
|
||||
fail_if(!(iter = eolian_class_namespaces_get(class21)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&val1)));
|
||||
fail_if(eina_iterator_next(iter, &dummy));
|
||||
fail_if(strcmp(val1, "nmsp2"));
|
||||
eina_iterator_free(iter);
|
||||
|
||||
fail_if(strcmp(eolian_class_name_get(class_no), "no_nmsp"));
|
||||
fail_if(eolian_class_namespaces_list_get(class_no));
|
||||
fail_if(eolian_class_namespaces_get(class_no));
|
||||
|
||||
/* Inherits */
|
||||
fail_if(!(iter = eolian_class_inherits_list_get(class11)));
|
||||
fail_if(!(iter = eolian_class_inherits_get(class11)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&class_name)));
|
||||
fail_if(eolian_class_find_by_name(class_name) != class112);
|
||||
fail_if(eolian_class_get_by_name(class_name) != class112);
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&class_name)));
|
||||
fail_if(eolian_class_find_by_name(class_name) != class21);
|
||||
fail_if(eolian_class_get_by_name(class_name) != class21);
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&class_name)));
|
||||
fail_if(eolian_class_find_by_name(class_name) != class_no);
|
||||
fail_if(eolian_class_get_by_name(class_name) != class_no);
|
||||
fail_if(eina_iterator_next(iter, &dummy));
|
||||
eina_iterator_free(iter);
|
||||
|
||||
/* Implements */
|
||||
fail_if(!(iter = eolian_class_implements_list_get(class11)));
|
||||
fail_if(!(iter = eolian_class_implements_get(class11)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&impl)));
|
||||
fail_if(!eolian_implement_information_get(impl,
|
||||
&impl_class, &fid, &func_type));
|
||||
|
@ -89,7 +89,7 @@ START_TEST(eolian_namespaces)
|
|||
eina_iterator_free(iter);
|
||||
|
||||
/* Virtual regression */
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class112, "a", EOLIAN_UNRESOLVED)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class112, "a", EOLIAN_UNRESOLVED)));
|
||||
fail_if(!eolian_function_is_virtual_pure(fid, EOLIAN_PROP_SET));
|
||||
|
||||
eolian_shutdown();
|
||||
|
@ -110,10 +110,10 @@ START_TEST(eolian_events)
|
|||
fail_if(!eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/events.eo"));
|
||||
|
||||
/* Class */
|
||||
fail_if(!(class = eolian_class_find_by_name("Events")));
|
||||
fail_if(!(class = eolian_class_get_by_name("Events")));
|
||||
|
||||
/* Events */
|
||||
fail_if(!(iter = eolian_class_events_list_get(class)));
|
||||
fail_if(!(iter = eolian_class_events_get(class)));
|
||||
/* Clicked */
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&ev)));
|
||||
fail_if(!eolian_class_event_information_get(ev, &name, &type, &comment));
|
||||
|
@ -151,13 +151,13 @@ START_TEST(eolian_override)
|
|||
fail_if(!eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/override.eo"));
|
||||
|
||||
/* Class */
|
||||
fail_if(!(class = eolian_class_find_by_name("Simple")));
|
||||
fail_if(!(base = eolian_class_find_by_name("Base")));
|
||||
fail_if(!(class = eolian_class_get_by_name("Simple")));
|
||||
fail_if(!(base = eolian_class_get_by_name("Base")));
|
||||
|
||||
/* Base ctor */
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(base, "constructor", EOLIAN_UNRESOLVED)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(base, "constructor", EOLIAN_UNRESOLVED)));
|
||||
fail_if(!eolian_function_is_virtual_pure(fid, EOLIAN_UNRESOLVED));
|
||||
fail_if(!(iter = eolian_class_implements_list_get(class)));
|
||||
fail_if(!(iter = eolian_class_implements_get(class)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&impl)));
|
||||
fail_if(!eolian_implement_information_get(impl, &impl_class, &impl_func, NULL));
|
||||
fail_if(impl_class != base);
|
||||
|
@ -165,12 +165,12 @@ START_TEST(eolian_override)
|
|||
eina_iterator_free(iter);
|
||||
|
||||
/* Property */
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "a", EOLIAN_PROPERTY)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY)));
|
||||
fail_if(!eolian_function_is_virtual_pure(fid, EOLIAN_PROP_SET));
|
||||
fail_if(eolian_function_is_virtual_pure(fid, EOLIAN_PROP_GET));
|
||||
|
||||
/* Method */
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "foo", EOLIAN_METHOD)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)));
|
||||
fail_if(!eolian_function_is_virtual_pure(fid, EOLIAN_METHOD));
|
||||
|
||||
eolian_shutdown();
|
||||
|
@ -186,16 +186,16 @@ START_TEST(eolian_consts)
|
|||
eolian_init();
|
||||
/* Parsing */
|
||||
fail_if(!eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/consts.eo"));
|
||||
fail_if(!(class = eolian_class_find_by_name("Const")));
|
||||
fail_if(!(class = eolian_class_get_by_name("Const")));
|
||||
|
||||
/* Property */
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "a", EOLIAN_PROPERTY)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY)));
|
||||
fail_if(!(param = eolian_function_parameter_get(fid, "buffer")));
|
||||
fail_if(eolian_parameter_const_attribute_get(param, EINA_FALSE));
|
||||
fail_if(!eolian_parameter_const_attribute_get(param, EINA_TRUE));
|
||||
|
||||
/* Method */
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "foo", EOLIAN_METHOD)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)));
|
||||
fail_if(EINA_FALSE == eolian_function_object_is_const(fid));
|
||||
|
||||
eolian_shutdown();
|
||||
|
@ -215,15 +215,15 @@ START_TEST(eolian_ctor_dtor)
|
|||
/* Parsing */
|
||||
fail_if(!eolian_directory_scan(PACKAGE_DATA_DIR"/data"));
|
||||
fail_if(!eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/ctor_dtor.eo"));
|
||||
fail_if(!(class = eolian_class_find_by_name("Ctor_Dtor")));
|
||||
fail_if(!(base = eolian_class_find_by_name("Base")));
|
||||
fail_if(!(class = eolian_class_get_by_name("Ctor_Dtor")));
|
||||
fail_if(!(base = eolian_class_get_by_name("Base")));
|
||||
|
||||
/* Class ctor/dtor */
|
||||
fail_if(!eolian_class_ctor_enable_get(class));
|
||||
fail_if(!eolian_class_dtor_enable_get(class));
|
||||
|
||||
/* Base ctor/dtor */
|
||||
fail_if(!(iter = eolian_class_implements_list_get(class)));
|
||||
fail_if(!(iter = eolian_class_implements_get(class)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&impl)));
|
||||
fail_if(!eolian_implement_information_get(impl, &impl_class, &impl_func, NULL));
|
||||
fail_if(impl_class != base);
|
||||
|
@ -236,10 +236,10 @@ START_TEST(eolian_ctor_dtor)
|
|||
eina_iterator_free(iter);
|
||||
|
||||
/* Custom ctors/dtors */
|
||||
fail_if(!eolian_class_function_find_by_name(base, "constructor", EOLIAN_CTOR));
|
||||
fail_if(!eolian_class_function_find_by_name(base, "destructor", EOLIAN_METHOD));
|
||||
fail_if(!eolian_class_function_find_by_name(class, "custom_constructor_1", EOLIAN_CTOR));
|
||||
fail_if(!eolian_class_function_find_by_name(class, "custom_constructor_2", EOLIAN_CTOR));
|
||||
fail_if(!eolian_class_function_get_by_name(base, "constructor", EOLIAN_CTOR));
|
||||
fail_if(!eolian_class_function_get_by_name(base, "destructor", EOLIAN_METHOD));
|
||||
fail_if(!eolian_class_function_get_by_name(class, "custom_constructor_1", EOLIAN_CTOR));
|
||||
fail_if(!eolian_class_function_get_by_name(class, "custom_constructor_2", EOLIAN_CTOR));
|
||||
|
||||
eolian_shutdown();
|
||||
}
|
||||
|
@ -258,11 +258,11 @@ START_TEST(eolian_typedef)
|
|||
fail_if(!eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/typedef.eo"));
|
||||
|
||||
/* Check that the class Dummy is still readable */
|
||||
fail_if(!(class = eolian_class_find_by_name("Dummy")));
|
||||
fail_if(!eolian_class_function_find_by_name(class, "foo", EOLIAN_METHOD));
|
||||
fail_if(!(class = eolian_class_get_by_name("Dummy")));
|
||||
fail_if(!eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD));
|
||||
|
||||
/* Basic type */
|
||||
fail_if(!(atype = eolian_type_alias_find_by_name("Evas.Coord")));
|
||||
fail_if(!(atype = eolian_type_alias_get_by_name("Evas.Coord")));
|
||||
fail_if(eolian_type_type_get(atype) != EOLIAN_TYPE_ALIAS);
|
||||
fail_if(!(type_name = eolian_type_name_get(atype)));
|
||||
fail_if(strcmp(type_name, "Coord"));
|
||||
|
@ -284,7 +284,7 @@ START_TEST(eolian_typedef)
|
|||
eina_stringshare_del(file);
|
||||
|
||||
/* Complex type */
|
||||
fail_if(!(atype = eolian_type_alias_find_by_name("List_Objects")));
|
||||
fail_if(!(atype = eolian_type_alias_get_by_name("List_Objects")));
|
||||
fail_if(!(type_name = eolian_type_name_get(atype)));
|
||||
fail_if(strcmp(type_name, "List_Objects"));
|
||||
eina_stringshare_del(type_name);
|
||||
|
@ -293,7 +293,7 @@ START_TEST(eolian_typedef)
|
|||
fail_if(!eolian_type_is_own(type));
|
||||
fail_if(strcmp(type_name, "Eina_List *"));
|
||||
eina_stringshare_del(type_name);
|
||||
fail_if(!(iter = eolian_type_subtypes_list_get(type)));
|
||||
fail_if(!(iter = eolian_type_subtypes_get(type)));
|
||||
fail_if(!eina_iterator_next(iter, (void**)&type));
|
||||
fail_if(!(type_name = eolian_type_c_type_get(type)));
|
||||
fail_if(strcmp(type_name, "Eo *"));
|
||||
|
@ -330,23 +330,23 @@ START_TEST(eolian_complex_type)
|
|||
eolian_init();
|
||||
/* Parsing */
|
||||
fail_if(!eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/complex_type.eo"));
|
||||
fail_if(!(class = eolian_class_find_by_name("Complex_Type")));
|
||||
fail_if(!(class = eolian_class_get_by_name("Complex_Type")));
|
||||
|
||||
/* Properties return type */
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "a", EOLIAN_PROPERTY)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY)));
|
||||
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_PROP_SET)));
|
||||
fail_if(!(type_name = eolian_type_c_type_get(type)));
|
||||
fail_if(!eolian_type_is_own(type));
|
||||
fail_if(strcmp(type_name, "Eina_List *"));
|
||||
eina_stringshare_del(type_name);
|
||||
fail_if(!(iter = eolian_type_subtypes_list_get(type)));
|
||||
fail_if(!(iter = eolian_type_subtypes_get(type)));
|
||||
fail_if(!eina_iterator_next(iter, (void**)&type));
|
||||
fail_if(!(type_name = eolian_type_c_type_get(type)));
|
||||
fail_if(eolian_type_is_own(type));
|
||||
fail_if(strcmp(type_name, "Eina_Array *"));
|
||||
eina_stringshare_del(type_name);
|
||||
eina_iterator_free(iter);
|
||||
fail_if(!(iter = eolian_type_subtypes_list_get(type)));
|
||||
fail_if(!(iter = eolian_type_subtypes_get(type)));
|
||||
fail_if(!eina_iterator_next(iter, (void**)&type));
|
||||
fail_if(!(type_name = eolian_type_c_type_get(type)));
|
||||
fail_if(!eolian_type_is_own(type));
|
||||
|
@ -354,7 +354,7 @@ START_TEST(eolian_complex_type)
|
|||
eina_stringshare_del(type_name);
|
||||
eina_iterator_free(iter);
|
||||
/* Properties parameter type */
|
||||
fail_if(!(iter = eolian_parameters_list_get(fid)));
|
||||
fail_if(!(iter = eolian_parameters_get(fid)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
||||
fail_if(eina_iterator_next(iter, &dummy));
|
||||
eina_iterator_free(iter);
|
||||
|
@ -364,7 +364,7 @@ START_TEST(eolian_complex_type)
|
|||
fail_if(!eolian_type_is_own(type));
|
||||
fail_if(strcmp(type_name, "Eina_List *"));
|
||||
eina_stringshare_del(type_name);
|
||||
fail_if(!(iter = eolian_type_subtypes_list_get(type)));
|
||||
fail_if(!(iter = eolian_type_subtypes_get(type)));
|
||||
fail_if(!eina_iterator_next(iter, (void**)&type));
|
||||
fail_if(!(type_name = eolian_type_c_type_get(type)));
|
||||
fail_if(eolian_type_is_own(type));
|
||||
|
@ -373,13 +373,13 @@ START_TEST(eolian_complex_type)
|
|||
eina_iterator_free(iter);
|
||||
|
||||
/* Methods return type */
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "foo", EOLIAN_METHOD)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)));
|
||||
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_METHOD)));
|
||||
fail_if(!(type_name = eolian_type_c_type_get(type)));
|
||||
fail_if(!eolian_type_is_own(type));
|
||||
fail_if(strcmp(type_name, "Eina_List *"));
|
||||
eina_stringshare_del(type_name);
|
||||
fail_if(!(iter = eolian_type_subtypes_list_get(type)));
|
||||
fail_if(!(iter = eolian_type_subtypes_get(type)));
|
||||
fail_if(!eina_iterator_next(iter, (void**)&type));
|
||||
fail_if(!(type_name = eolian_type_c_type_get(type)));
|
||||
fail_if(eolian_type_is_own(type));
|
||||
|
@ -387,7 +387,7 @@ START_TEST(eolian_complex_type)
|
|||
eina_stringshare_del(type_name);
|
||||
eina_iterator_free(iter);
|
||||
/* Methods parameter type */
|
||||
fail_if(!(iter = eolian_parameters_list_get(fid)));
|
||||
fail_if(!(iter = eolian_parameters_get(fid)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
||||
fail_if(eina_iterator_next(iter, &dummy));
|
||||
eina_iterator_free(iter);
|
||||
|
@ -410,22 +410,22 @@ START_TEST(eolian_scope)
|
|||
eolian_init();
|
||||
/* Parsing */
|
||||
fail_if(!eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/scope.eo"));
|
||||
fail_if(!(class = eolian_class_find_by_name("Simple")));
|
||||
fail_if(!(class = eolian_class_get_by_name("Simple")));
|
||||
|
||||
/* Property scope */
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "a", EOLIAN_PROPERTY)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY)));
|
||||
fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PROTECTED);
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "b", EOLIAN_PROPERTY)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY)));
|
||||
fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PUBLIC);
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "c", EOLIAN_PROPERTY)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "c", EOLIAN_PROPERTY)));
|
||||
fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PUBLIC);
|
||||
|
||||
/* Method scope */
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "foo", EOLIAN_METHOD)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)));
|
||||
fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PUBLIC);
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "bar", EOLIAN_METHOD)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "bar", EOLIAN_METHOD)));
|
||||
fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PROTECTED);
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "foobar", EOLIAN_METHOD)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "foobar", EOLIAN_METHOD)));
|
||||
fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PUBLIC);
|
||||
|
||||
eolian_shutdown();
|
||||
|
@ -447,8 +447,8 @@ START_TEST(eolian_simple_parsing)
|
|||
eolian_init();
|
||||
/* Parsing */
|
||||
fail_if(!eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/class_simple.eo"));
|
||||
fail_if(!(class = eolian_class_find_by_name("Simple")));
|
||||
fail_if(eolian_class_find_by_file(PACKAGE_DATA_DIR"/data/class_simple.eo") != class);
|
||||
fail_if(!(class = eolian_class_get_by_name("Simple")));
|
||||
fail_if(eolian_class_get_by_file(PACKAGE_DATA_DIR"/data/class_simple.eo") != class);
|
||||
fail_if(strcmp(eolian_class_file_get(class), PACKAGE_DATA_DIR"/data/class_simple.eo"));
|
||||
|
||||
/* Class */
|
||||
|
@ -456,13 +456,13 @@ START_TEST(eolian_simple_parsing)
|
|||
string = eolian_class_description_get(class);
|
||||
fail_if(!string);
|
||||
fail_if(strcmp(string, "Class Desc Simple"));
|
||||
fail_if(eolian_class_inherits_list_get(class) != NULL);
|
||||
fail_if(eolian_class_inherits_get(class) != NULL);
|
||||
fail_if(strcmp(eolian_class_legacy_prefix_get(class), "evas_object_simple"));
|
||||
fail_if(strcmp(eolian_class_eo_prefix_get(class), "evas_obj_simple"));
|
||||
fail_if(strcmp(eolian_class_data_type_get(class), "Evas_Simple_Data"));
|
||||
|
||||
/* Property */
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "a", EOLIAN_PROPERTY)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY)));
|
||||
fail_if(strcmp(eolian_function_name_get(fid), "a"));
|
||||
string = eolian_function_description_get(fid, EOLIAN_COMMENT_SET);
|
||||
fail_if(!string);
|
||||
|
@ -486,8 +486,8 @@ START_TEST(eolian_simple_parsing)
|
|||
fail_if(string);
|
||||
|
||||
/* Function parameters */
|
||||
fail_if(eolian_property_keys_list_get(fid) != NULL);
|
||||
fail_if(!(iter = eolian_property_values_list_get(fid)));
|
||||
fail_if(eolian_property_keys_get(fid) != NULL);
|
||||
fail_if(!(iter = eolian_property_values_get(fid)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
||||
fail_if(eina_iterator_next(iter, &dummy));
|
||||
eina_iterator_free(iter);
|
||||
|
@ -497,7 +497,7 @@ START_TEST(eolian_simple_parsing)
|
|||
fail_if(strcmp(string, "Value description"));
|
||||
|
||||
/* Method */
|
||||
fail_if(!(fid = eolian_class_function_find_by_name(class, "foo", EOLIAN_METHOD)));
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)));
|
||||
string = eolian_function_description_get(fid, EOLIAN_COMMENT);
|
||||
fail_if(!string);
|
||||
fail_if(strcmp(string, "comment foo"));
|
||||
|
@ -516,7 +516,7 @@ START_TEST(eolian_simple_parsing)
|
|||
fail_if(strcmp(string, "comment for method return"));
|
||||
|
||||
/* Function parameters */
|
||||
fail_if(!(iter = eolian_property_values_list_get(fid)));
|
||||
fail_if(!(iter = eolian_property_values_get(fid)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
||||
eolian_parameter_information_get(param, &dir, &ptypep, &pname, &string);
|
||||
fail_if(dir != EOLIAN_IN_PARAM);
|
||||
|
@ -557,11 +557,11 @@ START_TEST(eolian_struct)
|
|||
fail_if(!eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/struct.eo"));
|
||||
|
||||
/* Check that the class Dummy is still readable */
|
||||
fail_if(!(class = eolian_class_find_by_name("Dummy")));
|
||||
fail_if(!eolian_class_function_find_by_name(class, "foo", EOLIAN_METHOD));
|
||||
fail_if(!(class = eolian_class_get_by_name("Dummy")));
|
||||
fail_if(!eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD));
|
||||
|
||||
/* named struct */
|
||||
fail_if(!(type = eolian_type_struct_find_by_name("Named")));
|
||||
fail_if(!(type = eolian_type_struct_get_by_name("Named")));
|
||||
fail_if(!(type_name = eolian_type_name_get(type)));
|
||||
fail_if(!(file = eolian_type_file_get(type)));
|
||||
fail_if(eolian_type_type_get(type) != EOLIAN_TYPE_STRUCT);
|
||||
|
@ -581,7 +581,7 @@ START_TEST(eolian_struct)
|
|||
eina_stringshare_del(type_name);
|
||||
|
||||
/* referencing */
|
||||
fail_if(!(type = eolian_type_struct_find_by_name("Another")));
|
||||
fail_if(!(type = eolian_type_struct_get_by_name("Another")));
|
||||
fail_if(!(type_name = eolian_type_name_get(type)));
|
||||
fail_if(!(file = eolian_type_file_get(type)));
|
||||
fail_if(eolian_type_type_get(type) != EOLIAN_TYPE_STRUCT);
|
||||
|
@ -596,7 +596,7 @@ START_TEST(eolian_struct)
|
|||
fail_if(eolian_type_type_get(field) != EOLIAN_TYPE_REGULAR_STRUCT);
|
||||
|
||||
/* typedef */
|
||||
fail_if(!(atype = eolian_type_alias_find_by_name("Foo")));
|
||||
fail_if(!(atype = eolian_type_alias_get_by_name("Foo")));
|
||||
fail_if(!(type = eolian_type_base_type_get(atype)));
|
||||
fail_if(!(type_name = eolian_type_name_get(type)));
|
||||
fail_if(eolian_type_type_get(type) != EOLIAN_TYPE_STRUCT);
|
||||
|
@ -604,7 +604,7 @@ START_TEST(eolian_struct)
|
|||
eina_stringshare_del(type_name);
|
||||
|
||||
/* typedef - anon */
|
||||
fail_if(!(atype = eolian_type_alias_find_by_name("Bar")));
|
||||
fail_if(!(atype = eolian_type_alias_get_by_name("Bar")));
|
||||
fail_if(!(type = eolian_type_base_type_get(atype)));
|
||||
fail_if(!!(type_name = eolian_type_name_get(type)));
|
||||
fail_if(eolian_type_type_get(type) != EOLIAN_TYPE_STRUCT);
|
||||
|
@ -624,23 +624,23 @@ START_TEST(eolian_extern)
|
|||
fail_if(!eolian_eo_file_parse(PACKAGE_DATA_DIR"/data/extern.eo"));
|
||||
|
||||
/* Check that the class Dummy is still readable */
|
||||
fail_if(!(class = eolian_class_find_by_name("Dummy")));
|
||||
fail_if(!eolian_class_function_find_by_name(class, "foo", EOLIAN_METHOD));
|
||||
fail_if(!(class = eolian_class_get_by_name("Dummy")));
|
||||
fail_if(!eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD));
|
||||
|
||||
/* regular type */
|
||||
fail_if(!(type = eolian_type_alias_find_by_name("Foo")));
|
||||
fail_if(!(type = eolian_type_alias_get_by_name("Foo")));
|
||||
fail_if(eolian_type_is_extern(type));
|
||||
|
||||
/* extern type */
|
||||
fail_if(!(type = eolian_type_alias_find_by_name("Evas.Coord")));
|
||||
fail_if(!(type = eolian_type_alias_get_by_name("Evas.Coord")));
|
||||
fail_if(!eolian_type_is_extern(type));
|
||||
|
||||
/* regular struct */
|
||||
fail_if(!(type = eolian_type_struct_find_by_name("X")));
|
||||
fail_if(!(type = eolian_type_struct_get_by_name("X")));
|
||||
fail_if(eolian_type_is_extern(type));
|
||||
|
||||
/* extern struct */
|
||||
fail_if(!(type = eolian_type_struct_find_by_name("Y")));
|
||||
fail_if(!(type = eolian_type_struct_get_by_name("Y")));
|
||||
fail_if(!eolian_type_is_extern(type));
|
||||
|
||||
eolian_shutdown();
|
||||
|
|
Loading…
Reference in New Issue