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 Treference
 Type that can be used for storing into value_type. More...
 
typedef const Tconst_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 (std::initializer_list< T >)
 Construct from an initializer list. More...
 
 ~LList ()
 Destructor. More...
 
Tfirst ()
 Return the first entry added. More...
 
const Tfirst () const
 Return const access to the first entry added. More...
 
Tlast ()
 Return the last entry added. More...
 
const Tlast () 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 > &)
 Assignment operator. More...
 
void operator= (std::initializer_list< T >)
 Assignment to an initializer list. More...
 
iterator begin ()
 
const iteratorend ()
 
const_iterator cbegin () const
 
const const_iteratorcend () const
 
const_iterator begin () const
 
const const_iteratorend () const
 

Friends

class iterator
 
class const_iterator
 
Istreamoperator>> (Istream &, LList< LListBase, T > &)
 
Ostreamoperator (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

◆ value_type

typedef T value_type

Type of values the LList contains.

Definition at line 221 of file LList.H.

◆ reference

typedef T& reference

Type that can be used for storing into value_type.

objects.

Definition at line 225 of file LList.H.

◆ const_reference

typedef const T& const_reference

Type that can be used for storing into constant.

LList::value_type objects.

Definition at line 229 of file LList.H.

◆ size_type

typedef label size_type

The type that can represent the size of a LList.

Definition at line 232 of file LList.H.

◆ LListBase_iterator

typedef LListBase::iterator LListBase_iterator

Definition at line 237 of file LList.H.

◆ LListBase_const_iterator

typedef LListBase::const_iterator LListBase_const_iterator

Definition at line 288 of file LList.H.

Constructor & Destructor Documentation

◆ LList() [1/5]

LList ( )
inline

Null construct.

Definition at line 108 of file LList.H.

Referenced by LList< Foam::chemPointISAT< CompType, ThermoType > *>::LList().

Here is the caller graph for this function:

◆ LList() [2/5]

LList ( T  a)
inline

Construct given initial T.

Definition at line 112 of file LList.H.

◆ LList() [3/5]

LList ( Istream is)

Construct from Istream.

Definition at line 33 of file LListIO.C.

◆ LList() [4/5]

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

Construct as copy.

Definition at line 31 of file LList.C.

◆ LList() [5/5]

LList ( std::initializer_list< T lst)

Construct from an initializer list.

Definition at line 43 of file LList.C.

◆ ~LList()

~LList ( )

Destructor.

Definition at line 55 of file LList.C.

Referenced by LList< Foam::chemPointISAT< CompType, ThermoType > *>::LList().

Here is the caller graph for this function:

Member Function Documentation

◆ first() [1/2]

T& first ( )
inline

Return the first entry added.

Definition at line 136 of file LList.H.

Referenced by FIFOStack< writeData *>::bottom(), LPtrList< LListBase, T >::first(), Foam::polyMeshZipUpCells(), LIFOStack< label >::top(), and ISAT< CompType, ThermoType >::~ISAT().

Here is the caller graph for this function:

◆ first() [2/2]

const T& first ( ) const
inline

Return const access to the first entry added.

Definition at line 142 of file LList.H.

◆ last() [1/2]

T& last ( )
inline

Return the last entry added.

Definition at line 148 of file LList.H.

Referenced by LIFOStack< label >::bottom(), LPtrList< LListBase, T >::last(), Foam::polyMeshZipUpCells(), and FIFOStack< writeData *>::top().

Here is the caller graph for this function:

◆ last() [2/2]

const T& last ( ) const
inline

Return const access to the last entry added.

Definition at line 154 of file LList.H.

◆ insert()

void insert ( const T a)
inline

Add at head of list.

Definition at line 163 of file LList.H.

Referenced by Foam::polyMeshZipUpCells(), and LIFOStack< label >::push().

Here is the caller graph for this function:

◆ append()

void append ( const T a)
inline

◆ removeHead()

T removeHead ( )
inline

Remove and return head.

Definition at line 175 of file LList.H.

Referenced by Foam::polyMeshZipUpCells(), LIFOStack< label >::pop(), and FIFOStack< writeData *>::pop().

Here is the caller graph for this function:

◆ remove() [1/2]

T remove ( link l)
inline

Remove and return element.

Definition at line 184 of file LList.H.

◆ remove() [2/2]

T remove ( iterator it)
inline

Remove and return element specified by iterator.

Definition at line 193 of file LList.H.

◆ clear()

void clear ( )

Delete contents of list.

Definition at line 64 of file LList.C.

Referenced by LList< Foam::chemPointISAT< CompType, ThermoType > *>::LList(), and LList< Foam::chemPointISAT< CompType, ThermoType > *>::remove().

Here is the caller graph for this function:

◆ transfer()

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

Transfer the contents of the argument into this List.

and annul the argument list.

Definition at line 77 of file LList.C.

Referenced by LList< Foam::chemPointISAT< CompType, ThermoType > *>::remove().

Here is the caller graph for this function:

◆ operator=() [1/2]

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

Assignment operator.

Definition at line 87 of file LList.C.

Referenced by LList< Foam::chemPointISAT< CompType, ThermoType > *>::remove().

Here is the caller graph for this function:

◆ operator=() [2/2]

void operator= ( std::initializer_list< T lst)

Assignment to an initializer list.

Definition at line 99 of file LList.C.

◆ begin() [1/2]

iterator begin ( )
inline

◆ end() [1/2]

const iterator& end ( )
inline

◆ cbegin()

const_iterator cbegin ( ) const
inline

Definition at line 333 of file LList.H.

◆ cend()

const const_iterator& cend ( ) const
inline

Definition at line 338 of file LList.H.

◆ begin() [2/2]

const_iterator begin ( ) const
inline

Definition at line 343 of file LList.H.

◆ end() [2/2]

const const_iterator& end ( ) const
inline

Definition at line 348 of file LList.H.

Friends And Related Function Documentation

◆ iterator

friend class iterator
friend

Definition at line 82 of file LList.H.

Referenced by LList< Foam::chemPointISAT< CompType, ThermoType > *>::end().

◆ const_iterator

friend class const_iterator
friend

◆ operator>>

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

◆ operator

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

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