From 7c3aa4194d191dba56955d5c21f814900095b6c8 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 7 Apr 2011 11:01:26 +0000 Subject: [PATCH] move some more doc to .h SVN revision: 58413 --- legacy/eina/src/include/eina_accessor.h | 66 +++++++++++++++++++++++++ legacy/eina/src/lib/eina_accessor.c | 61 ----------------------- 2 files changed, 66 insertions(+), 61 deletions(-) diff --git a/legacy/eina/src/include/eina_accessor.h b/legacy/eina/src/include/eina_accessor.h index c431b3f8c4..4bfa14dbd5 100644 --- a/legacy/eina/src/include/eina_accessor.h +++ b/legacy/eina/src/include/eina_accessor.h @@ -137,16 +137,82 @@ struct _Eina_Accessor * This function frees @p accessor if it is not @c NULL; */ EAPI void eina_accessor_free(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); + +/** + * @brief Retrieve the data of an accessor at a given position. + * + * @param accessor The accessor. + * @param position The position of the element. + * @param data The pointer that stores the data to retrieve. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * This function retrieves the data of the element pointed by + * @p accessor at the porition @p position, and stores it in + * @p data. If @p accessor is @c NULL or if an error occurred, + * #EINA_FALSE is returned, otherwise EINA_TRUE is returned. + */ EAPI Eina_Bool eina_accessor_data_get(Eina_Accessor *accessor, unsigned int position, void **data) EINA_ARG_NONNULL(1); + +/** + * @brief Return the container of an accessor. + * + * @param accessor The accessor. + * @return The container which created the accessor. + * + * This function returns the container which created @p accessor. If + * @p accessor is @c NULL, this function returns @c NULL. + */ EAPI void *eina_accessor_container_get(Eina_Accessor *accessor) EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @brief Iterate over the container and execute a callback on chosen elements. + * + * @param accessor The accessor. + * @param cb The callback called on the chosen elements. + * @param start The position of the first element. + * @param end The position of the last element. + * @param fdata The data passed to the callback. + * + * This function iterates over the elements pointed by @p accessor, + * starting from the element at position @p start and ending to the + * element at position @p end. For Each element, the callback + * @p cb is called with the data @p fdata. If @p accessor is @c NULL + * or if @p start is greter or equal than @p end, the function returns + * immediately. + */ EAPI void eina_accessor_over(Eina_Accessor *accessor, Eina_Each_Cb cb, unsigned int start, unsigned int end, const void *fdata) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Lock the container of the accessor. + * + * @param accessor The accessor. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * If the container of the @p accessor permit it, it will be locked. + * If @p accessor is @c NULL or if a problem occurred, #EINA_FALSE is + * returned, otherwise #EINA_TRUE is returned. If the container + * is not lockable, it will return EINA_TRUE. + */ EAPI Eina_Bool eina_accessor_lock(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); + +/** + * @brief Unlock the container of the accessor. + * + * @param accessor The accessor. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * If the container of the @p accessor permit it and was previously + * locked, it will be unlocked. If @p accessor is @c NULL or if a + * problem occurred, #EINA_FALSE is returned, otherwise #EINA_TRUE + * is returned. If the container is not lockable, it will return + * EINA_TRUE. + */ EAPI Eina_Bool eina_accessor_unlock(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); /** diff --git a/legacy/eina/src/lib/eina_accessor.c b/legacy/eina/src/lib/eina_accessor.c index b1f2ce168d..e8b0e05ff9 100644 --- a/legacy/eina/src/lib/eina_accessor.c +++ b/legacy/eina/src/lib/eina_accessor.c @@ -101,15 +101,6 @@ eina_accessor_free(Eina_Accessor *accessor) accessor->free(accessor); } -/** - * @brief Return the container of an accessor. - * - * @param accessor The accessor. - * @return The container which created the accessor. - * - * This function returns the container which created @p accessor. If - * @p accessor is @c NULL, this function returns @c NULL. - */ EAPI void * eina_accessor_container_get(Eina_Accessor *accessor) { @@ -119,19 +110,6 @@ eina_accessor_container_get(Eina_Accessor *accessor) return accessor->get_container(accessor); } -/** - * @brief Retrieve the data of an accessor at a given position. - * - * @param accessor The accessor. - * @param position The position of the element. - * @param data The pointer that stores the data to retrieve. - * @return #EINA_TRUE on success, #EINA_FALSE otherwise. - * - * This function retrieves the data of the element pointed by - * @p accessor at the porition @p position, and stores it in - * @p data. If @p accessor is @c NULL or if an error occurred, - * #EINA_FALSE is returned, otherwise EINA_TRUE is returned. - */ EAPI Eina_Bool eina_accessor_data_get(Eina_Accessor *accessor, unsigned int position, @@ -144,22 +122,6 @@ eina_accessor_data_get(Eina_Accessor *accessor, return accessor->get_at(accessor, position, data); } -/** - * @brief Iterate over the container and execute a callback on chosen elements. - * - * @param accessor The accessor. - * @param cb The callback called on the chosen elements. - * @param start The position of the first element. - * @param end The position of the last element. - * @param fdata The data passed to the callback. - * - * This function iterates over the elements pointed by @p accessor, - * starting from the element at position @p start and ending to the - * element at position @p end. For Each element, the callback - * @p cb is called with the data @p fdata. If @p accessor is @c NULL - * or if @p start is greter or equal than @p end, the function returns - * immediately. - */ EAPI void eina_accessor_over(Eina_Accessor *accessor, Eina_Each_Cb cb, @@ -191,17 +153,6 @@ eina_accessor_over(Eina_Accessor *accessor, (void) eina_accessor_unlock(accessor); } -/** - * @brief Lock the container of the accessor. - * - * @param accessor The accessor. - * @return #EINA_TRUE on success, #EINA_FALSE otherwise. - * - * If the container of the @p accessor permit it, it will be locked. - * If @p accessor is @c NULL or if a problem occurred, #EINA_FALSE is - * returned, otherwise #EINA_TRUE is returned. If the container - * is not lockable, it will return EINA_TRUE. - */ EAPI Eina_Bool eina_accessor_lock(Eina_Accessor *accessor) { @@ -213,18 +164,6 @@ eina_accessor_lock(Eina_Accessor *accessor) return EINA_TRUE; } -/** - * @brief Unlock the container of the accessor. - * - * @param accessor The accessor. - * @return #EINA_TRUE on success, #EINA_FALSE otherwise. - * - * If the container of the @p accessor permit it and was previously - * locked, it will be unlocked. If @p accessor is @c NULL or if a - * problem occurred, #EINA_FALSE is returned, otherwise #EINA_TRUE - * is returned. If the container is not lockable, it will return - * EINA_TRUE. - */ EAPI Eina_Bool eina_accessor_unlock(Eina_Accessor *accessor) {