From 72604d49574dba6d540d631895facbbc9b12bb2f Mon Sep 17 00:00:00 2001 From: Vitor Sousa Date: Thu, 19 Feb 2015 13:09:32 -0200 Subject: [PATCH] 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 9121de50e2..2f40627ce9 100644 --- a/src/bindings/eina_cxx/eina_ptrarray.hh +++ b/src/bindings/eina_cxx/eina_ptrarray.hh @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -1237,6 +1238,27 @@ public: { return this->_impl._array; } + + /** + * @brief Get a constant @ref eina::accessor for the array. + * @return Constant eina::accessor to the array. + * + * Version of @ref accessor() to const-qualified ptrarrays. Returns + * a const-qualified eina::accessor instead. + */ + eina::accessor accessor() const + { + return eina::accessor(eina_array_accessor_new(this->_impl._array)); + } + + /** + * @brief Get a @ref eina::accessor for the array. + * @return eina::accessor to the array. + */ + eina::accessor accessor() + { + return eina::accessor(eina_array_accessor_new(this->_impl._array)); + } }; /**