Classes | Public Types | Public Member Functions | Friends | List of all members
LList< LListBase, T > Class Template Reference

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

Inheritance diagram for LList< LListBase, T >:
Inheritance graph
[legend]
Collaboration diagram for LList< LListBase, T >:
Collaboration graph
[legend]

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

Detailed Description

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

Template class for non-intrusive linked lists.

Source files

Definition at line 51 of file LList.H.

Member Typedef Documentation

typedef T value_type

Type of values the LList contains.

Definition at line 214 of file LList.H.

typedef T& reference

Type that can be used for storing into value_type.

objects.

Definition at line 218 of file LList.H.

typedef const T& const_reference

Type that can be used for storing into constant.

LList::value_type objects.

Definition at line 222 of file LList.H.

typedef label size_type

The type that can represent the size of a LList.

Definition at line 225 of file LList.H.

typedef LListBase::iterator LListBase_iterator

Definition at line 230 of file LList.H.

typedef LListBase::const_iterator LListBase_const_iterator

Definition at line 281 of file LList.H.

Constructor & Destructor Documentation

LList ( )
inline

Null construct.

Definition at line 108 of file LList.H.

Referenced by LList< DLListBase, Foam::entry * >::LList().

Here is the caller graph for this function:

LList ( T  a)
inline

Construct given initial T.

Definition at line 112 of file LList.H.

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

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().

Here is the call graph for this function:

~LList ( )

Destructor.

Definition at line 44 of file LList.C.

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

Referenced by LList< DLListBase, Foam::entry * >::LList().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Function Documentation

T& first ( )
inline

Return the first entry added.

Definition at line 133 of file LList.H.

Referenced by LPtrList< DLListBase, Foam::phaseModel >::first(), and Foam::polyMeshZipUpCells().

Here is the caller graph for this function:

const T& first ( ) const
inline

Return const access to the first entry added.

Definition at line 139 of file LList.H.

T& last ( )
inline

Return the last entry added.

Definition at line 145 of file LList.H.

Referenced by LPtrList< DLListBase, Foam::phaseModel >::last(), and Foam::polyMeshZipUpCells().

Here is the caller graph for this function:

const T& last ( ) const
inline

Return const access to the last entry added.

Definition at line 151 of file LList.H.

void insert ( const T &  a)
inline

Add at head of list.

Definition at line 160 of file LList.H.

Referenced by Foam::polyMeshZipUpCells().

Here is the caller graph for this function:

void append ( const T &  a)
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().

Here is the caller graph for this function:

T removeHead ( )
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().

Here is the caller graph for this function:

T remove ( link *  l)
inline

Remove and return element.

Definition at line 181 of file LList.H.

T remove ( iterator &  it)
inline

Remove and return element specified by iterator.

Definition at line 190 of file LList.H.

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

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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

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().

Here is the call graph for this function:

Here is the caller graph for this function:

iterator begin ( )
inline

Definition at line 268 of file LList.H.

Referenced by LList< LListBase, T >::LList(), and LList< LListBase, T >::operator=().

Here is the caller graph for this function:

const iterator& end ( )
inline

Definition at line 273 of file LList.H.

Referenced by LList< LListBase, T >::LList(), LList< LListBase, T >::operator=(), and Foam::polyMeshZipUpCells().

Here is the caller graph for this function:

const_iterator cbegin ( ) const
inline

Definition at line 326 of file LList.H.

const const_iterator& cend ( ) const
inline

Definition at line 331 of file LList.H.

const_iterator begin ( ) const
inline

Definition at line 336 of file LList.H.

const const_iterator& end ( ) const
inline

Definition at line 341 of file LList.H.

Friends And Related Function Documentation

friend class iterator
friend

Definition at line 82 of file LList.H.

friend class const_iterator
friend

Definition at line 85 of file LList.H.

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: