46#ifndef Foam_SLListBase_H
47#define Foam_SLListBase_H
83 link* last_ =
nullptr;
95 template<
class IteratorType>
100 template<
class IteratorType>
105 template<
class IteratorType>
110 template<
class IteratorType>
221 inline
void prev() = delete;
227 inline
void operator=(const
iterator& iter);
229 inline
bool operator==(const
iterator& iter) const;
230 inline
bool operator!=(const
iterator& iter) const;
266 inline
void prev() = delete;
305#include "SLListBaseI.H"
A primitive const node iterator.
const_iterator(const const_iterator &)=default
Copy construct.
A primitive non-const node iterator.
iterator(const iterator &)=default
Copy construct.
Base for singly-linked lists.
link * remove(link *item)
const_iterator cbegin() const
Iterator to first item in list with const access.
link * first()
Return first entry.
const const_iterator & cend() const
End of list for iterators.
void transfer(SLListBase &lst)
const iterator & end()
End of list for iterators.
bool empty() const noexcept
True if the list is empty.
link * last()
Return last entry.
const_iterator crbegin() const =delete
No reverse iteration.
link * removeHead()
Remove and return first entry.
IteratorType iterator_first() const
Return iterator to first item or end-iterator if list is empty.
void prepend(link *item)
Add at front of list.
static const IteratorType & iterator_end()
Factory method to return an iterator end.
label size() const noexcept
The number of elements in list.
IteratorType iterator_last() const
Return iterator to last item or end-iterator if list is empty.
void swap(SLListBase &lst)
Swap the contents of list.
void append(link *item)
Add at back of list.
~SLListBase()=default
Destructor.
const const_iterator & crend() const =delete
No reverse iteration.
iterator begin()
Iterator to first item in list with non-const access.
void clear()
Clear the list.
SLListBase(const SLListBase &)=delete
No copy construct.
static const IteratorType & iterator_rend()=delete
Factory method to return an iterator rend.
SLListBase()=default
Default construct.
void operator=(const SLListBase &)=delete
No copy assignment.
Includes some standard C++ headers, defines global macros and templates used in multiple places by Op...
The structure for a singly-linked storage node.
link()=default
Default construct.
link * next_
Pointer to next entry in list.