Template class for non-intrusive linked lists. More...
#include <OpenFOAM/LList.H>
Template class for non-intrusive linked lists.
Definition at line 74 of file LList.H.
Classes | |
class | const_iterator |
An STL-conforming const_iterator. More...
| |
class | iterator |
An STL-conforming iterator. More...
| |
struct | link |
Link structure. More...
| |
Public Types | |
typedef T | value_type |
Type of values the LList contains.
| |
typedef T & | reference |
Type that can be used for storing into value_type.
| |
typedef const T & | const_reference |
Type that can be used for storing into constant.
| |
typedef label | size_type |
The type that can represent the size of a LList.
| |
typedef LListBase::iterator | LListBase_iterator |
typedef LListBase::const_iterator | LListBase_const_iterator |
Public Member Functions | |
LList () | |
Null construct.
| |
LList (T a) | |
Construct given initial T.
| |
LList (Istream &) | |
Construct from Istream.
| |
LList (const LList< LListBase, T > &) | |
Construct as copy.
| |
~LList () | |
T & | first () |
Return the first entry added.
| |
const T & | first () const |
Return const access to the first entry added.
| |
T & | last () |
Return the last entry added.
| |
const T & | last () const |
Return const access to the last entry added.
| |
void | insert (const T &a) |
Add at head of list.
| |
void | append (const T &a) |
Add at tail of list.
| |
T | removeHead () |
Remove and return head.
| |
T | remove (link *l) |
Remove and return element.
| |
T | remove (iterator &it) |
Remove and return element specified by iterator.
| |
void | clear () |
Delete contents of list.
| |
void | transfer (LList< LListBase, T > &) |
Transfer the contents of the argument into this List.
| |
void | operator= (const LList< LListBase, T > &) |
Friends | |
class | iterator |
class | const_iterator |
Istream & | operator>> (Istream &, LList< LListBase, T > &) |
Ostream & | operator (Ostream &, const LList< LListBase, T > &) |
typedef T value_type |
typedef T& reference |
Type that can be used for storing into value_type.
objects.
Reimplemented in LPtrList< LListBase, T >, LPtrList< SLListBase, gasReaction >, LPtrList< DLListBase, T >, LPtrList< SLListBase, T >, LPtrList< SLListBase, Reaction< ThermoType > >, and LPtrList< DLListBase, phase >.
typedef const T& const_reference |
Type that can be used for storing into constant.
LList::value_type objects.
Reimplemented in LPtrList< LListBase, T >, LPtrList< SLListBase, gasReaction >, LPtrList< DLListBase, T >, LPtrList< SLListBase, T >, LPtrList< SLListBase, Reaction< ThermoType > >, and LPtrList< DLListBase, phase >.
typedef label size_type |
typedef LListBase::iterator LListBase_iterator |
typedef LListBase::const_iterator LListBase_const_iterator |
Construct as copy.
Definition at line 34 of file LList.C.
References LList< LListBase, T >::append().
T& first | ( | ) | [inline]
|
Return the first entry added.
Reimplemented in LPtrList< LListBase, T >, LPtrList< SLListBase, gasReaction >, LPtrList< DLListBase, T >, LPtrList< SLListBase, T >, LPtrList< SLListBase, Reaction< ThermoType > >, and LPtrList< DLListBase, phase >.
Definition at line 135 of file LList.H.
Referenced by LList< SLListBase, word >::first(), and Foam::polyMeshZipUpCells().
const T& first | ( | ) | const [inline]
|
Return const access to the first entry added.
Reimplemented in LPtrList< LListBase, T >, LPtrList< SLListBase, gasReaction >, LPtrList< DLListBase, T >, LPtrList< SLListBase, T >, LPtrList< SLListBase, Reaction< ThermoType > >, and LPtrList< DLListBase, phase >.
T& last | ( | ) | [inline]
|
Return the last entry added.
Reimplemented in LPtrList< LListBase, T >, LPtrList< SLListBase, gasReaction >, LPtrList< DLListBase, T >, LPtrList< SLListBase, T >, LPtrList< SLListBase, Reaction< ThermoType > >, and LPtrList< DLListBase, phase >.
Definition at line 147 of file LList.H.
Referenced by LList< SLListBase, word >::last(), and Foam::polyMeshZipUpCells().
const T& last | ( | ) | const [inline]
|
Return const access to the last entry added.
Reimplemented in LPtrList< LListBase, T >, LPtrList< SLListBase, gasReaction >, LPtrList< DLListBase, T >, LPtrList< SLListBase, T >, LPtrList< SLListBase, Reaction< ThermoType > >, and LPtrList< DLListBase, phase >.
void insert | ( | const T & | a ) | [inline]
|
Add at head of list.
Definition at line 162 of file LList.H.
Referenced by LList< SLListBase, word >::insert(), and Foam::polyMeshZipUpCells().
void append | ( | const T & | a ) | [inline]
|
Add at tail of list.
Definition at line 168 of file LList.H.
Referenced by LList< SLListBase, word >::append(), cyclicGAMGInterface::cyclicGAMGInterface(), randomise::init(), magSqr::init(), magGrad::init(), mag::init(), interpolate::init(), div::init(), components::init(), addSubtract::init(), LList< LListBase, T >::LList(), Foam::operator>>(), Foam::polyMeshZipUpCells(), and processorGAMGInterface::processorGAMGInterface().
T removeHead | ( | ) | [inline]
|
Remove and return head.
Definition at line 174 of file LList.H.
Referenced by Foam::polyMeshZipUpCells(), and LList< SLListBase, word >::removeHead().
T remove | ( | link * | l ) | [inline]
|
Remove and return element.
Definition at line 183 of file LList.H.
Referenced by LList< SLListBase, word >::remove().
T remove | ( | iterator & | it ) | [inline]
|
void clear | ( | ) |
Delete contents of list.
Reimplemented in LPtrList< LListBase, T >, DictionaryBase< DLPtrList< phase >, phase >, DictionaryBase< DLList< T * >, T >, DictionaryBase< DLPtrList< T >, T >, LPtrList< SLListBase, gasReaction >, LPtrList< DLListBase, T >, LPtrList< SLListBase, T >, LPtrList< SLListBase, Reaction< ThermoType > >, and LPtrList< DLListBase, phase >.
Definition at line 55 of file LList.C.
References clear().
Referenced by Foam::operator>>().
friend class iterator [friend]
|
friend class const_iterator [friend]
|