felipealmeida pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=72604d49574dba6d540d631895facbbc9b12bb2f

commit 72604d49574dba6d540d631895facbbc9b12bb2f
Author: Vitor Sousa <vitorsousasi...@gmail.com>
Date:   Thu Feb 19 13:09:32 2015 -0200

    eina_cxx: Add methods to get an eina::accessor from an eina::ptr_array
    
    eina::ptr_array was missing the methods to get an eina::accessor from it.
    Added these methods.
---
 src/bindings/eina_cxx/eina_ptrarray.hh | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/src/bindings/eina_cxx/eina_ptrarray.hh 
b/src/bindings/eina_cxx/eina_ptrarray.hh
index 9121de5..2f40627 100644
--- a/src/bindings/eina_cxx/eina_ptrarray.hh
+++ b/src/bindings/eina_cxx/eina_ptrarray.hh
@@ -6,6 +6,7 @@
 #include <eina_type_traits.hh>
 #include <eina_range_types.hh>
 #include <eina_throw.hh>
+#include <eina_accessor.hh>
 
 #include <memory>
 #include <iterator>
@@ -1237,6 +1238,27 @@ public:
   {
     return this->_impl._array;
   }
+
+  /**
+   * @brief Get a constant @ref eina::accessor for the array.
+   * @return Constant <tt>eina::accessor</tt> to the array.
+   *
+   * Version of @ref accessor() to const-qualified <tt>ptrarray</tt>s. Returns
+   * a const-qualified <tt>eina::accessor</tt> instead.
+   */
+  eina::accessor<T const> accessor() const
+  {
+    return eina::accessor<T 
const>(eina_array_accessor_new(this->_impl._array));
+  }
+
+  /**
+   * @brief Get a @ref eina::accessor for the array.
+   * @return <tt>eina::accessor</tt> to the array.
+   */
+  eina::accessor<T> accessor()
+  {
+    return eina::accessor<T>(eina_array_accessor_new(this->_impl._array));
+  }
 };
 
 /**

-- 


Reply via email to