forked from enlightenment/efl
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.
This commit is contained in:
parent
5619c6bc8d
commit
72604d4957
|
@ -6,6 +6,7 @@
|
||||||
#include <eina_type_traits.hh>
|
#include <eina_type_traits.hh>
|
||||||
#include <eina_range_types.hh>
|
#include <eina_range_types.hh>
|
||||||
#include <eina_throw.hh>
|
#include <eina_throw.hh>
|
||||||
|
#include <eina_accessor.hh>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
@ -1237,6 +1238,27 @@ public:
|
||||||
{
|
{
|
||||||
return this->_impl._array;
|
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));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue