47 first_ = last_ = item;
72 first_ = last_ = item;
100 ap->prev_->next_ = a;
110 a->next_->prev_ = ap;
130 DLListBase::link *an = a->
next_;
149 an->next_->prev_ = a;
167 <<
"remove from empty list"
175 DLListBase::link *ret = first_;
176 first_ = first_->
next_;
192 DLListBase::link *ret = item;
194 if (item == first_ && first_ == last_)
199 else if (item == first_)
201 first_ = first_->next_;
202 first_->prev_ = first_;
204 else if (item == last_)
206 last_ = last_->prev_;
207 last_->next_ = last_;
211 item->next_->prev_ = item->prev_;
212 item->prev_->next_ = item->next_;
222 DLListBase::link* oldLink,
223 DLListBase::link* newLink
226 DLListBase::link *ret = oldLink;
231 if (oldLink == first_ && first_ == last_)
236 else if (oldLink == first_)
239 newLink->next_->prev_ = newLink;
241 else if (oldLink == last_)
244 newLink->prev_->next_ = newLink;
248 newLink->prev_->next_ = newLink;
249 newLink->next_->prev_ = newLink;
void push_back(link *item)
Add at back of list.
link * replace(link *oldLink, link *newLink)
Replace oldLink with newLink and return element.
bool swapDown(link *item)
Swap this element with the one below unless it is at the bottom.
link * removeHead()
Remove and return first entry.
void push_front(link *item)
Add at front of list.
link * remove(link *item)
Remove and return element.
bool swapUp(link *item)
Swap this element with the one above unless it is at the top.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
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).