34template<
class IteratorType>
41template<
class IteratorType>
48template<
class IteratorType>
59 return IteratorType(list,
nullptr);
63template<
class IteratorType>
74 return IteratorType(list,
nullptr);
82 return iterator_end<DLListBase::iterator>();
89 return iterator_end<DLListBase::const_iterator>();
96 return iterator_rend<DLListBase::const_iterator>();
104 return prev_ !=
nullptr && next_ !=
nullptr;
110 prev_ = next_ =
nullptr;
193 std::swap(first_, lst.first_);
194 std::swap(last_, lst.last_);
195 std::swap(size_, lst.size_);
220 return remove(iter.node_);
231 return replace(oldIter.node_, newItem);
247 if (node_ !=
nullptr)
263 return (node_ !=
nullptr);
273 if (node_ == copy_.prev_ || list_->first_ ==
nullptr)
292 if (node_ == copy_.next_ || list_->last_ ==
nullptr)
315 return node_ == iter.node_;
321 return node_ != iter.node_;
330 return iterator_first<iterator>();
369 return (node_ !=
nullptr);
377 if (node_ == list_->first_)
383 node_ = node_->prev_;
393 if (node_ == list_->last_)
399 node_ = node_->next_;
410 return node_ == iter.node_;
419 return node_ != iter.node_;
428 return iterator_first<const_iterator>();
440 return iterator_last<const_iterator>();
A primitive const node iterator (bidirectional).
void next()
Move forward through list.
bool good() const noexcept
Pointing at a valid storage node.
const link * get_node() const noexcept
The storage node.
void prev()
Move backward through list.
A primitive non-const node iterator.
void next()
Move forward through list.
void operator=(const iterator &iter)
bool good() const noexcept
Pointing at a valid storage node.
void prev()
Move backward through list.
link * get_node() const noexcept
The storage node.
Base for doubly-linked lists.
const const_iterator & cend() const
End of list for iterators.
link * first()
Return first entry.
const const_iterator & crend() const
End of list for reverse iterators.
bool empty() const noexcept
True if the list is empty.
link * last()
Return last entry.
link * replace(link *oldLink, link *newLink)
Replace oldLink with newLink and return element.
IteratorType iterator_first() const
Return iterator to first item or end-iterator if list is empty.
void swap(DLListBase &lst)
Swap the contents of the list.
const iterator & end()
End of list for iterators.
static const IteratorType & iterator_end()
Factory method to return an iterator end.
label size() const noexcept
The number of elements in list.
iterator begin()
Iterator to first item in list with non-const access.
IteratorType iterator_last() const
Return iterator to last item or end-iterator if list is empty.
static const IteratorType & iterator_rend()
Factory method to return an iterator reverse end.
const_iterator cbegin() const
Iterator to first item in list with const access.
void clear()
Clear the list.
const_iterator crbegin() const
Iterator to last item in list with const access.
Forward iterator with non-const access.
unsigned int remove()
Remove and return the last element.
A const_iterator for iterating across on values.
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
friend bool operator!=(const refineCell &rc1, const refineCell &rc2)
friend bool operator==(const refineCell &rc1, const refineCell &rc2)
transferModelList & transfer()
Transfer.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const NullObject * nullObjectPtr
Pointer to the unique nullObject.
errorManip< error > abort(error &err)
The structure for a doubly-linked storage node.
bool registered() const noexcept
Check if the node is registered with the list.
void deregister() noexcept
Deregister the node after removal.