Optimized specialization of the base inline array for POD types. More...
Public Types | |
typedef T | value_type |
The type of each element. More... | |
typedef T & | reference |
Type for a reference to an element. More... | |
typedef T const & | const_reference |
Type for a constant reference to an element. More... | |
typedef T * | pointer |
Type for a pointer to an element. More... | |
typedef T const * | const_pointer |
Type for a constant pointer for an element. More... | |
typedef pointer | iterator |
Type for a iterator for this container. More... | |
typedef const_pointer | const_iterator |
Type for a constant iterator for this container. More... | |
typedef std::size_t | size_type |
Type for size information used in the array. More... | |
typedef std::ptrdiff_t | difference_type |
Type to represent the distance between two iterators. More... | |
typedef _base_type::native_handle_type | native_handle_type |
typedef _base_type::const_native_handle_type | const_native_handle_type |
Type for the native Eina_Inarray handle. More... | |
typedef std::reverse_iterator< iterator > | reverse_iterator |
Type for constant native Eina_Inarray handle. More... | |
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
Public Member Functions | |
_pod_inarray (native_handle_type array) | |
Type for the native Eina_Inarray handle. More... | |
_pod_inarray () | |
Default constructor. More... | |
_pod_inarray (size_type n, value_type const &t) | |
Construct an array object with n copies of t . More... | |
template<typename InputIterator > | |
_pod_inarray (InputIterator i, InputIterator const &j, typename eina::enable_if<!eina::is_integral< InputIterator >::value >::type *=0) | |
Create a inline array with elements from the given range. More... | |
_pod_inarray (_pod_inarray< T >const &other) | |
Copy constructor. More... | |
~_pod_inarray () | |
Do nothing, the native Eina_Inarray is already released in the base class destructor. | |
_pod_inarray< T > & | operator= (_pod_inarray< T >const &other) |
Replace the current content with the cotent of another array. More... | |
void | clear () |
Remove all the elements of the array. | |
void | push_back (T const &value) |
Add a copy of the given element at the end of the array. More... | |
void | pop_back () |
Remove the last element of the array. | |
iterator | insert (iterator i, value_type const &t) |
Insert a new element at the given position. More... | |
iterator | insert (iterator i, size_t n, value_type const &t) |
Insert n copies of t at the given position. More... | |
template<typename InputIterator > | |
iterator | insert (iterator p, InputIterator i, InputIterator j, typename eina::enable_if<!eina::is_integral< InputIterator >::value >::type *=0) |
Insert the elements between the given range at the given position. More... | |
iterator | erase (iterator q) |
Remove the element at the given position. More... | |
iterator | erase (iterator i, iterator j) |
Remove the elements between the given range. More... | |
template<typename InputIterator > | |
void | assign (InputIterator i, InputIterator j, typename eina::enable_if<!eina::is_integral< InputIterator >::value >::type *=0) |
Replace the content of the array by the elements in the given range. More... | |
void | assign (size_type n, value_type const &t) |
Replace the content of the array by n copies t . More... | |
value_type & | operator[] (size_type i) |
Get a reference to the element at the given position. More... | |
value_type const & | operator[] (size_type i) const |
Get a constant reference to the element at the given position. More... | |
value_type & | back () |
Get a reference to the last element. More... | |
value_type const & | back () const |
Get a constant reference to the last element. More... | |
value_type & | front () |
Get a reference to the first element. More... | |
value_type const & | front () const |
Get a constant reference to the first element. More... | |
iterator | begin () |
Get an iterator pointing to the first element of the array. More... | |
iterator | end () |
Get an iterator to the position following the last element of the array. More... | |
const_iterator | begin () const |
Get a constant iterator pointing to the first element of the array. More... | |
const_iterator | end () const |
Get a constant iterator to the position following the last element of the array. More... | |
const_reverse_iterator | rbegin () const |
Get a constant reverse iterator pointing to the reverse begin of the array. More... | |
const_reverse_iterator | rend () const |
Get a constant reverse iterator pointing to the reverse end of the array. More... | |
reverse_iterator | rbegin () |
Get a reverse iterator pointing to the reverse begin of the array. More... | |
reverse_iterator | rend () |
Get a reverse iterator pointing to the reverse end of the array. More... | |
const_iterator | cbegin () const |
Get a constant iterator pointing to the first element of the array. More... | |
const_iterator | cend () const |
Get a constant iterator to the position following the last element of the array. More... | |
const_reverse_iterator | crbegin () const |
Get a constant reverse iterator pointing to the reverse begin of the array. More... | |
const_reverse_iterator | crend () const |
Get a constant reverse iterator pointing to the reverse end of the array. More... | |
void | swap (_pod_inarray< T > &other) |
Swap content between two inline arrays. More... | |
size_type | max_size () const |
Get the maximum number of elements a inline array can hold. More... | |
native_handle_type | native_handle () |
Get a handle for the wrapped Eina_Inarray. More... | |
const_native_handle_type | native_handle () const |
Get a constant handle for the wrapped Eina_Inarray. More... | |
Optimized specialization of the base inline array for POD types.
typedef T efl::eina::_pod_inarray< T >::value_type |
The type of each element.
typedef T& efl::eina::_pod_inarray< T >::reference |
Type for a reference to an element.
typedef T const& efl::eina::_pod_inarray< T >::const_reference |
Type for a constant reference to an element.
typedef T* efl::eina::_pod_inarray< T >::pointer |
Type for a pointer to an element.
typedef T const* efl::eina::_pod_inarray< T >::const_pointer |
Type for a constant pointer for an element.
typedef pointer efl::eina::_pod_inarray< T >::iterator |
Type for a iterator for this container.
Defined as a pointer for performance reasons.
typedef const_pointer efl::eina::_pod_inarray< T >::const_iterator |
Type for a constant iterator for this container.
Defined as a const_pointer for performance reasons.
typedef std::size_t efl::eina::_pod_inarray< T >::size_type |
Type for size information used in the array.
typedef std::ptrdiff_t efl::eina::_pod_inarray< T >::difference_type |
Type to represent the distance between two iterators.
typedef _base_type::const_native_handle_type efl::eina::_pod_inarray< T >::const_native_handle_type |
Type for the native Eina_Inarray
handle.
typedef std::reverse_iterator<iterator> efl::eina::_pod_inarray< T >::reverse_iterator |
Type for constant native Eina_Inarray
handle.
Type for reverse iterator of the array.
|
inline |
Type for the native Eina_Inarray
handle.
Create a new object from a handle to a native Eina_Inarray
.
array | Handler to a native Eina_Inarray . |
This constructor wraps a pre-allocated Eina_Inarray
providing an OOP interface to it.
|
inline |
Default constructor.
Create an empty array.
This constructor creates an array object with no elements. Elements are declarated as having the same size of the given template typename argument.
|
inline |
Construct an array object with n
copies of t
.
n | Number of elements. |
t | Value to be copied to each element. |
This constructor creates an inline array with n
elements, each one as a copy of t
.
|
inline |
Create a inline array with elements from the given range.
i | Iterator to the initial position. The element pointed by this iterator will be copied. |
j | Iterator to the final position. The element pointed by this iterator will NOT be copied. |
This constructor creates a inline array with copies of the elements between i
and j
in the same order.
j
) is not copied.
|
inline |
Copy constructor.
Creates a copy of the given inline array.
other | Another inline array of the same type. |
This constructor creates an inline array containing a copy of each element inside other
in the same order.
References efl::eina::_pod_inarray< T >::begin(), efl::eina::_inarray_access_traits::end(), and efl::eina::_pod_inarray< T >::end().
|
inline |
Replace the current content with the cotent of another array.
other | Another inline array of the same type. |
This assignment operator replaces the content of the array by a copy of the content of other
. The array size is adjusted accordingly and the newly copied elements keep their original order.
References efl::eina::_pod_inarray< T >::begin(), efl::eina::_inarray_access_traits::end(), and efl::eina::_pod_inarray< T >::end().
|
inline |
Add a copy of the given element at the end of the array.
value | Element to be added at the end of the array. |
This member function allocates a new element at the end of the inline array, the content of value
is copied to the new element.
References eina_inarray_push(), and efl::eina::_inarray_access_traits::size().
|
inline |
Insert a new element at the given position.
i | Iterator pointing to the position where the new element will be inserted. |
t | Value to be copied to the new element. |
This member function inserts a copy of the element t
at the position i
. The new element comes right before the element originally pointed by i
.
At the end, a valid iterator pointing to the element just inserted is returned.
References efl::eina::_inarray_access_traits::begin(), eina_inarray_alloc_at(), and efl::eina::_inarray_access_traits::end().
|
inline |
Insert n
copies of t
at the given position.
i | Iterator pointing to the position where the new elements will be inserted. |
n | Number of elements to be inserted. |
t | Value to be copied to each new inserted element. |
This member function inserts n
new elements at position i
in the array, each one as a copy of t
. The new elements come right before the element originally pointed by i
.
At the end, a valid iterator pointing to the first element inserted is returned.
References eina_inarray_alloc_at(), eina_inarray_grow(), and efl::eina::_inarray_access_traits::end().
|
inline |
Insert the elements between the given range at the given position.
p | Iterator pointing to the position where the new elements will be inserted. |
i | Iterator to the initial position. The element pointed by this iterator will be copied. |
j | Iterator to the final position. The element pointed by this iterator will NOT be copied. |
This member function inserts a copy of the elements between i
and j
at the position p
. The new elements come right before the element originally pointed by p
. Note that the element pointed by j
is not copied.
At the end, a valid iterator pointing to the first element inserted is returned.
|
inline |
Remove the element at the given position.
q | Iterator pointing to the element to be removed. |
This member function removes the element pointed by the iterator q
, reducing the array size by one. At the end, a valid iterator pointing to the element right after the removed one is returned.
References efl::eina::_inarray_access_traits::begin(), and eina_inarray_remove_at().
|
inline |
Remove the elements between the given range.
i | Iterator pointing to the starting position to be removed. |
j | Iterator pointing to the ending position to be removed. The element pointed by this iterator is not removed. |
j
).This member function removes the elements between the iterators i
and j
, including the element pointed by i
but not the element pointed by .
void efl::eina::_pod_inarray< T >::assign | ( | InputIterator | i, |
InputIterator | j, | ||
typename eina::enable_if<!eina::is_integral< InputIterator >::value >::type * | = 0 |
||
) |
Replace the content of the array by the elements in the given range.
i | Iterator pointing to the beginning of the elements to be copied. |
j | Iterator pointing to the end of the elements to be copied. Note that the element pointed by j will NOT be copied. |
This member function replaces the current elements by copies of the elements between the iterators i
and j
, including the element pointed by i
but not the one pointed by j
. The size of the array is adjusted accordingly and the newly copied elements remain in their original order.
void efl::eina::_pod_inarray< T >::assign | ( | size_type | n, |
value_type const & | t | ||
) |
Replace the content of the array by n
copies t
.
n | Number of elements. |
t | Value to be copied to each element. |
|
inline |
Get a reference to the element at the given position.
i | Position of the element. |
References efl::eina::_inarray_access_traits::begin().
|
inline |
Get a constant reference to the element at the given position.
i | Position of the element. |
Version of operator[](size_type i) for const-qualified inline array objects. Returns a constant reference instead.
|
inline |
Get a reference to the last element.
|
inline |
Get a constant reference to the last element.
Version of back() for const-qualified inline array objects. Returns a constant reference instead.
|
inline |
Get a reference to the first element.
|
inline |
Get a constant reference to the first element.
Version of front() for const-qualified inline array objects. Returns a constant reference instead.
|
inline |
Get an iterator pointing to the first element of the array.
This member function returns an iterator pointing to the first element of the array. If the array is empty the returned iterator is the same as the one returned by end().
Referenced by efl::eina::_pod_inarray< T >::_pod_inarray(), and efl::eina::_pod_inarray< T >::operator=().
|
inline |
Get an iterator to the position following the last element of the array.
This member function returns an iterator to the position following the last element in the array. If the array is empty the returned iterator is the same as the one returned by begin().
Referenced by efl::eina::_pod_inarray< T >::_pod_inarray(), and efl::eina::_pod_inarray< T >::operator=().
|
inline |
Get a constant iterator pointing to the first element of the array.
Version of begin() for const-qualified inline array objects. Returns a constant iterator instead.
|
inline |
Get a constant iterator to the position following the last element of the array.
Version of end() for const-qualified inline array objects. Returns a constant iterator instead.
|
inline |
Get a constant reverse iterator pointing to the reverse begin of the array.
Version of rbegin() for const-qualified inline array objects. Returns a constant reverse iterator instead.
|
inline |
Get a constant reverse iterator pointing to the reverse end of the array.
Version of rend() for const-qualified inline array objects. Returns a constant reverse iterator instead.
|
inline |
Get a reverse iterator pointing to the reverse begin of the array.
This member function returns a reverse iterator pointing to the last element of the array. If the array is empty the returned reverse iterator is the same as the one returned by rend().
|
inline |
Get a reverse iterator pointing to the reverse end of the array.
This member function returns a reverse iterator pointing to the position before the first element of the array. If the array is empty the returned iterator is the same as the one returned by rbegin().
|
inline |
Get a constant iterator pointing to the first element of the array.
This member function works like begin() const but is granted to return a constant iterator even for arrays that are not const-qualified.
|
inline |
Get a constant iterator to the position following the last element of the array.
This member function works like end() const but is granted to return a constant iterator even for arrays that are not const-qualified.
|
inline |
Get a constant reverse iterator pointing to the reverse begin of the array.
This member function works like rbegin() const but is granted to return a constant reverse iterator even for arrays that are not const-qualified.
|
inline |
Get a constant reverse iterator pointing to the reverse end of the array.
This member function works like rend() const but is granted to return a constant reverse iterator even for arrays that are not const-qualified.
|
inline |
Swap content between two inline arrays.
other | Other inline array of the same type. |
References efl::eina::swap().
|
inline |
Get the maximum number of elements a inline array can hold.
|
inline |
Get a handle for the wrapped Eina_Inarray.
This member function returns the native Eina_Inarray handle that is wrapped inside this object.
|
inline |
Get a constant handle for the wrapped Eina_Inarray.
Version of native_handle() for const-qualified objects.Returns a constant handle instead.