summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2018-11-07 16:22:38 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2018-11-07 17:52:25 +0100
commit0b3468000bf1b0e9c260892a151ca164b76d5f22 (patch)
treec3eb66c8bfc5697009b55c44be2167deefe0b1a7
parentde6733d6e01f45f9daa3d2893b2a527b9d113950 (diff)
eolian aux: add documentation
-rw-r--r--src/lib/eolian_aux/Eolian_Aux.h95
1 files changed, 94 insertions, 1 deletions
diff --git a/src/lib/eolian_aux/Eolian_Aux.h b/src/lib/eolian_aux/Eolian_Aux.h
index 1ca0e165a0..4313d49d6d 100644
--- a/src/lib/eolian_aux/Eolian_Aux.h
+++ b/src/lib/eolian_aux/Eolian_Aux.h
@@ -48,7 +48,6 @@ extern "C" {
48 * and other utilities which do not fit into the primary Eolian library. All 48 * and other utilities which do not fit into the primary Eolian library. All
49 * these APIs are built on top of the core Eolian APIs. 49 * these APIs are built on top of the core Eolian APIs.
50 * 50 *
51 *
52 * Recommended reading: 51 * Recommended reading:
53 * 52 *
54 * @li @ref Eolian 53 * @li @ref Eolian
@@ -59,16 +58,110 @@ extern "C" {
59 58
60#ifdef EFL_BETA_API_SUPPORT 59#ifdef EFL_BETA_API_SUPPORT
61 60
61/**
62 * @brief Build reverse children hierarchy of an Eolian state.
63 *
64 * The point of this is basically to figure out reverse inheritance. The
65 * keys of the returned hash will be class pointers and the values will
66 * be lists. If classes A and B both inherit from C, they will be in C's
67 * list after lookup.
68 *
69 * You are responsible for freeing this hash using standard eina_hash_free().
70 *
71 * @param[in] state the Eolian state.
72 * @return a hash containing the hierarchy.
73 *
74 * @ingroup Eolian
75 */
62EAPI Eina_Hash *eolian_aux_state_class_children_find(const Eolian_State *state); 76EAPI Eina_Hash *eolian_aux_state_class_children_find(const Eolian_State *state);
63 77
78/**
79 * @brief Get all APIs that are usable on the class.
80 *
81 * The @p funcs parameter will contain the functions, while @p events will
82 * contain events. The initial items in the lists will be the funcs and
83 * events defined by the class itself, followed by those defined in the
84 * classes it inherits from.
85 *
86 * Funcs will contain implement pointers, events will contain event pointers.
87 *
88 * The @p ownfuncs param defines how many of the list's items are the classes'
89 * own API. Same happens with @p ownevs for events.
90 *
91 * You are responsible for freeing the returned lists but not their contents.
92 * If you want to skip either of the lists, pass NULL.
93 *
94 * @param[in] klass the class.
95 * @param[out] funcs the functions list reference, NULL if not used.
96 * @param[out] events the event list reference, NULL if not used.
97 * @param[out] ownfuncs the number of own functions, NULL if not used.
98 * @param[out] ownevs the number of own events, NULL if not used.
99 * @return the total number of items written into either list.
100 *
101 * @ingroup Eolian
102 */
64EAPI size_t eolian_aux_class_callables_get(const Eolian_Class *klass, Eina_List **funcs, Eina_List **events, size_t *ownfuncs, size_t *ownevs); 103EAPI size_t eolian_aux_class_callables_get(const Eolian_Class *klass, Eina_List **funcs, Eina_List **events, size_t *ownfuncs, size_t *ownevs);
65 104
105/**
106 * @brief Get all implementations of a function in a state.
107 *
108 * Given a function and a childen hierarchy from
109 * eolian_aux_state_class_children_find(), this will func
110 * all implementations of that function in the system. This
111 * is useful for various utilities. You need to free the list
112 * but not the contents.
113 *
114 * @param[in] func the function.
115 * @param[in] class_children the children hierarchy.
116 * @return a list of implementations.
117 *
118 * @ingroup Eolian
119 */
66EAPI Eina_List *eolian_aux_function_all_implements_get(const Eolian_Function *func, Eina_Hash *class_children); 120EAPI Eina_List *eolian_aux_function_all_implements_get(const Eolian_Function *func, Eina_Hash *class_children);
67 121
122/**
123 * @brief Get previous implementation in the inheritance hierarchy.
124 *
125 * This performs a depth-first search in the hierarchy, starting with the
126 * specific given implementation. Once it is found, this parent implementation
127 * is returned.
128 *
129 * @param[in] impl the implementation.
130 * @return the parent implementation.
131 *
132 * @ingroup Eolian
133 */
68EAPI const Eolian_Implement *eolian_aux_implement_parent_get(const Eolian_Implement *impl); 134EAPI const Eolian_Implement *eolian_aux_implement_parent_get(const Eolian_Implement *impl);
69 135
136/**
137 * @brief Get documentation for an implementaiton.
138 *
139 * This first checks if the implementation has documentation for the given
140 * type. If so, it is returned; if not, parent implementations as specified
141 * in eolian_aux_implement_parent_get() are searched and the first one to
142 * have the documentation is used.
143 *
144 * @param[in] impl the implementation.
145 * @param[in] ftype the function type (method, property, getter, setter).
146 * @return the documentation or NULL.
147 *
148 * @ingroup Eolian
149 */
70EAPI const Eolian_Documentation *eolian_aux_implement_documentation_get(const Eolian_Implement *impl, Eolian_Function_Type ftype); 150EAPI const Eolian_Documentation *eolian_aux_implement_documentation_get(const Eolian_Implement *impl, Eolian_Function_Type ftype);
71 151
152/**
153 * @brief Get documentation fallback for an implementation.
154 *
155 * This is used when the implement does not have a "common" documentation
156 * block. If the given implement is a getter and not a setter, this returns
157 * the getter's documentation. If it's a setter but not a getter, it returns
158 * the setter documentation. Otherwise, it returns NULL.
159 *
160 * @param[in] impl the implementation.
161 * @return the documentation or NULL.
162 *
163 * @ingroup Eolian
164 */
72EAPI const Eolian_Documentation *eolian_aux_implement_documentation_fallback_get(const Eolian_Implement *impl); 165EAPI const Eolian_Documentation *eolian_aux_implement_documentation_fallback_get(const Eolian_Implement *impl);
73 166
74#endif 167#endif