Template class for non-intrusive linked lists. More...
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. More... | |
typedef T & | reference |
Type that can be used for storing into value_type. More... | |
typedef const T & | const_reference |
Type that can be used for storing into constant. More... | |
typedef label | size_type |
The type that can represent the size of a LList. More... | |
typedef LListBase::iterator | LListBase_iterator |
typedef LListBase::const_iterator | LListBase_const_iterator |
Public Member Functions | |
LList () | |
Null construct. More... | |
LList (T a) | |
Construct given initial T. More... | |
LList (Istream &) | |
Construct from Istream. More... | |
LList (const LList< LListBase, T > &) | |
Construct as copy. More... | |
~LList () | |
Destructor. More... | |
T & | first () |
Return the first entry added. More... | |
const T & | first () const |
Return const access to the first entry added. More... | |
T & | last () |
Return the last entry added. More... | |
const T & | last () const |
Return const access to the last entry added. More... | |
void | insert (const T &a) |
Add at head of list. More... | |
void | append (const T &a) |
Add at tail of list. More... | |
T | removeHead () |
Remove and return head. More... | |
T | remove (link *l) |
Remove and return element. More... | |
T | remove (iterator &it) |
Remove and return element specified by iterator. More... | |
void | clear () |
Delete contents of list. More... | |
void | transfer (LList< LListBase, T > &) |
Transfer the contents of the argument into this List. More... | |
void | operator= (const LList< LListBase, T > &) |
iterator | begin () |
const iterator & | end () |
const_iterator | cbegin () const |
const const_iterator & | cend () const |
const_iterator | begin () const |
const const_iterator & | end () const |
Friends | |
class | iterator |
class | const_iterator |
Istream & | operator>> (Istream &, LList< LListBase, T > &) |
Ostream & | operator (Ostream &, const LList< LListBase, T > &) |
Template class for non-intrusive linked lists.
typedef T value_type |
typedef const T& const_reference |
Type that can be used for storing into constant.
LList::value_type objects.
typedef LListBase::iterator LListBase_iterator |
typedef LListBase::const_iterator LListBase_const_iterator |
|
inline |
Null construct.
Definition at line 108 of file LList.H.
Referenced by LList< DLListBase, Foam::entry * >::LList().
Construct from Istream.
Definition at line 33 of file LListIO.C.
References LList< LListBase, T >::append(), LList< LListBase, T >::clear(), Foam::exit(), IOstream::fatalCheck(), Foam::FatalIOError, FatalIOErrorInFunction, token::info(), token::isLabel(), token::isPunctuation(), token::labelToken(), Foam::nl, Foam::operator>>(), token::pToken(), Istream::putBack(), Istream::readBeginList(), Istream::readEndList(), s(), and T.
Construct as copy.
Definition at line 32 of file LList.C.
References LList< LListBase, T >::append(), LList< LListBase, T >::begin(), and LList< LListBase, T >::end().
~LList | ( | ) |
Destructor.
Definition at line 44 of file LList.C.
References LList< LListBase, T >::clear().
Referenced by LList< DLListBase, Foam::entry * >::LList().
|
inline |
Return the first entry added.
Definition at line 133 of file LList.H.
Referenced by LPtrList< DLListBase, Foam::phaseModel >::first(), and Foam::polyMeshZipUpCells().
|
inline |
|
inline |
Return the last entry added.
Definition at line 145 of file LList.H.
Referenced by LPtrList< DLListBase, Foam::phaseModel >::last(), and Foam::polyMeshZipUpCells().
|
inline |
|
inline |
Add at head of list.
Definition at line 160 of file LList.H.
Referenced by Foam::polyMeshZipUpCells().
|
inline |
Add at tail of list.
Definition at line 166 of file LList.H.
Referenced by LList< LListBase, T >::LList(), LPtrList< LListBase, T >::operator=(), LList< LListBase, T >::operator=(), and Foam::polyMeshZipUpCells().
|
inline |
Remove and return head.
Definition at line 172 of file LList.H.
Referenced by LList< LListBase, T >::clear(), LPtrList< LListBase, T >::eraseHead(), and Foam::polyMeshZipUpCells().
void clear | ( | ) |
Delete contents of list.
Definition at line 53 of file LList.C.
References clear(), and LList< LListBase, T >::removeHead().
Referenced by LPtrList< LListBase, T >::clear(), LList< LListBase, T >::LList(), LPtrList< LListBase, T >::operator=(), LList< LListBase, T >::operator=(), LList< DLListBase, Foam::entry * >::remove(), LPtrList< LListBase, T >::transfer(), LList< LListBase, T >::transfer(), LList< LListBase, T >::~LList(), and LPtrList< LListBase, T >::~LPtrList().
Transfer the contents of the argument into this List.
and annul the argument list.
Definition at line 66 of file LList.C.
References LList< LListBase, T >::clear().
Referenced by LList< DLListBase, Foam::entry * >::remove(), and LPtrList< LListBase, T >::transfer().
Definition at line 76 of file LList.C.
References LList< LListBase, T >::append(), LList< LListBase, T >::begin(), LList< LListBase, T >::clear(), and LList< LListBase, T >::end().
Referenced by LList< DLListBase, Foam::entry * >::remove().
|
inline |
Definition at line 268 of file LList.H.
Referenced by LList< LListBase, T >::LList(), and LList< LListBase, T >::operator=().
|
inline |
Definition at line 273 of file LList.H.
Referenced by LList< LListBase, T >::LList(), LList< LListBase, T >::operator=(), and Foam::polyMeshZipUpCells().
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |