Base singly-linked list. More...
Data Structures | |
class | const_iterator |
An STL-conforming const_iterator. More... | |
class | iterator |
An STL-conforming iterator. More... | |
struct | link |
Link structure. More... | |
Public Member Functions | |
SLListBase () | |
Null construct. More... | |
SLListBase (link *) | |
Construct given initial entry. More... | |
~SLListBase () | |
Destructor. More... | |
label | size () const |
Return number of elements in list. More... | |
bool | empty () const |
Return true if the list is empty. More... | |
link * | first () |
Return first entry. More... | |
const link * | first () const |
Return const access to first entry. More... | |
link * | last () |
Return last entry. More... | |
const link * | last () const |
Return const access to last entry. More... | |
void | insert (link *) |
Add at head of list. More... | |
void | append (link *) |
Add at tail of list. More... | |
link * | removeHead () |
Remove and return head. More... | |
link * | remove (link *) |
link * | remove (iterator &) |
void | clear () |
Clear the list. More... | |
void | transfer (SLListBase &) |
Transfer the contents of the argument into this List. More... | |
iterator | begin () |
const iterator & | end () |
const_iterator | cbegin () const |
const const_iterator & | cend () const |
const_iterator | begin () const |
const const_iterator & | end () const |
Private Member Functions | |
SLListBase (const SLListBase &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const SLListBase &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
link * | last_ |
last_ points to last element More... | |
label | nElmts_ |
Number of elements in in list. More... | |
Static Private Attributes | |
static iterator | endIter_ |
Iterator returned by end() More... | |
static const_iterator | endConstIter_ |
const_iterator returned by end() More... | |
Friends | |
class | iterator |
class | const_iterator |
|
private |
Disallow default bitwise copy construct.
|
inline |
Null construct.
Definition at line 45 of file SLListBaseI.H.
|
inline |
Construct given initial entry.
Definition at line 52 of file SLListBaseI.H.
|
inline |
Destructor.
Definition at line 61 of file SLListBaseI.H.
|
private |
Disallow default bitwise assignment.
|
inline |
Return number of elements in list.
Definition at line 67 of file SLListBaseI.H.
Referenced by SLListBase::begin(), and SLListBase::cbegin().
|
inline |
Return true if the list is empty.
Definition at line 73 of file SLListBaseI.H.
|
inline |
Return first entry.
Definition at line 80 of file SLListBaseI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by SLListBase::begin(), and SLListBase::cbegin().
|
inline |
Return const access to first entry.
|
inline |
Return last entry.
Definition at line 106 of file SLListBaseI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
inline |
Return const access to last entry.
void insert | ( | SLListBase::link * | a | ) |
Add at head of list.
Definition at line 45 of file SLListBase.C.
References SLListBase::last_, SLListBase::nElmts_, and SLListBase::link::next_.
void append | ( | SLListBase::link * | a | ) |
Add at tail of list.
Definition at line 62 of file SLListBase.C.
References SLListBase::link::next_.
Foam::SLListBase::link * removeHead | ( | ) |
Remove and return head.
Definition at line 78 of file SLListBase.C.
References Foam::abort(), f(), Foam::FatalError, and FatalErrorInFunction.
Foam::SLListBase::link * remove | ( | SLListBase::link * | it | ) |
Definition at line 104 of file SLListBase.C.
References SLListBase::link::next_, and p.
|
inline |
Definition at line 148 of file SLListBaseI.H.
References SLListBase::iterator::curElmt_.
|
inline |
Clear the list.
Definition at line 131 of file SLListBaseI.H.
Referenced by SLListBase::transfer().
|
inline |
Transfer the contents of the argument into this List.
and annul the argument list.
Definition at line 138 of file SLListBaseI.H.
References SLListBase::clear(), SLListBase::last_, and SLListBase::nElmts_.
|
inline |
Definition at line 225 of file SLListBaseI.H.
References SLListBase::endIter_, SLListBase::first(), SLListBase::iterator, and SLListBase::size().
|
inline |
Definition at line 239 of file SLListBaseI.H.
References SLListBase::endIter_.
|
inline |
Definition at line 325 of file SLListBaseI.H.
References SLListBase::const_iterator, SLListBase::endConstIter_, SLListBase::first(), and SLListBase::size().
|
inline |
Definition at line 339 of file SLListBaseI.H.
References SLListBase::endConstIter_.
|
inline |
|
inline |
|
friend |
Definition at line 93 of file SLListBase.H.
Referenced by SLListBase::begin().
|
friend |
Definition at line 96 of file SLListBase.H.
Referenced by SLListBase::cbegin().
|
private |
last_ points to last element
last_->next_ points to first element, i.e. circular storage
Definition at line 75 of file SLListBase.H.
Referenced by SLListBase::insert(), and SLListBase::transfer().
|
private |
Number of elements in in list.
Definition at line 78 of file SLListBase.H.
Referenced by SLListBase::insert(), and SLListBase::transfer().
|
staticprivate |
Iterator returned by end()
Definition at line 252 of file SLListBase.H.
Referenced by SLListBase::begin(), and SLListBase::end().
|
staticprivate |
const_iterator returned by end()
Definition at line 255 of file SLListBase.H.
Referenced by SLListBase::cbegin(), and SLListBase::cend().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.