summaryrefslogtreecommitdiff
path: root/src/bin/eolian_cxx
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-09-12 16:39:47 -0300
committerSavio Sena <savio@expertisesolutions.com.br>2014-09-12 16:39:47 -0300
commit8722d2b9a5480e5eec518db3e949487fe42a130c (patch)
tree224559ed6bdcc68ba68e5a43d6b80e2aaf3e1daf /src/bin/eolian_cxx
parent1eb8967deea3962c893a0734bd9fcd50b2da7037 (diff)
eolian-cxx: Clean-up.
Removed iterator_iterator, unused functions and reworded comments.
Diffstat (limited to 'src/bin/eolian_cxx')
-rw-r--r--src/bin/eolian_cxx/eolian_wrappers.hh38
1 files changed, 13 insertions, 25 deletions
diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh
index fc8e808adc..6144f9d3fd 100644
--- a/src/bin/eolian_cxx/eolian_wrappers.hh
+++ b/src/bin/eolian_cxx/eolian_wrappers.hh
@@ -25,10 +25,6 @@ getter_t const getter = {};
25struct method_t { static constexpr ::Eolian_Function_Type value = ::EOLIAN_METHOD; }; 25struct method_t { static constexpr ::Eolian_Function_Type value = ::EOLIAN_METHOD; };
26method_t const method = {}; 26method_t const method = {};
27 27
28/* fixme */
29struct ctor_t { static constexpr ::Eolian_Function_Type value = ::EOLIAN_METHOD; };
30ctor_t const ctor = {};
31
32inline const Eolian_Class* 28inline const Eolian_Class*
33class_from_file(std::string const& file) 29class_from_file(std::string const& file)
34{ 30{
@@ -156,30 +152,22 @@ class_namespace_full(Eolian_Class const& klass)
156 return safe_lower(s); 152 return safe_lower(s);
157} 153}
158 154
159/* proxy struct for neater iteration */ 155inline efl::eina::iterator<const Eolian_Class>
160template<typename T> 156class_list_all()
161struct iterator_iterator
162{ 157{
163 iterator_iterator(Eina_Iterator *iter): p_iter(iter) {} 158 return efl::eina::iterator<const Eolian_Class>(::eolian_all_classes_get());
159}
164 160
165 efl::eina::iterator<T> begin()
166 {
167 return efl::eina::iterator<T>(p_iter);
168 }
169 161
170 efl::eina::iterator<T> end()
171 {
172 return efl::eina::iterator<T>();
173 }
174 162
175private:
176 Eina_Iterator *p_iter;
177};
178 163
179inline iterator_iterator<const Eolian_Class> 164inline efl::eina::iterator<const Eolian_Function>
180class_list_all() 165functions_get(Eolian_Class const& cls)
181{ 166{
182 return iterator_iterator<const Eolian_Class>(::eolian_all_classes_get()); 167 Eina_Iterator *itr = ::eolian_class_functions_get(&cls, EOLIAN_METHOD); // XXX
168 return itr
169 ? efl::eina::iterator<const Eolian_Function>(itr)
170 : efl::eina::iterator<const Eolian_Function>();
183} 171}
184 172
185inline std::string 173inline std::string
@@ -236,9 +224,9 @@ function_return_type(Eolian_Function const& func, ctor_t func_type)
236inline bool 224inline bool
237function_return_is_explicit_void(Eolian_Function const& func, getter_t func_type) 225function_return_is_explicit_void(Eolian_Function const& func, getter_t func_type)
238{ 226{
239 // XXX This function shouldn't be necessary. Eolian database should 227 // XXX This function shouldn't exist. Eolian should
240 // forge functions as desired and the bindings generator shouldn't 228 // forge functions a priori. Bindings generators
241 // be required to convert and understand this. 229 // shouldn't be required to convert such thing.
242 Eolian_Type const* type = 230 Eolian_Type const* type =
243 ::eolian_function_return_type_get(&func, func_type.value); 231 ::eolian_function_return_type_get(&func, func_type.value);
244 return !!type && type->type == EOLIAN_TYPE_VOID; 232 return !!type && type->type == EOLIAN_TYPE_VOID;