Nodes in the smart list. More...
Public Member Functions | |
node_t () | |
Default constructor. This is for creating the root of a list. More... | |
node_t (const Data &d) | |
Initialized constructor. This is for creating a node in a list. More... | |
~node_t () | |
Destructor. More... | |
Public Attributes | |
Data *const | dat_ptr |
The data of the node. This is nullptr for a list's root. More... | |
size_t | ref_count |
ref_count counts 1 for the list and 2 for each iterator pointing to this node. More... | |
node_t * | next |
node_t * | prev |
Private Member Functions | |
node_t & | operator= (const node_t &) |
No assignments. More... | |
node_t (const node_t &that) | |
No copying. More... | |
Nodes in the smart list.
Definition at line 51 of file smart_list.hpp.
|
inline |
Default constructor. This is for creating the root of a list.
Definition at line 54 of file smart_list.hpp.
|
inlineexplicit |
Initialized constructor. This is for creating a node in a list.
Definition at line 57 of file smart_list.hpp.
|
inline |
Destructor.
Definition at line 755 of file smart_list.hpp.
References utils::smart_list< Data >::node_t::dat_ptr, utils::smart_list< Data >::node_t::next, utils::smart_list< Data >::node_t::prev, and utils::smart_list< Data >::node_t::ref_count.
|
private |
No copying.
|
private |
No assignments.
Data* const utils::smart_list< Data >::node_t::dat_ptr |
The data of the node. This is nullptr for a list's root.
Definition at line 63 of file smart_list.hpp.
Referenced by utils::smart_list< Data >::iterator_base< Data, false >::derefable(), utils::smart_list< Data >::merge(), utils::smart_list< Data >::iterator_base< Data, false >::operator*(), utils::smart_list< Data >::iterator_base< Data, false >::operator->(), and utils::smart_list< Data >::node_t::~node_t().
node_t* utils::smart_list< Data >::node_t::next |
Definition at line 68 of file smart_list.hpp.
Referenced by utils::smart_list< internal_ptr >::begin(), utils::smart_list< Data >::check_erase(), utils::smart_list< Data >::iterator_base< Data, false >::inc(), utils::smart_list< Data >::link(), utils::smart_list< Data >::merge(), utils::smart_list< internal_ptr >::push_front(), utils::smart_list< Data >::sort(), utils::smart_list< Data >::splice(), utils::smart_list< Data >::unlink(), and utils::smart_list< Data >::node_t::~node_t().
node_t* utils::smart_list< Data >::node_t::prev |
Definition at line 69 of file smart_list.hpp.
Referenced by utils::smart_list< Data >::iterator_base< Data, false >::inc(), utils::smart_list< Data >::link(), utils::smart_list< Data >::merge(), utils::smart_list< internal_ptr >::rbegin(), utils::smart_list< Data >::splice(), utils::smart_list< Data >::unlink(), and utils::smart_list< Data >::node_t::~node_t().
|
mutable |
ref_count counts 1 for the list and 2 for each iterator pointing to this node.
(So nodes are flagged for deletion when ref_count is even.)
Definition at line 66 of file smart_list.hpp.
Referenced by utils::smart_list< Data >::check_erase(), utils::smart_list< Data >::iterator_base< Value, Reversed >::unref(), and utils::smart_list< Data >::node_t::~node_t().