From b05f73867546c9a552f85be358163fc021c0ca3f Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Fri, 29 Aug 2014 15:22:14 +0100 Subject: [PATCH] eolian: APIs to check for @empty/@auto on implements --- src/lib/eolian/Eolian.h | 26 +++++++++++++++++++++++--- src/lib/eolian/database_implement_api.c | 14 ++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 43fdc6b..84076a7 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -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. * @@ -926,6 +926,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. * * @param[in] klass the class. diff --git a/src/lib/eolian/database_implement_api.c b/src/lib/eolian/database_implement_api.c index c366f2e..d3c03de 100644 --- a/src/lib/eolian/database_implement_api.c +++ b/src/lib/eolian/database_implement_api.c @@ -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; +} -- 2.7.4