Go to the documentation of this file.
34 template<
class IteratorType>
41 template<
class IteratorType>
48 template<
class IteratorType>
59 return IteratorType(list,
nullptr);
63 template<
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_;
405 inline bool Foam::DLListBase::const_iterator::operator==
410 return node_ == iter.node_;
414 inline bool Foam::DLListBase::const_iterator::operator!=
419 return node_ != iter.node_;
428 return iterator_first<const_iterator>();
440 return iterator_last<const_iterator>();
void swap(DLListBase &lst)
const NullObject * nullObjectPtr
bool operator==(const iterator &) const
constexpr auto crend(const C &c) -> decltype(c.rend())
link * remove(link *item)
const const_iterator & crend() const
bool operator!=(const iterator &) const
const_iterator crbegin() const
void operator=(const iterator &iter)
iterator(const iterator &)=default
const_iterator(const const_iterator &)=default
friend class const_iterator
const link * get_node() const
bool empty() const noexcept
const const_iterator & cend() const
IteratorType iterator_last() const
void transfer(DLListBase &lst)
constexpr auto end(C &c) -> decltype(c.end())
errorManip< error > abort(error &err)
constexpr auto cend(const C &c) -> decltype(c.end())
Base for doubly-linked lists.
#define FatalErrorInFunction
const_iterator cbegin() const
label size() const noexcept
link * replace(link *oldLink, link *newLink)
IteratorType iterator_first() const
static const IteratorType & iterator_rend()
static const IteratorType & iterator_end()