eolian: APIs to check for @empty/@auto on implements

This commit is contained in:
Daniel Kolesa 2014-08-29 15:22:14 +01:00
parent 42446e1461
commit b05f738675
2 changed files with 37 additions and 3 deletions

View File

@ -897,7 +897,7 @@ EAPI Eina_Bool eolian_function_object_is_const(const Eolian_Function *function_i
/*
* @brief Get full string of an overriding function (implement).
*
* @param[in] impl handle of the implement
* @param[in] impl the handle of the implement
* @return the full string.
*
* @ingroup Eolian
@ -907,7 +907,7 @@ EAPI Eina_Stringshare *eolian_implement_full_name_get(const Eolian_Implement *im
/*
* @brief Get the class of an overriding function (implement).
*
* @param[in] impl handle of the implement
* @param[in] impl the handle of the implement
* @return the class handle or NULL.
*
* @ingroup Eolian
@ -917,7 +917,7 @@ EAPI const Eolian_Class *eolian_implement_class_get(const Eolian_Implement *impl
/*
* @brief Get the function of an implement.
*
* @param[in] impl handle of the implement
* @param[in] impl the handle of the implement
* @param[out] func_type the function type.
* @return the function handle or NULL.
*
@ -925,6 +925,26 @@ EAPI const Eolian_Class *eolian_implement_class_get(const Eolian_Implement *impl
*/
EAPI const Eolian_Function *eolian_implement_function_get(const Eolian_Implement *impl, Eolian_Function_Type *func_type);
/*
* @brief Get whether an implement is tagged with @auto.
*
* @param[in] impl the handle of the implement
* @return EINA_TRUE when it is, EINA_FALSE when it's not.
*
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_implement_is_auto(const Eolian_Implement *impl);
/*
* @brief Get whether an implement is tagged with @empty.
*
* @param[in] impl the handle of the implement
* @return EINA_TRUE when it is, EINA_FALSE when it's not.
*
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_implement_is_empty(const Eolian_Implement *impl);
/*
* @brief Get an iterator to the overriding functions defined in a class.
*

View File

@ -107,3 +107,17 @@ eolian_implement_function_get(const Eolian_Implement *impl,
}
return fid;
}
EAPI Eina_Bool
eolian_implement_is_auto(const Eolian_Implement *impl)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(impl, EINA_FALSE);
return impl->is_auto;
}
EAPI Eina_Bool
eolian_implement_is_empty(const Eolian_Implement *impl)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(impl, EINA_FALSE);
return impl->is_empty;
}