21 #ifndef __MINILIB_BASIC_SHARED_LIST_H__
22 #define __MINILIB_BASIC_SHARED_LIST_H__
24 #include "../mn_config.hpp"
28 #include "../mn_autolock.hpp"
29 #include "../pointer/mn_shared_ptr.hpp"
42 template <
typename T,
typename TLockType = mn::mutex_t>
89 template<
class InputIterator>
338 template <
typename T,
typename TLockType = mn::mutex_t>
Definition: mn_lock.hpp:122
Definition: mn_list.hpp:77
const T & back() const
Definition: mn_list.hpp:130
basic_node< T > node_type
Definition: mn_list.hpp:83
void push_back(const T &value)
Definition: mn_list.hpp:144
iterator erase(iterator it)
Definition: mn_list.hpp:161
iterator insert(iterator pos, const T &value)
Definition: mn_list.hpp:155
void pop_front()
Definition: mn_list.hpp:137
TAllocator allocator_type
Definition: mn_list.hpp:81
TDeleter deleter
Definition: mn_list.hpp:84
list_node_iterator< const node_type *, const value_type *, const value_type & > const_iterator
Definition: mn_list.hpp:87
list_node_iterator< node_type *, const value_type *, const value_type & > iterator
Definition: mn_list.hpp:86
mn::size_t size_type
Definition: mn_list.hpp:82
iterator end()
Definition: mn_list.hpp:124
void push_front(const T &value)
Definition: mn_list.hpp:133
void pop_back()
Definition: mn_list.hpp:148
const T & front() const
Definition: mn_list.hpp:127
iterator begin()
Definition: mn_list.hpp:121
T value_type
Definition: mn_list.hpp:80
Definition: mn_node.hpp:113
A simple list of shared_ptr items.
Definition: mn_shared_list.hpp:43
const_iterator begin_save() const
Get the read/write iterator that points to the first element from the list.
Definition: mn_shared_list.hpp:116
reference front_save()
Get a read/write reference to the data at the first element .
Definition: mn_shared_list.hpp:160
pointer::shared_atomic_ptr< T > pointer_type
Definition: mn_shared_list.hpp:52
TLockType lock_type
Definition: mn_shared_list.hpp:51
typename base_type::allocator_type allocator_type
Definition: mn_shared_list.hpp:59
base_type & list(unsigned long xTicksToWait=portMAX_DELAY) noexcept
Get the used list of this object.
Definition: mn_shared_list.hpp:301
iterator erase_save(iterator first, iterator last, unsigned long xTicksToWait=portMAX_DELAY)
Remove a range of elements.
Definition: mn_shared_list.hpp:291
const_iterator end_save(unsigned long xTicksToWait=portMAX_DELAY) const
Get the read/write iterator that points to the last element from the list.
Definition: mn_shared_list.hpp:138
reference back_save(unsigned long xTicksToWait=portMAX_DELAY)
Get a read/write reference to the data at the last element.
Definition: mn_shared_list.hpp:182
basic_shared_list(InputIterator first, InputIterator last, const allocator_type &allocator=allocator_type()) noexcept
Builds a basic_shared_list from a range.
Definition: mn_shared_list.hpp:90
iterator insert_save(iterator pos, pointer_type value, unsigned long xTicksToWait=portMAX_DELAY)
Inserts given value into the list before specified iterator.
Definition: mn_shared_list.hpp:267
iterator begin_save(unsigned long xTicksToWait=portMAX_DELAY)
Get the read/write iterator that points to the first element from the list.
Definition: mn_shared_list.hpp:105
basic_shared_list(lock_type &lLock, const allocator_type &allocator=allocator_type()) noexcept
Creates a basic_shared_list with no elements.
Definition: mn_shared_list.hpp:77
const_reference back_save(unsigned long xTicksToWait=portMAX_DELAY) const
Get a read/write reference to the data at the last element.
Definition: mn_shared_list.hpp:171
int unlock()
Unlock this object.
Definition: mn_shared_list.hpp:328
void push_back_save(pointer pValue, unsigned long xTicksToWait=portMAX_DELAY)
Add data to the back of the list.
Definition: mn_shared_list.hpp:202
void pop_front_save(unsigned long xTicksToWait=portMAX_DELAY)
Removes first element.
Definition: mn_shared_list.hpp:243
const typename base_type::value_type & const_reference
Definition: mn_shared_list.hpp:56
lock_type m_lockObject
The lock object.
Definition: mn_shared_list.hpp:335
list< pointer::shared_atomic_ptr< T > > base_type
The base type of this object.
Definition: mn_shared_list.hpp:47
void pop_back_save(unsigned long xTicksToWait=portMAX_DELAY)
Removes last element.
Definition: mn_shared_list.hpp:234
iterator erase_save(iterator it, unsigned long xTicksToWait=portMAX_DELAY)
remove given value into the list before specified iterator.
Definition: mn_shared_list.hpp:278
void push_front_save(pointer_type pValue, unsigned long xTicksToWait=portMAX_DELAY)
Add data to the front of the list.
Definition: mn_shared_list.hpp:213
const base_type & list(unsigned long xTicksToWait=portMAX_DELAY) const noexcept
Get the used list of this object.
Definition: mn_shared_list.hpp:311
void push_back_save(pointer_type pValue, unsigned long xTicksToWait=portMAX_DELAY)
Add data to the back of the list.
Definition: mn_shared_list.hpp:224
typename base_type::value_type & reference
Definition: mn_shared_list.hpp:55
int lock(unsigned long xTicksToWait=portMAX_DELAY)
Lock this object.
Definition: mn_shared_list.hpp:321
const_reference front_save(unsigned long xTicksToWait=portMAX_DELAY) const
Get a read/write reference to the data at the first element.
Definition: mn_shared_list.hpp:149
typename base_type::value_type * pointer
Definition: mn_shared_list.hpp:57
basic_shared_list(const allocator_type &allocator=allocator_type())
Creates a basic_shared_list with no elements.
Definition: mn_shared_list.hpp:70
iterator insert(iterator pos, pointer value, unsigned long xTicksToWait=portMAX_DELAY)
Inserts given value into the list before specified iterator.
Definition: mn_shared_list.hpp:255
basic_shared_list(const basic_shared_list &rhs) noexcept
Construct a new basic shared list object.
Definition: mn_shared_list.hpp:96
iterator end_save(unsigned long xTicksToWait=portMAX_DELAY)
Get the read/write iterator that points to the last element from the list.
Definition: mn_shared_list.hpp:127
const typename base_type::value_type * const_pointer
Definition: mn_shared_list.hpp:58
void push_front_save(pointer pValue, unsigned long xTicksToWait=portMAX_DELAY)
Add data to the front of the list.
Definition: mn_shared_list.hpp:192
Definition: mn_list.hpp:29
Definition: mn_shared_ptr.hpp:29
#define portMAX_DELAY
Definition: mn_autolock.hpp:34
Definition: mn_allocator_typetraits.hpp:25