Go to the documentation of this file.
34 template<
class IteratorType>
41 template<
class IteratorType>
52 return IteratorType(list,
nullptr);
56 template<
class IteratorType>
67 return IteratorType(list,
nullptr);
151 std::swap(last_, lst.last_);
152 std::swap(size_, lst.size_);
175 return remove(iter.node_);
191 if (node_ !=
nullptr)
207 return (node_ !=
nullptr);
215 if (node_ == list_->last_ || list_->last_ ==
nullptr)
238 return node_ == iter.node_;
244 return node_ != iter.node_;
253 return iterator_first<iterator>();
263 return iterator_end<SLListBase::iterator>();
270 return iterator_end<SLListBase::const_iterator>();
306 return (node_ !=
nullptr);
314 if (node_ == list_->last_)
320 node_ = node_->next_;
326 inline bool Foam::SLListBase::const_iterator::operator==
331 return node_ == iter.node_;
335 inline bool Foam::SLListBase::const_iterator::operator!=
340 return node_ != iter.node_;
349 return iterator_first<const_iterator>();
const_iterator cbegin() const
Iterator to first item in list with const access.
const NullObject * nullObjectPtr
Pointer to the unique nullObject.
link * last()
Return last entry.
link * first()
Return first entry.
const_iterator(const const_iterator &)=default
Copy construct.
link * remove(link *item)
void clear()
Clear the list.
link * get_node() const
The storage node.
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.
bool good() const
Pointing at a valid storage node.
bool operator!=(const iterator &iter) const
The structure for a singly-linked storage node.
const link * get_node() const
The storage node.
static const IteratorType & iterator_end()
Factory method to return an iterator end.
void next()
Move forward through list.
void swap(SLListBase &lst)
Swap the contents of list.
void transfer(SLListBase &lst)
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
errorManip< error > abort(error &err)
constexpr auto cend(const C &c) -> decltype(c.end())
Return const_iterator to the end of the container c.
A primitive non-const node iterator.
A primitive const node iterator.
const iterator & end()
End of list for iterators.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label size() const noexcept
The number of elements in list.
iterator(const iterator &)=default
Copy construct.
Base for singly-linked lists.
bool good() const
Pointing at a valid storage node.
void operator=(const iterator &iter)
Copy assignment.
bool operator==(const iterator &iter) const
void next()
Move forward through list.
bool empty() const noexcept
True if the list is empty.
IteratorType iterator_first() const
Return iterator to first item or end-iterator if list is empty.
const const_iterator & cend() const
End of list for iterators.