66 return prev_ != 0 && next_ != 0;
153 nElmts_ = lst.nElmts_;
165 return remove(it.curElmt_);
176 return replace(oldIter.curElmt_, newLink);
190 inline Foam::DLListBase::iterator::iterator(
DLListBase& s)
200 curElmt_ = iter.curElmt_;
201 curLink_ = iter.curLink_;
207 return curElmt_ == iter.curElmt_;
213 return curElmt_ != iter.curElmt_;
229 if (curLink_.
next_ == curElmt_ || curList_.last_ == 0)
235 curElmt_ = curLink_.
next_;
236 curLink_ = *curElmt_;
287 curList_(iter.curList_),
288 curElmt_(iter.curElmt_)
292 inline void Foam::DLListBase::const_iterator::operator=
297 curElmt_ = iter.curElmt_;
301 inline bool Foam::DLListBase::const_iterator::operator==
306 return curElmt_ == iter.curElmt_;
310 inline bool Foam::DLListBase::const_iterator::operator!=
315 return curElmt_ != iter.curElmt_;
329 if (curElmt_ == curList_.last_)
335 curElmt_ = curElmt_->
next_;
360 return endConstIter_;
368 return endConstIter_;
382 return endConstIter_;
399 inline void Foam::DLListBase::const_reverse_iterator::operator=
404 curElmt_ = iter.curElmt_;
408 inline bool Foam::DLListBase::const_reverse_iterator::operator==
413 return curElmt_ == iter.curElmt_;
417 inline bool Foam::DLListBase::const_reverse_iterator::operator!=
422 return curElmt_ != iter.curElmt_;
436 if (curElmt_ == curList_.first_)
442 curElmt_ = curElmt_->
prev_;
467 return endConstRevIter_;
475 return endConstRevIter_;
489 return endConstRevIter_;
const_reverse_iterator & operator++()
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void operator=(const iterator &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const_reverse_iterator(const DLListBase &, const link *)
Construct for a given DLListBase and link.
link * remove(link *)
Remove and return element.
const const_reverse_iterator & crend() const
bool empty() const
Return true if the list is empty.
bool registered() const
Check if the link is registered with the DLListBase.
link * replace(link *oldLink, link *newLink)
Replace oldLink with newLink and return element.
void deregister()
Deregister the link after removal.
bool operator!=(const iterator &) const
const_iterator & operator++()
link * last()
Return last entry.
link * prev_
Pointer to next entry in list.
const_reverse_iterator crbegin() const
const_reverse_iterator rbegin() const
label size() const
Return number of elements in list.
An STL-conforming const_reverse_iterator.
const const_iterator & cend() const
bool operator==(const iterator &) const
link * first()
Return first entry.
An STL-conforming const_iterator.
An STL-conforming iterator.
errorManip< error > abort(error &err)
friend class const_reverse_iterator
const const_reverse_iterator & rend() const
DLListBase()
Null construct.
void transfer(DLListBase &)
Transfer the contents of the argument into this List.
const_iterator cbegin() const
void clear()
Clear the list.
A class for managing temporary objects.
const_iterator(const DLListBase &, const link *)
Construct for a given DLListBase and link.