savio pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8722d2b9a5480e5eec518db3e949487fe42a130c

commit 8722d2b9a5480e5eec518db3e949487fe42a130c
Author: Savio Sena <sa...@expertisesolutions.com.br>
Date:   Fri Sep 12 16:39:47 2014 -0300

    eolian-cxx: Clean-up.
    
    Removed iterator_iterator, unused functions and reworded comments.
---
 src/bin/eolian_cxx/eolian_wrappers.hh | 38 ++++++++++++-----------------------
 1 file changed, 13 insertions(+), 25 deletions(-)

diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh 
b/src/bin/eolian_cxx/eolian_wrappers.hh
index fc8e808..6144f9d 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 = {};
 struct method_t { static constexpr ::Eolian_Function_Type value = 
::EOLIAN_METHOD; };
 method_t const method = {};
 
-/* fixme */
-struct ctor_t { static constexpr ::Eolian_Function_Type value = 
::EOLIAN_METHOD; };
-ctor_t const ctor = {};
-
 inline const Eolian_Class*
 class_from_file(std::string const& file)
 {
@@ -156,30 +152,22 @@ class_namespace_full(Eolian_Class const& klass)
    return safe_lower(s);
 }
 
-/* proxy struct for neater iteration */
-template<typename T>
-struct iterator_iterator
+inline efl::eina::iterator<const Eolian_Class>
+class_list_all()
 {
-   iterator_iterator(Eina_Iterator *iter): p_iter(iter) {}
+   return efl::eina::iterator<const Eolian_Class>(::eolian_all_classes_get());
+}
 
-   efl::eina::iterator<T> begin()
-   {
-      return efl::eina::iterator<T>(p_iter);
-   }
 
-   efl::eina::iterator<T> end()
-   {
-      return efl::eina::iterator<T>();
-   }
 
-private:
-   Eina_Iterator *p_iter;
-};
 
-inline iterator_iterator<const Eolian_Class>
-class_list_all()
+inline efl::eina::iterator<const Eolian_Function>
+functions_get(Eolian_Class const& cls)
 {
-   return iterator_iterator<const Eolian_Class>(::eolian_all_classes_get());
+   Eina_Iterator *itr = ::eolian_class_functions_get(&cls, EOLIAN_METHOD); // 
XXX
+   return itr
+     ? efl::eina::iterator<const Eolian_Function>(itr)
+     : efl::eina::iterator<const Eolian_Function>();
 }
 
 inline std::string
@@ -236,9 +224,9 @@ function_return_type(Eolian_Function const& func, ctor_t 
func_type)
 inline bool
 function_return_is_explicit_void(Eolian_Function const& func, getter_t 
func_type)
 {
-   // XXX This function shouldn't be necessary. Eolian database should
-   //     forge functions as desired and the bindings generator shouldn't
-   //     be required to convert and understand this.
+   // XXX This function shouldn't exist. Eolian should
+   //     forge functions a priori. Bindings generators
+   //     shouldn't be required to convert such thing.
    Eolian_Type const* type =
      ::eolian_function_return_type_get(&func, func_type.value);
    return !!type && type->type == EOLIAN_TYPE_VOID;

-- 


Reply via email to