FreeFOAM The Cross-Platform CFD Toolkit
LList< LListBase, T > Class Template Reference

Template class for non-intrusive linked lists. More...

#include <OpenFOAM/LList.H>


Detailed Description

template<class LListBase, class T>
class Foam::LList< LListBase, T >

Template class for non-intrusive linked lists.

Source files

Definition at line 74 of file LList.H.

+ Inheritance diagram for LList< LListBase, T >:
+ Collaboration diagram for LList< LListBase, T >:

List of all members.

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 > &)

Member Typedef Documentation

typedef T value_type

Type of values the LList contains.

Definition at line 215 of file LList.H.

typedef label size_type

The type that can represent the size of a LList.

Definition at line 226 of file LList.H.


Constructor & Destructor Documentation

LList ( )
inline

Null construct.

Definition at line 109 of file LList.H.

LList ( T  a)
inline

Construct given initial T.

Definition at line 113 of file LList.H.

LList ( Istream &  is)

Construct from Istream.

Definition at line 35 of file LListIO.C.

References operator>>().

LList ( const LList< LListBase, T > &  lst)

Construct as copy.

Definition at line 34 of file LList.C.

References LList< LListBase, T >::append().

~LList ( )

Definition at line 46 of file LList.C.

References clear().


Member Function Documentation

const T& first ( ) const
inline
const T& last ( ) const
inline
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().

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

Remove and return element specified by iterator.

Definition at line 192 of file LList.H.

void transfer ( LList< LListBase, T > &  lst)

Transfer the contents of the argument into this List.

and annull the argument list.

Definition at line 68 of file LList.C.

References clear().

void operator= ( const LList< LListBase, T > &  lst)

Definition at line 78 of file LList.C.

References append(), and clear().


Friends And Related Function Documentation

Istream& operator>> ( Istream &  ,
LList< LListBase, T > &   
)
friend
Ostream& operator ( Ostream &  ,
const LList< LListBase, T > &   
)
friend

The documentation for this class was generated from the following files: