- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Types | Public Member Functions
efl::eina::ptr_array< T, CloneAllocator > Class Template Reference
Eina C++Eina C++ » | Data Types » Containers » Array of Pointers Eina C++Eina C++ » | Data Types » | Containers

Array class. 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 _ptr_array_iterator< T const > | const_iterator
| Type for a iterator for this container. More...
typedef _ptr_array_iterator< T > | iterator
| Type for a constant iterator for this container. 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 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 CloneAllocator | clone_allocator_type
typedef std::reverse_iterator < iterator > | reverse_iterator
| Type for the clone allocator. More...
typedef std::reverse_iterator < const_iterator > | const_reverse_iterator
| Type for reverse iterator for this container. More...
typedef std::unique_ptr < value_type, clone_allocator_deleter < clone_allocator_type > > | _unique_ptr

## Public Member Functions
| ptr_array ()
| Default constructor. More...
| ptr_array (Eina_Array *handle)
| ptr_array (clone_allocator_type alloc)
| ptr_array (size_type n, const_reference t)
| Construct an array object with `n` copies of `t`. More...
template<typename InputIterator >
| ptr_array (InputIterator i, InputIterator const &j, clone_allocator_type const &alloc=clone_allocator_type(), typename eina::enable_if<!eina::is_integral< InputIterator >::value >::type *=0)
| Create an array with elements from the given range. More...
| ptr_array (ptr_array< T, CloneAllocator > const &other)
| Copy constructor. More...
template<typename CloneAllocator1 >
| ptr_array (ptr_array< T, CloneAllocator1 >const &other)
| Creates a copy of a `ptr_array` with a different clone allocator. More...
| ~ptr_array ()
| Destructor. More...
ptr_array< T, CloneAllocator > & | operator= (ptr_array< T, CloneAllocator >const &other)
| Replace the current content with the content of another array. More...
void | clear ()
| Remove all the elements of the array.
std::size_t | size () const
| Get the current size of the array. More...
bool | empty () const
| Check if the array is empty. More...
clone_allocator_type | get_clone_allocator () const
| Get the clone allocator of the array. More...
void | push_back (const_reference a)
| Add a copy of the given element at the end of the array. More...
void | push_back (pointer p)
| Add the object pointed by `p` as a element at the end of the array. More...
template<typename Deleter >
void | push_back (std::unique_ptr< T, Deleter > &p)
| Add the object pointed by `p` as a 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 copy of the given element at the given position. More...
iterator | insert (iterator i, pointer pv)
| Insert the object pointed by `pv` as a element at the given position. More...
template<typename Deleter >
iterator | insert (iterator i, std::unique_ptr< value_type, Deleter > &p)
| Insert the object pointed by `p` as a 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...
iterator | insert (iterator i, size_t n, pointer p)
| Insert the object pointed by `p` and `n-1` copies of it as elements 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 & | 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...
const_reference | operator[] (size_type index) const
| Get a constant reference to the element at the given position. More...
reference | operator[] (size_type index)
| Get a reference to the element at the given position. 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...
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_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...
eina::iterator< T > | ibegin ()
| Get an `eina::iterator` pointing to the first element of the array. More...
eina::iterator< T > | iend ()
| Get an `eina::iterator` to the position following the last element of the array. More...
eina::iterator< T const > | ibegin () const
| Get a constant `eina::iterator` pointing to the first element of the array. More...
eina::iterator< T const > | iend () const
| Get an constant `eina::iterator` to the position following the last element of the array. More...
eina::iterator< T const > | cibegin () const
| Get an `eina::iterator` pointing to the first element of the array. More...
eina::iterator< T const > | ciend () const
| Get an constant `eina::iterator` to the position following the last element of the array. More...
void | swap (ptr_array< T, CloneAllocator > &other)
| Swap content between two arrays. More...
size_type | max_size () const
| Get the maximum number of elements `ptr_array` can hold. More...
Eina_Array * | native_handle ()
| Get a handle for the wrapped Eina_Array. More...
Eina_Array const * | native_handle () const
| Get a constant handle for the wrapped Eina_Array. More...

## Additional Inherited Members
Protected Types inherited from efl::eina::_ptr_array_common_base< T, CloneAllocator >
typedef CloneAllocator | clone_allocator_type
| Type for the clone allocator. More...
Protected Member Functions inherited from efl::eina::_ptr_array_common_base< T, CloneAllocator >
| _ptr_array_common_base (CloneAllocator clone_allocator)
| Creates an array with the given clone allocator.
| _ptr_array_common_base (Eina_Array *_array)
| Create a new object from a handle to a native Eina_Array. More...
| _ptr_array_common_base ()
| Default constructor. More...
CloneAllocator & | _get_clone_allocator ()
CloneAllocator const & | _get_clone_allocator () const
void | _delete_clone (T const *p)
T * | _new_clone (T const &a)
Protected Attributes inherited from efl::eina::_ptr_array_common_base< T, CloneAllocator >
_ptr_array_impl | _impl

## Detailed Description

### template<typename T, typename CloneAllocator = heap_no_copy_allocator>
class efl::eina::ptr_array< T, CloneAllocator >

Array class.

It provides an OOP interface to the `Eina_Array` functions, and automatically take care of allocating and deallocating resources using the RAII programming idiom.

It also provides additional member functions to facilitate the access to the array content, much like a STL vector.

## Member Typedef Documentation

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

typedef T efl::eina::ptr_array< T, CloneAllocator >::value_type

The type of each element.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

typedef T& efl::eina::ptr_array< T, CloneAllocator >::reference

Type for a reference to an element.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

typedef T const& efl::eina::ptr_array< T, CloneAllocator >::const_reference

Type for a constant reference to an element.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

typedef _ptr_array_iterator<T const> efl::eina::ptr_array< T, CloneAllocator >::const_iterator

Type for a iterator for this container.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

typedef _ptr_array_iterator<T> efl::eina::ptr_array< T, CloneAllocator >::iterator

Type for a constant iterator for this container.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

typedef T* efl::eina::ptr_array< T, CloneAllocator >::pointer

Type for a pointer to an element.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

typedef T const* efl::eina::ptr_array< T, CloneAllocator >::const_pointer

Type for a constant pointer for an element.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

typedef std::size_t efl::eina::ptr_array< T, CloneAllocator >::size_type

Type for size information used in the array.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

typedef std::ptrdiff_t efl::eina::ptr_array< T, CloneAllocator >::difference_type

Type to represent the distance between two iterators.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

typedef std::reverse_iterator<iterator> efl::eina::ptr_array< T, CloneAllocator >::reverse_iterator

Type for the clone allocator.

Type for reverse iterator for this container.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

typedef std::reverse_iterator<const_iterator> efl::eina::ptr_array< T, CloneAllocator >::const_reverse_iterator

Type for reverse iterator for this container.

## Constructor & Destructor Documentation

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

efl::eina::ptr_array< T, CloneAllocator >::ptr_array | ( |  | ) |
| inline

Default constructor.

Create an empty array.

This constructor creates a `ptr_array` object with no elements.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

efl::eina::ptr_array< T, CloneAllocator >::ptr_array | ( | size_type | n,
|  | const_reference | t
| ) |  |
| inline

Construct an array object with `n` copies of `t`.

Parameters

  n | Number of elements.
  t | Value to be copied to each element.

This constructor creates a `ptr_array` with `n` elements, each one as a copy of `t`.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>
template<typename InputIterator >

efl::eina::ptr_array< T, CloneAllocator >::ptr_array | ( | InputIterator | i,
|  | InputIterator const & | j,
|  | clone_allocator_type const & | alloc = `clone_allocator_type()`,
|  | typename eina::enable_if<!eina::is_integral< InputIterator >::value >::type * | = `0`
| ) |  |
| inline

Create an array with elements from the given range.

Parameters

  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.
  alloc | Clone allocator to be used.

This constructor creates a `ptr_array` with copies of the elements between `i` and `j` in the same order.

Note
  The ending element (pointed by `j`) is not copied.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

efl::eina::ptr_array< T, CloneAllocator >::ptr_array | ( | ptr_array< T, CloneAllocator > const & | other | ) |
| inline

Copy constructor.

Creates a copy of the given `ptr_array`.

Parameters

  other | Another `ptr_array` of the same type.

This constructor creates a `ptr_array` containing a copy of each element inside `other` in the same order.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>
template<typename CloneAllocator1 >

efl::eina::ptr_array< T, CloneAllocator >::ptr_array | ( | ptr_array< T, CloneAllocator1 >const & | other | ) |
| inline

Creates a copy of a `ptr_array` with a different clone allocator.

Parameters

  other | Another `ptr_array` with a different clone allocator.

This constructor creates a `ptr_array` containing a copy of each element inside `other` in the same order, even if the given array uses a different clone allocator.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

efl::eina::ptr_array< T, CloneAllocator >::~ptr_array | ( |  | ) |
| inline

Destructor.

Release all allocated elements.

## Member Function Documentation

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

ptr_array<T, CloneAllocator>& efl::eina::ptr_array< T, CloneAllocator >::operator= | ( | ptr_array< T, CloneAllocator >const & | other | ) |
| inline

Replace the current content with the content of another array.

Parameters

  other | Another `ptr_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.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

std::size_t efl::eina::ptr_array< T, CloneAllocator >::size | ( |  | ) | const
| inline

Get the current size of the array.

Returns
  Number of elements in the array.

This member function returns the current number of elements inside the array.

Referenced by efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::empty(), efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::erase(), efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::insert(), and efl::eina::operator==().

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

bool efl::eina::ptr_array< T, CloneAllocator >::empty | ( |  | ) | const
| inline

Check if the array is empty.

Returns
  `true` if the array is empty, `false` otherwise.

This member function returns `true` if the array does not contain any elements, otherwise it returns `false`.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

clone_allocator_type efl::eina::ptr_array< T, CloneAllocator >::get_clone_allocator | ( |  | ) | const
| inline

Get the clone allocator of the array.

Returns
  Reference to the clone allocator.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

void efl::eina::ptr_array< T, CloneAllocator >::push_back | ( | const_reference | a | ) |
| inline

Add a copy of the given element at the end of the array.

Parameters

  a | Element to be added at the end of the array.

This member function allocates a new element, as a copy of `a`, and inserts it at the end of the array.

Referenced by efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::ptr_array(), and efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::push_back().

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

void efl::eina::ptr_array< T, CloneAllocator >::push_back | ( | pointer | p | ) |
| inline

Add the object pointed by `p` as a element at the end of the array.

Parameters

  p | Pointer to a pre-allocated element to be inserted at the end of the array.

This member function adds the object pointed by `p` as a element at the end of the array. The array gains ownership of the pointer and nothing is copied.

Warning
  The array gains ownership of the given pointer and will release the pointed object upon element destruction.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>
template<typename Deleter >

void efl::eina::ptr_array< T, CloneAllocator >::push_back | ( | std::unique_ptr< T, Deleter > & | p | ) |
| inline

Add the object pointed by `p` as a element at the end of the array.

Parameters

  p | Reference to a `unique_ptr` pointing to a element to be inserted at the end of the array.

This member function adds the object pointed by the given `unique_ptr` as a element at the end of the array. The object ownership is transferred to the array and nothing is copied.

Warning
  The array gains ownership of the object managed by the given `unique_ptr` and will release it upon element destruction.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

iterator efl::eina::ptr_array< T, CloneAllocator >::insert | ( | iterator | i,
|  | value_type const & | t
| ) |  |
| inline

Insert a copy of the given element at the given position.

Parameters

  i | Iterator pointing to the position where the new element will be inserted.
  t | Value to be copied to the new element.

Returns
  Iterator pointing to the new element inserted.

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.

Referenced by efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::assign(), efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::insert(), efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::operator=(), and efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::ptr_array().

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

iterator efl::eina::ptr_array< T, CloneAllocator >::insert | ( | iterator | i,
|  | pointer | pv
| ) |  |
| inline

Insert the object pointed by `pv` as a element at the given position.

Parameters

  i | Iterator pointing to the position where the new element will be inserted.
  pv | Pointer to a pre-allocated object to be inserted to the array.

Returns
  Iterator pointing to the new element inserted.

This member function adds the object pointed by `pv` as a element at the given position. The new element comes right before the element originally pointed by `i`. The array gains ownership of the pointer and nothing is copied.

At the end, a valid iterator pointing to the element just inserted is returned.

Warning
  The array gains ownership of the given pointer and will release the pointed object upon element destruction.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>
template<typename Deleter >

iterator efl::eina::ptr_array< T, CloneAllocator >::insert | ( | iterator | i,
|  | std::unique_ptr< value_type, Deleter > & | p
| ) |  |
| inline

Insert the object pointed by `p` as a element at the given position.

Parameters

  i | Iterator pointing to the position where the new element will be inserted.
  p | Reference to a `unique_ptr` pointing to the element to be inserted in the array.

Returns
  Iterator pointing to the new element inserted.

This member function adds the object pointed by `p` as a element at the given position. The new element comes right before the element originally pointed by `i`. The object ownership is transferred to the array and nothing is copied.

At the end, a valid iterator pointing to the element just inserted is returned.

Warning
  The array gains ownership of the object managed by the given `unique_ptr` and will release it upon element destruction.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

iterator efl::eina::ptr_array< T, CloneAllocator >::insert | ( | iterator | i,
|  | size_t | n,
|  | value_type const & | t
| ) |  |
| inline

Insert `n` copies of `t` at the given position.

Parameters

  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.

Returns
  Iterator pointing to the first 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.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

iterator efl::eina::ptr_array< T, CloneAllocator >::insert | ( | iterator | i,
|  | size_t | n,
|  | pointer | p
| ) |  |
| inline

Insert the object pointed by `p` and `n-1` copies of it as elements at the given position.

Parameters

  i | Iterator pointing to the position where the new elements will be inserted.
  n | Number of elements to be inserted.
  p | Pointer to a pre-allocated object to be inserted in the array.

Returns
  Iterator pointing to the first inserted element.

This member function inserts the object pointed by `p` and `n-1` copies of it as elements at the given position. 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.

Warning
  The array gains ownership of the given pointer and will release the pointed object upon element destruction.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>
template<typename InputIterator >

iterator efl::eina::ptr_array< T, CloneAllocator >::insert | ( | iterator | p,
|  | InputIterator | i,
|  | InputIterator | j,
|  | typename eina::enable_if<!eina::is_integral< InputIterator >::value >::type * | = `0`
| ) |  |
| inline

Insert the elements between the given range at the given position.

Parameters

  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.

Returns
  Iterator pointing to the first inserted element.

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.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

iterator efl::eina::ptr_array< T, CloneAllocator >::erase | ( | iterator | q | ) |
| inline

Remove the element at the given position.

Parameters

  q | Iterator pointing to the element to be removed.

Returns
  Iterator pointing to the element after the removed one.

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.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

iterator efl::eina::ptr_array< T, CloneAllocator >::erase | ( | iterator | i,
|  | iterator | j
| ) |  |
| inline

Remove the elements between the given range.

Parameters

  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.

Returns
  Iterator pointing to the new position of the first non-removed element after the removed ones (i.e. the one originally pointed by `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 .

