forked from enlightenment/efl
eolian: new API: eolian_function_is_constructing
This commit is contained in:
parent
7372ac3ffb
commit
58a2025c25
|
@ -689,6 +689,16 @@ EAPI Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id
|
|||
*/
|
||||
EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
|
||||
|
||||
/*
|
||||
* @brief Get whether a function is constructing.
|
||||
*
|
||||
* @param[in] function_id Id of the function
|
||||
* @return EINA_TRUE and EINA_FALSE respectively
|
||||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Bool eolian_function_is_constructing(const Eolian_Function *function_id);
|
||||
|
||||
/*
|
||||
* @brief Returns a parameter of a function pointed by its id.
|
||||
*
|
||||
|
|
|
@ -138,6 +138,7 @@ _db_fill_property(Eolian_Class *cl, Eo_Class_Def *kls, Eo_Property_Def *prop)
|
|||
|
||||
foo_id->scope = prop->scope;
|
||||
foo_id->is_class = prop->is_class;
|
||||
foo_id->is_constructing = prop->is_constructing;
|
||||
|
||||
if (!_db_fill_params (prop->keys , &(foo_id->keys ))) goto failure;
|
||||
if (!_db_fill_params (prop->values, &(foo_id->params))) goto failure;
|
||||
|
@ -196,6 +197,7 @@ _db_fill_method(Eolian_Class *cl, Eo_Class_Def *kls, Eo_Method_Def *meth)
|
|||
foo_id->get_legacy = eina_stringshare_ref(meth->legacy);
|
||||
foo_id->obj_is_const = meth->obj_const;
|
||||
foo_id->is_class = meth->is_class;
|
||||
foo_id->is_constructing = meth->is_constructing;
|
||||
|
||||
if (meth->only_legacy)
|
||||
foo_id->get_only_legacy = EINA_TRUE;
|
||||
|
|
|
@ -111,6 +111,13 @@ eolian_function_is_class(const Eolian_Function *fid)
|
|||
return fid->is_class;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
eolian_function_is_constructing(const Eolian_Function *fid)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
|
||||
return fid->is_constructing;
|
||||
}
|
||||
|
||||
EAPI const Eolian_Function_Parameter *
|
||||
eolian_function_parameter_get_by_name(const Eolian_Function *fid, const char *param_name)
|
||||
{
|
||||
|
|
|
@ -64,6 +64,7 @@ typedef struct _Eo_Property_Def
|
|||
Eina_List *accessors;
|
||||
int scope;
|
||||
Eina_Bool is_class:1;
|
||||
Eina_Bool is_constructing:1;
|
||||
} Eo_Property_Def;
|
||||
|
||||
/* METHOD */
|
||||
|
@ -79,6 +80,7 @@ typedef struct _Eo_Method_Def
|
|||
Eina_Bool obj_const;
|
||||
int scope;
|
||||
Eina_Bool is_class:1;
|
||||
Eina_Bool is_constructing:1;
|
||||
Eina_Bool only_legacy:1;
|
||||
} Eo_Method_Def;
|
||||
|
||||
|
|
|
@ -1305,8 +1305,8 @@ parse_property(Eo_Lexer *ls)
|
|||
case KW_at_constructor:
|
||||
CASE_LOCK(ls, constructor, "constructor qualifier");
|
||||
eo_lexer_get(ls);
|
||||
prop->is_constructing = EINA_TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
goto body;
|
||||
}
|
||||
|
@ -1409,6 +1409,7 @@ parse_method(Eo_Lexer *ls, Eina_Bool ctor)
|
|||
break;
|
||||
case KW_at_constructor:
|
||||
CASE_LOCK(ls, constructor, "constructor qualifier");
|
||||
meth->is_constructing = EINA_TRUE;
|
||||
eo_lexer_get(ls);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -101,6 +101,7 @@ struct _Eolian_Function
|
|||
Eina_Bool get_only_legacy: 1;
|
||||
Eina_Bool set_only_legacy: 1;
|
||||
Eina_Bool is_class :1;
|
||||
Eina_Bool is_constructing :1;
|
||||
};
|
||||
|
||||
struct _Eolian_Function_Parameter
|
||||
|
|
Loading…
Reference in New Issue