Public Types | |
typedef _base_type::value_type | value_type |
typedef _base_type::reference | reference |
typedef _base_type::const_reference | const_reference |
typedef _base_type::const_iterator | const_iterator |
typedef _base_type::iterator | iterator |
typedef _base_type::pointer | pointer |
typedef _base_type::const_pointer | const_pointer |
typedef _base_type::size_type | size_type |
typedef _base_type::difference_type | difference_type |
typedef _base_type::clone_allocator_type | clone_allocator_type |
typedef _base_type::reverse_iterator | reverse_iterator |
typedef _base_type::const_reverse_iterator | const_reverse_iterator |
typedef _base_type::native_handle_type | native_handle_type |
Public Member Functions | |
list & | operator= (list &&other)=default |
list (list &&other)=default | |
void | clear () |
Remove all the elements of the list. | |
std::size_t | size () const |
Get the current size of the list. More... | |
bool | empty () const |
Check if the list is empty. More... | |
clone_allocator_type | get_clone_allocator () const |
Get the clone allocator of the list. More... | |
void | push_back (const_reference a) |
Add a copy of the given element at the end of the list. More... | |
void | push_back (pointer p) |
Add the object pointed by p as a element at the end of the list. 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 list. More... | |
void | push_front (const_reference a) |
Add a copy of the given element at the beginning of the list. More... | |
void | push_front (pointer p) |
Add the object pointed by p as a element at the beginning of the list. More... | |
template<typename Deleter > | |
void | push_front (std::unique_ptr< T, Deleter > &p) |
Add the object pointed by p as a element at the beginning of the list. More... | |
void | pop_back () |
Remove the last element of the list. | |
void | pop_front () |
Remove the first element of the list. | |
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 list by the elements in the given range. More... | |
void | assign (size_type n, value_type const &t) |
Replace the content of the list 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_iterator | begin () const |
Get a constant iterator pointing to the first element of the list. More... | |
iterator | begin () |
Get an iterator pointing to the first element of the list. More... | |
const_iterator | end () const |
Get a constant iterator to the position following the last element of the list. More... | |
iterator | end () |
Get an iterator to the position following the last element of the list. More... | |
const_reverse_iterator | rbegin () const |
Get a constant reverse iterator pointing to the reverse begin of the list. More... | |
reverse_iterator | rbegin () |
Get a reverse iterator pointing to the reverse begin of the list. More... | |
const_reverse_iterator | rend () const |
Get a constant reverse iterator pointing to the reverse end of the list. More... | |
reverse_iterator | rend () |
Get a reverse iterator pointing to the reverse end of the list. More... | |
const_iterator | cbegin () const |
Get a constant iterator pointing to the first element of the list. More... | |
const_iterator | cend () const |
Get a constant iterator to the position following the last element of the list. More... | |
const_reverse_iterator | crbegin () const |
Get a constant reverse iterator pointing to the reverse begin of the list. More... | |
const_reverse_iterator | crend () const |
Get a constant reverse iterator pointing to the reverse end of the list. More... | |
eina::iterator< value_type > | ibegin () |
Get an eina::iterator pointing to the first element of the list. More... | |
eina::iterator< T const > | ibegin () const |
Get a constant eina::iterator pointing to the first element of the list. More... | |
eina::iterator< value_type > | iend () |
Get an eina::iterator to the position following the last element of the list. More... | |
eina::iterator< T const > | iend () const |
Get an constant eina::iterator to the position following the last element of the list. More... | |
eina::iterator< T const > | cibegin () const |
Get an eina::iterator pointing to the first element of the list. More... | |
eina::iterator< T const > | ciend () const |
Get an constant eina::iterator to the position following the last element of the list. More... | |
void | swap (ptr_list< T, CloneAllocator > &other) |
Swap content between two lists. More... | |
size_type | max_size () const |
Get the maximum number of elements ptr_list can hold. More... | |
Eina_List * | native_handle () |
Get a handle for the wrapped Eina_List . More... | |
Eina_List const * | native_handle () const |
Get a constant handle for the wrapped Eina_List. More... | |
eina::accessor< T const > | accessor () const |
Get a constant eina::accessor for the list. More... | |
eina::accessor< value_type > | accessor () |
Get a eina::accessor for the list. More... | |
Eina_List * | release_native_handle () |
|
inline |
Get the current size of the list.
This member function returns the current number of elements inside the list.
|
inline |
Check if the list is empty.
true
if the list is empty, false
otherwise.This member function returns true
if the list does not contain any elements, otherwise it returns false
.
|
inline |
Get the clone allocator of the list.
|
inline |
Add a copy of the given element at the end of the list.
a | Element to be added at the end of the list. |
This member function allocates a new element, as a copy of a
, and inserts it at the end of the list.
|
inline |
Add the object pointed by p
as a element at the end of the list.
p | Pointer to a pre-allocated element to be inserted at the end of the list. |
This member function adds the object pointed by p
as a element at the end of the list. The list gains ownership of the pointer and nothing is copied.
|
inline |
Add the object pointed by p
as a element at the end of the list.
p | Reference to a unique_ptr pointing to a element to be inserted at the end of the list. |
This member function adds the object pointed by the given unique_ptr
as a element at the end of the list. The object ownership is transfered to the list and nothing is copied.
unique_ptr
and will release it upon element destruction.
|
inline |
Add a copy of the given element at the beginning of the list.
a | Element to be added at the beginning of the list. |
This member function allocates a new element, as a copy of a
, and inserts it at the beginning of the list.
|
inline |
Add the object pointed by p
as a element at the beginning of the list.
p | Pointer to a pre-allocated element to be inserted at the beginning of the list. |
This member function adds the object pointed by p
as a element at the beginning of the list. The list gains ownership of the pointer and nothing is copied.
|
inline |
Add the object pointed by p
as a element at the beginning of the list.
p | Reference to a unique_ptr pointing to a element to be inserted at the beginning of the list. |
This member function adds the object pointed by the given unique_ptr
as a element at the beginning of the list. The object ownership is transfered to the list and nothing is copied.
unique_ptr
and will release it upon element destruction.
|
inline |
Insert a copy of the given 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.
|
inline |
Insert the object pointed by pv
as a element at the given position.
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 list. |
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 list gains ownership of the pointer and nothing is copied.
At the end, a valid iterator pointing to the element just inserted is returned.
|
inline |
Insert the object pointed by p
as a element at the given position.
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 list. |
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 transfered to the list and nothing is copied.
At the end, a valid iterator pointing to the element just inserted is returned.
unique_ptr
and will release it upon element destruction.
|
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 list, 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.
|
inline |
Insert the object pointed by p
and n-1
copies of it as elements at the given position.
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 list. |
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.
|
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 list size by one. At the end, a valid iterator pointing to the element right after the removed one is returned.
|
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 .
|
inline |
Replace the content of the list 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 list is adjusted accordingly and the newly copied elements remain in their original order.
|
inline |
Replace the content of the list by n
copies t
.
n | Number of elements. |
t | Value to be copied to each element. |
|
inline |
Get a reference to the last element.
|
inline |
Get a constant reference to the last element.
Version of back() for const-qualified 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 objects. Returns a constant reference instead.
|
inline |
Get a constant iterator pointing to the first element of the list.
Version of begin() for const-qualified objects. Returns a constant iterator instead.
|
inline |
Get an iterator pointing to the first element of the list.
This member function returns an iterator pointing to the first element of the list. If the list is empty the returned iterator is the same as the one returned by end().
|
inline |
Get a constant iterator to the position following the last element of the list.
Version of end() for const-qualified objects. Returns a constant iterator instead.
|
inline |
Get an iterator to the position following the last element of the list.
This member function returns an iterator to the position following the last element in the list. If the list is empty the returned iterator is the same as the one returned by begin().
|
inline |
Get a constant reverse iterator pointing to the reverse begin of the list.
Version of rbegin() for const-qualified objects. Returns a constant reverse iterator instead.
|
inline |
Get a reverse iterator pointing to the reverse begin of the list.
This member function returns a reverse iterator pointing to the last element of the list. If the list is empty the returned reverse iterator is the same as the one returned by rend().
|
inline |
Get a constant reverse iterator pointing to the reverse end of the list.
Version of rend() for const-qualified objects. Returns a constant reverse iterator instead.
|
inline |
Get a reverse iterator pointing to the reverse end of the list.
This member function returns a reverse iterator pointing to the position before the first element of the list. If the list 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 list.
This member function works like begin() const but is granted to return a constant iterator even for lists that are not const-qualified.
|
inline |
Get a constant iterator to the position following the last element of the list.
This member function works like end() const but is granted to return a constant iterator even for lists that are not const-qualified.
|
inline |
Get a constant reverse iterator pointing to the reverse begin of the list.
This member function works like rbegin() const but is granted to return a constant reverse iterator even for lists that are not const-qualified.
|
inline |
Get a constant reverse iterator pointing to the reverse end of the list.
This member function works like rend() const but is granted to return a constant reverse iterator even for lists that are not const-qualified.
|
inline |
Get an eina::iterator
pointing to the first element of the list.
eina::iterator
to the initial position of the list.This member function returns an eina::iterator
pointing to the first element of the list. If the list is empty the returned iterator is the same as the one returned by iend().
|
inline |
Get a constant eina::iterator
pointing to the first element of the list.
eina::iterator
to the initial position of the list.Version of ibegin() for const-qualified objects. Returns a constant eina::iterator
instead.
|
inline |
Get an eina::iterator
to the position following the last element of the list.
eina::iterator
to the final position of the list.This member function returns an eina::iterator
to the position following the last element in the list. If the list is empty the returned iterator is the same as the one returned by ibegin().
|
inline |
Get an constant eina::iterator
to the position following the last element of the list.
eina::iterator
to the final position of the list.Version of iend() for const-qualified objects. Returns a constant eina::iterator
instead.
|
inline |
Get an eina::iterator
pointing to the first element of the list.
eina::iterator
to the initial position of the list.This member function works like ibegin() const but is granted to return a constant iterator even for lists that are not const-qualified.
|
inline |
Get an constant eina::iterator
to the position following the last element of the list.
eina::iterator
to the final position of the list.This member function works like iend() const but is granted to return a constant iterator even for lists that are not const-qualified.
|
inline |
Swap content between two lists.
other | Other ptr_list of the same type. |
|
inline |
|
inline |
Get a handle for the wrapped Eina_List
.
This member function returns the native Eina_List handle that is wrapped inside this object.
|
inline |
Get a constant handle for the wrapped Eina_List.
Version of native_handle() for const-qualified objects. Returns a constant handle instead.
|
inline |
Get a constant eina::accessor for the list.
eina::accessor
to the list.Version of accessor() to const-qualified inline lists. Returns a const-qualified eina::accessor
instead.
|
inline |
Get a eina::accessor for the list.
eina::accessor
to the list.