46 #ifndef Foam_SLListBase_H 47 #define Foam_SLListBase_H 86 link* last_ =
nullptr;
98 template<
class IteratorType>
103 template<
class IteratorType>
108 template<
class IteratorType>
113 template<
class IteratorType>
151 inline link*
front();
154 inline const link*
front()
const;
160 inline const link*
back()
const;
173 link*
remove(link* item);
224 inline
void prev() = delete;
230 inline
void operator=(const
iterator& iter);
232 inline
bool operator==(const
iterator& iter) const;
233 inline
bool operator!=(const
iterator& iter) const;
269 inline
void prev() = delete;
317 const link*
last()
const {
return back(); }
link * next_
Pointer to next entry in list.
link * get_node() const noexcept
The storage node.
void swap(SLListBase &lst)
Swap the contents of list.
bool empty() const noexcept
True if the list is empty.
link * first()
Return first entry.
const const_iterator & crend() const =delete
No reverse iteration.
SLListBase()=default
Default construct.
Base for singly-linked lists.
void clear()
Clear the list.
A primitive const node iterator.
const_iterator cbegin() const
Iterator to first item in list with const access.
link * back()
Return last entry.
The structure for a singly-linked storage node.
iterator(const iterator &)=default
Copy construct.
const const_iterator & cend() const
End of list for iterators.
bool good() const noexcept
Pointing at a valid storage node.
label size() const noexcept
The number of elements in list.
void prev()=delete
Cannot move backward through list.
friend class const_iterator
link * front()
Return first entry.
link * last()
Return last entry.
const_iterator crbegin() const =delete
No reverse iteration.
const iterator & end()
End of list for iterators.
IteratorType iterator_last() const
Return iterator to last item or end-iterator if list is empty.
void push_front(link *item)
Add at front of list.
iterator begin()
Iterator to first item in list with non-const access.
void append(link *item)
Add at back of list.
void operator=(const SLListBase &)=delete
No copy assignment.
~SLListBase()=default
Destructor.
Includes some standard C++ headers, defines global macros and templates used in multiple places by Op...
void prepend(link *item)
Add at front of list.
void deregister() noexcept
Deregister the node (after removal)
link() noexcept=default
Default construct.
link * removeHead()
Remove and return first entry.
static const IteratorType & iterator_rend()=delete
Factory method to return an iterator rend.
void transfer(SLListBase &lst)
Transfer the contents of the argument into this list and annul the argument list. ...
void push_back(link *item)
Add at back of list.
A primitive non-const node iterator.
IteratorType iterator_first() const
Return iterator to first item or end-iterator if list is empty.
static const IteratorType & iterator_end()
Factory method to return an iterator end.
void next()
Move forward through list.