forked from enlightenment/efl
eina_cxx: Add missing methods to Eina C++ wrappers
Also fix release_native_handle type error on mutable ranges.
This commit is contained in:
parent
fd0cf8b764
commit
c7550b2964
|
@ -119,6 +119,17 @@ struct accessor_common_base
|
|||
return _impl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Release the handle of the wrapped @c Eina_Accessor.
|
||||
* @return Handle for the native @c Eina_Accessor.
|
||||
*/
|
||||
Eina_Accessor* release_native_handle()
|
||||
{
|
||||
auto h = _impl;
|
||||
_impl = nullptr;
|
||||
return h;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Swap content between both objects.
|
||||
* @param other Other accessor object.
|
||||
|
|
|
@ -95,6 +95,22 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get the handle for the wrapped @c Eina_Iterator.
|
||||
* @return Internal handle for the native Eina iterator.
|
||||
*
|
||||
* This member function returns the native @c Eina_Iterator handle
|
||||
* that is wrapped inside this object.
|
||||
*
|
||||
* @warning It is important to take care when using it, since the
|
||||
* handle will be automatically release upon object destruction.
|
||||
*/
|
||||
Eina_Iterator* native_handle() const
|
||||
{
|
||||
return _iterator;
|
||||
}
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @internal
|
||||
|
|
|
@ -511,6 +511,7 @@ public:
|
|||
using _base_type::crend;
|
||||
using _base_type::swap;
|
||||
using _base_type::native_handle;
|
||||
using _base_type::release_native_handle;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
@ -613,6 +614,7 @@ public:
|
|||
}
|
||||
using _base_type::swap;
|
||||
using _base_type::native_handle;
|
||||
using _base_type::release_native_handle;
|
||||
|
||||
friend bool operator==(range_list<T> const& rhs, range_list<T> const& lhs)
|
||||
{
|
||||
|
|
|
@ -276,7 +276,7 @@ struct _mutable_range_template : _const_range_template<T, Traits>
|
|||
{
|
||||
auto h = _handle;
|
||||
_handle = nullptr;
|
||||
return h;
|
||||
return const_cast<native_handle_type>(h);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue