47 first_ = last_ = item;
72 first_ = last_ = item;
169 <<
"remove from empty list"
174 first_ = first_->
next_;
192 if (item == first_ && first_ == last_)
197 else if (item == first_)
199 first_ = first_->
next_;
200 first_->
prev_ = first_;
202 else if (item == last_)
204 last_ = last_->
prev_;
205 last_->
next_ = last_;
229 if (oldLink == first_ && first_ == last_)
234 else if (oldLink == first_)
239 else if (oldLink == last_)
link * replace(link *oldLink, link *newLink)
Replace oldLink with newLink and return element.
void prepend(link *item)
Add at front of list.
bool swapDown(link *item)
Swap this element with the one below unless it is at the bottom.
link * removeHead()
Remove and return first entry.
bool swapUp(link *item)
Swap this element with the one above unless it is at the top.
unsigned int remove()
Remove and return the last element.
bool append() const noexcept
True if output format uses an append mode.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManip< error > abort(error &err)
The structure for a doubly-linked storage node.
link * next_
Pointer to next entry in list.
link * prev_
Pointer to prev entry in list.
void deregister() noexcept
Deregister the node after removal.