template<typename T, typename CloneAllocator = heap_no_copy_allocator>
template<typename InputIterator >

void efl::eina::ptr_array< T, CloneAllocator >::assign | ( | InputIterator | i,
|  | InputIterator | j,
|  | typename eina::enable_if<!eina::is_integral< InputIterator >::value >::type * | = `0`
| ) |  |
| inline

Replace the content of the array by the elements in the given range.

Parameters

  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.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

void efl::eina::ptr_array< T, CloneAllocator >::assign | ( | size_type | n,
|  | value_type const & | t
| ) |  |
| inline

Replace the content of the array by `n` copies `t`.

Parameters

  n | Number of elements.
  t | Value to be copied to each element.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

value_type& efl::eina::ptr_array< T, CloneAllocator >::back | ( |  | ) |
| inline

Get a reference to the last element.

Returns
  Reference to the last element in the array.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

value_type const& efl::eina::ptr_array< T, CloneAllocator >::back | ( |  | ) | const
| inline

Get a constant reference to the last element.

Returns
  Constant reference to the last element in the array.

Version of back() for const-qualified objects. Returns a constant reference instead.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

value_type& efl::eina::ptr_array< T, CloneAllocator >::front | ( |  | ) |
| inline

Get a reference to the first element.

Returns
  Reference to the first element of the array.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

value_type const& efl::eina::ptr_array< T, CloneAllocator >::front | ( |  | ) | const
| inline

Get a constant reference to the first element.

Returns
  Constant reference to the first element of the array.

Version of front() for const-qualified objects. Returns a constant reference instead.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

const_reference efl::eina::ptr_array< T, CloneAllocator >::operator[] | ( | size_type | index | ) | const
| inline

Get a constant reference to the element at the given position.

Parameters

  index | Position of the element in the array.

Returns
  Constant reference to element at position `index`.

Version of operator[](size_type index) for const-qualified objects. Returns a constant reference instead.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

reference efl::eina::ptr_array< T, CloneAllocator >::operator[] | ( | size_type | index | ) |
| inline

Get a reference to the element at the given position.

Parameters

  index | Position of the element in the array.

Returns
  Reference to element at position `index`.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

const_iterator efl::eina::ptr_array< T, CloneAllocator >::begin | ( |  | ) | const
| inline

Get a constant iterator pointing to the first element of the array.

Returns
  Constant iterator to the initial position of the array.

Version of begin() for const-qualified objects. Returns a constant iterator instead.

Referenced by efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::clear(), efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::operator=(), efl::eina::operator==(), and efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::ptr_array().

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

const_iterator efl::eina::ptr_array< T, CloneAllocator >::end | ( |  | ) | const
| inline

Get a constant iterator to the position following the last element of the array.

Returns
  Constant iterator to the final position of the array.

Version of end() for const-qualified objects. Returns a constant iterator instead.

Referenced by efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::assign(), efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::clear(), efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::operator=(), efl::eina::operator==(), and efl::eina::ptr_array< Eo, std::conditional< std::is_same< CloneAllocator, default_clone_allocator_placeholder >::value, eo_clone_allocator, CloneAllocator >::type >::ptr_array().

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

iterator efl::eina::ptr_array< T, CloneAllocator >::begin | ( |  | ) |
| inline

Get an iterator pointing to the first element of the array.

Returns
  Iterator to the initial position 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().

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

iterator efl::eina::ptr_array< T, CloneAllocator >::end | ( |  | ) |
| inline

Get an iterator to the position following the last element of the array.

Returns
  Iterator to the final position 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().

Note
  Note that attempting to access this position causes undefined behavior.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

const_reverse_iterator efl::eina::ptr_array< T, CloneAllocator >::rbegin | ( |  | ) | const
| inline

Get a constant reverse iterator pointing to the reverse begin of the array.

Returns
  Constant reverse iterator pointing to the reverse begin of the array.

Version of rbegin() for const-qualified objects. Returns a constant reverse iterator instead.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

const_reverse_iterator efl::eina::ptr_array< T, CloneAllocator >::rend | ( |  | ) | const
| inline

Get a constant reverse iterator pointing to the reverse end of the array.

Returns
  Constant reverse iterator pointing to the reverse end of the array.

Version of rend() for const-qualified objects. Returns a constant reverse iterator instead.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

reverse_iterator efl::eina::ptr_array< T, CloneAllocator >::rbegin | ( |  | ) |
| inline

Get a reverse iterator pointing to the reverse begin of the array.

Returns
  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().

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

reverse_iterator efl::eina::ptr_array< T, CloneAllocator >::rend | ( |  | ) |
| inline

Get a reverse iterator pointing to the reverse end of the array.

Returns
  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().

Note
  Note that attempting to access this position causes undefined behavior.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

const_iterator efl::eina::ptr_array< T, CloneAllocator >::cbegin | ( |  | ) | const
| inline

Get a constant iterator pointing to the first element of the array.

Returns
  Constant iterator to the initial position of the array.

