Base for doubly-linked lists. More...
Classes | |
class | const_iterator |
class | iterator |
struct | link |
Public Member Functions | |
DLListBase ()=default | |
DLListBase (const DLListBase &)=delete | |
void | operator= (const DLListBase &)=delete |
~DLListBase ()=default | |
label | size () const noexcept |
bool | empty () const noexcept |
link * | first () |
const link * | first () const |
link * | last () |
const link * | last () const |
void | insert (link *item) |
void | append (link *item) |
bool | swapUp (link *item) |
bool | swapDown (link *item) |
link * | removeHead () |
link * | remove (link *item) |
link * | remove (iterator &iter) |
link * | replace (link *oldLink, link *newLink) |
link * | replace (iterator &oldIter, link *newitem) |
void | clear () |
void | swap (DLListBase &lst) |
void | transfer (DLListBase &lst) |
iterator | begin () |
const_iterator | cbegin () const |
const_iterator | crbegin () const |
const iterator & | end () |
const const_iterator & | cend () const |
const const_iterator & | crend () const |
Protected Member Functions | |
template<class IteratorType > | |
IteratorType | iterator_first () const |
template<class IteratorType > | |
IteratorType | iterator_last () const |
Static Protected Member Functions | |
template<class IteratorType > | |
static const IteratorType & | iterator_end () |
template<class IteratorType > | |
static const IteratorType & | iterator_rend () |
Friends | |
class | iterator |
class | const_iterator |
Base for doubly-linked lists.
The iterators associated with the list only have a core functionality for navigation, with additional functionality to be added by inheriting classes. The node iterators always have a node-pointer as the first member data, which allows reinterpret_cast from anything else with a nullptr as its first data member. The nullObject is such an item (with a nullptr data member).
Definition at line 57 of file DLListBase.H.
|
default |
|
delete |
|
default |
|
inlinestaticprotected |
Definition at line 28 of file DLListBaseI.H.
References Foam::nullObjectPtr.
|
inlinestaticprotected |
Definition at line 35 of file DLListBaseI.H.
References Foam::nullObjectPtr.
|
inlineprotected |
Definition at line 42 of file DLListBaseI.H.
|
inlineprotected |
Definition at line 57 of file DLListBaseI.H.
|
delete |
|
inlinenoexcept |
Definition at line 107 of file DLListBaseI.H.
|
inlinenoexcept |
Definition at line 113 of file DLListBaseI.H.
|
inline |
Definition at line 120 of file DLListBaseI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
inline |
|
inline |
Definition at line 146 of file DLListBaseI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
inline |
void insert | ( | DLListBase::link * | item | ) |
Definition at line 27 of file DLListBase.C.
References DLListBase::link::next_, and DLListBase::link::prev_.
void append | ( | DLListBase::link * | item | ) |
Definition at line 52 of file DLListBase.C.
References DLListBase::link::next_, and DLListBase::link::prev_.
bool swapUp | ( | DLListBase::link * | a | ) |
Definition at line 77 of file DLListBase.C.
References DLListBase::link::next_, and DLListBase::link::prev_.
bool swapDown | ( | DLListBase::link * | a | ) |
Definition at line 116 of file DLListBase.C.
References DLListBase::link::next_, and DLListBase::link::prev_.
Foam::DLListBase::link * removeHead | ( | ) |
Definition at line 155 of file DLListBase.C.
References Foam::abort(), DLListBase::link::deregister(), Foam::FatalError, FatalErrorInFunction, and DLListBase::link::next_.
Foam::DLListBase::link * remove | ( | DLListBase::link * | item | ) |
Definition at line 179 of file DLListBase.C.
References DLListBase::link::deregister(), DLListBase::link::next_, and DLListBase::link::prev_.
|
inline |
Definition at line 209 of file DLListBaseI.H.
Foam::DLListBase::link * replace | ( | DLListBase::link * | oldLink, |
DLListBase::link * | newLink | ||
) |
Definition at line 212 of file DLListBase.C.
References DLListBase::link::deregister(), DLListBase::link::next_, and DLListBase::link::prev_.
|
inline |
Definition at line 219 of file DLListBaseI.H.
|
inline |
Definition at line 171 of file DLListBaseI.H.
Referenced by DLListBase::transfer().
|
inline |
Definition at line 179 of file DLListBaseI.H.
|
inline |
Definition at line 192 of file DLListBaseI.H.
References DLListBase::clear().
|
inline |
Definition at line 319 of file DLListBaseI.H.
References stdFoam::end().
|
inline |
Definition at line 417 of file DLListBaseI.H.
References stdFoam::cend().
|
inline |
Definition at line 429 of file DLListBaseI.H.
References stdFoam::crend().
|
inline |
Definition at line 73 of file DLListBaseI.H.
|
inline |
Definition at line 80 of file DLListBaseI.H.
|
inline |
Definition at line 87 of file DLListBaseI.H.
|
friend |
Definition at line 124 of file DLListBase.H.
|
friend |
Definition at line 127 of file DLListBase.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.