summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2015-02-19 13:09:32 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-04-14 01:06:57 -0300
commit72604d49574dba6d540d631895facbbc9b12bb2f (patch)
tree036f22ebd3a524eb292b64d54617778234af3fd6 /src/bindings
parent5619c6bc8dff95865ddc412d0d5f161dc33f7fcf (diff)
downloadefl-72604d49574dba6d540d631895facbbc9b12bb2f.tar.gz
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.
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/eina_cxx/eina_ptrarray.hh22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/bindings/eina_cxx/eina_ptrarray.hh b/src/bindings/eina_cxx/eina_ptrarray.hh
index 9121de50e2..2f40627ce9 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));
+ }
};
/**