This member function works like but is granted to return a constant iterator even for arrays that are not const-qualified.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

const_iterator efl::eina::ptr_array< T, CloneAllocator >::cend | ( |  | ) | const
| inline

Get a constant iterator to the position following the last element of the array.

Returns
  Constant iterator to the final position 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.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

const_reverse_iterator efl::eina::ptr_array< T, CloneAllocator >::crbegin | ( |  | ) | const
| inline

Get a constant reverse iterator pointing to the reverse begin of the array.

Returns
  Constant reverse iterator pointing to the reverse begin of the array.

This member function works like but is granted to return a constant reverse iterator even for arrays that are not const-qualified.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

const_reverse_iterator efl::eina::ptr_array< T, CloneAllocator >::crend | ( |  | ) | const
| inline

Get a constant reverse iterator pointing to the reverse end of the array.

Returns
  Constant reverse iterator pointing to the reverse end of the array.

This member function works like but is granted to return a constant reverse iterator even for arrays that are not const-qualified.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

eina::iterator<T> efl::eina::ptr_array< T, CloneAllocator >::ibegin | ( |  | ) |
| inline

Get an `eina::iterator` pointing to the first element of the array.

Returns
  `eina::iterator` to the initial position of the array.

This member function returns an `eina::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 iend().

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

eina::iterator<T> efl::eina::ptr_array< T, CloneAllocator >::iend | ( |  | ) |
| inline

Get an `eina::iterator` to the position following the last element of the array.

Returns
  `eina::iterator` to the final position of the array.

This member function returns an `eina::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 ibegin().

Note
  Note that attempting to access this position causes undefined behavior.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

eina::iterator<T const> efl::eina::ptr_array< T, CloneAllocator >::ibegin | ( |  | ) | const
| inline

Get a constant `eina::iterator` pointing to the first element of the array.

Returns
  Constant `eina::iterator` to the initial position of the array.

Version of ibegin() for const-qualified objects. Returns a constant `eina::iterator` instead.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

eina::iterator<T const> efl::eina::ptr_array< T, CloneAllocator >::iend | ( |  | ) | const
| inline

Get an constant `eina::iterator` to the position following the last element of the array.

Returns
  Constant `eina::iterator` to the final position of the array.

Version of iend() for const-qualified objects. Returns a constant `eina::iterator` instead.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

eina::iterator<T const> efl::eina::ptr_array< T, CloneAllocator >::cibegin | ( |  | ) | const
| inline

Get an `eina::iterator` pointing to the first element of the array.

Returns
  `eina::iterator` to the initial position of the array.

This member function works like but is granted to return a constant iterator even for arrays that are not const-qualified.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

eina::iterator<T const> efl::eina::ptr_array< T, CloneAllocator >::ciend | ( |  | ) | const
| inline

Get an constant `eina::iterator` to the position following the last element of the array.

Returns
  Constant `eina::iterator` to the final position of the array.

This member function works like but is granted to return a constant iterator even for arrays that are not const-qualified.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

void efl::eina::ptr_array< T, CloneAllocator >::swap | ( | ptr_array< T, CloneAllocator > & | other | ) |
| inline

Swap content between two arrays.

Parameters

  other | Other `ptr_array` of the same type.

Referenced by efl::eina::swap().

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

size_type efl::eina::ptr_array< T, CloneAllocator >::max_size | ( |  | ) | const
| inline

Get the maximum number of elements `ptr_array` can hold.

Returns
  Maximum number of elements a `ptr_array` can hold.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

Eina_Array* efl::eina::ptr_array< T, CloneAllocator >::native_handle | ( |  | ) |
| inline

Get a handle for the wrapped Eina_Array.

Returns
  Handle for the native Eina array.

This member function returns the native Eina_Array 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.

template<typename T, typename CloneAllocator = heap_no_copy_allocator>

Eina_Array const* efl::eina::ptr_array< T, CloneAllocator >::native_handle | ( |  | ) | const
| inline

Get a constant handle for the wrapped Eina_Array.

Returns
  Constant handle for the native Eina array.

Version of native_handle() for const-qualified objects. Returns a constant handle instead.

See also
  native_handle()