46 #ifndef Foam_DLListBase_H 47 #define Foam_DLListBase_H 91 link* first_ =
nullptr;
94 link* last_ =
nullptr;
106 template<
class IteratorType>
111 template<
class IteratorType>
116 template<
class IteratorType>
121 template<
class IteratorType>
341 const link*
last()
const {
return back(); }
void operator=(const DLListBase &)=delete
No copy assignment.
link * first()
Return first entry.
link * remove(link *item)
Remove and return element.
const_iterator(const const_iterator &)=default
Copy construct.
const const_iterator & crend() const
End of list for reverse iterators.
Base for doubly-linked lists.
void transfer(DLListBase &lst)
Transfer the contents of the argument into this list and annul the argument list. ...
The structure for a doubly-linked storage node.
link * last()
Return last entry.
link * removeHead()
Remove and return first entry.
bool swapDown(link *item)
Swap this element with the one below unless it is at the bottom.
link * replace(link *oldLink, link *newLink)
Replace oldLink with newLink and return element.
~DLListBase()=default
Destructor.
void append(link *item)
Add at back of list.
iterator begin()
Iterator to first item in list with non-const access.
link * prev_
Pointer to prev entry in list.
link * back()
Return last entry.
label size() const noexcept
The number of elements in list.
static const IteratorType & iterator_end()
Factory method to return an iterator end.
bool good() const noexcept
Pointing at a valid storage node.
const const_iterator & cend() const
End of list for iterators.
void prepend(link *item)
Add at front of list.
DLListBase()=default
Default construct.
A primitive const node iterator (bidirectional).
A primitive non-const node iterator.
void deregister() noexcept
Deregister the node (after removal)
friend class const_iterator
void push_front(link *item)
Add at front of list.
const iterator & end()
End of list for iterators.
link * front()
Return first entry.
void push_back(link *item)
Add at back of list.
bool empty() const noexcept
True if the list is empty.
bool swapUp(link *item)
Swap this element with the one above unless it is at the top.
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.
const_iterator crbegin() const
Iterator to last item in list with const access.
bool registered() const noexcept
Node registered (linked) in a list?
void prev()
Move backward through list.
link() noexcept=default
Default construct.
Includes some standard C++ headers, defines global macros and templates used in multiple places by Op...
bool operator!=(const eddy &a, const eddy &b)
void clear()
Clear the list.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
link * next_
Pointer to next entry in list.
void next()
Move forward through list.
const link * get_node() const noexcept
The storage node.
IteratorType iterator_first() const
Return iterator to first item or end-iterator if list is empty.
IteratorType iterator_last() const
Return iterator to last item or end-iterator if list is empty.
void swap(DLListBase &lst)
Swap the contents of the list.