LList< LListBase, T > Class Template Reference

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

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

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 > &)
 Copy constructor. More...
 
 LList (LList< LListBase, T > &&)
 Move constructor. More...
 
 LList (std::initializer_list< T >)
 Construct from an initialiser 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= (LList< LListBase, T > &&)
 Move assignment operator. More...
 
void operator= (std::initializer_list< T >)
 Assignment to an initialiser 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 227 of file LList.H.

◆ reference

typedef T& reference

Type that can be used for storing into value_type.

objects.

Definition at line 231 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 235 of file LList.H.

◆ size_type

typedef label size_type

The type that can represent the size of a LList.

Definition at line 238 of file LList.H.

◆ LListBase_iterator

typedef LListBase::iterator LListBase_iterator

Definition at line 243 of file LList.H.

◆ LListBase_const_iterator

typedef LListBase::const_iterator LListBase_const_iterator

Definition at line 294 of file LList.H.

Constructor & Destructor Documentation

◆ LList() [1/6]

LList ( )
inline

Null construct.

Definition at line 108 of file LList.H.

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

Here is the caller graph for this function:

◆ LList() [2/6]

LList ( T  a)
inline

Construct given initial T.

Definition at line 112 of file LList.H.

◆ LList() [3/6]

LList ( Istream is)

Construct from Istream.

Definition at line 33 of file LListIO.C.

◆ LList() [4/6]

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

Copy constructor.

Definition at line 31 of file LList.C.

◆ LList() [5/6]

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

Move constructor.

Definition at line 43 of file LList.C.

◆ LList() [6/6]

LList ( std::initializer_list< T lst)

Construct from an initialiser list.

Definition at line 52 of file LList.C.

◆ ~LList()

~LList ( )

Destructor.

Definition at line 64 of file LList.C.

Referenced by LList< Foam::chemPointISAT *>::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 139 of file LList.H.

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

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 145 of file LList.H.

◆ last() [1/2]

T& last ( )
inline

Return the last entry added.

Definition at line 151 of file LList.H.

Referenced by LIFOStack< Foam::FvWallInfoData >::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 157 of file LList.H.

◆ insert()

void insert ( const T a)
inline

Add at head of list.

Definition at line 166 of file LList.H.

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

Here is the caller graph for this function:

◆ append()

void append ( const T a)
inline

Add at tail of list.

Definition at line 172 of file LList.H.

Referenced by LList< Foam::chemPointISAT *>::LList(), Foam::polyMeshZipUpCells(), FIFOStack< writeData *>::push(), Foam::blockMeshTools::read(), and PtrList< transferModel >::read().

Here is the caller graph for this function:

◆ removeHead()

T removeHead ( )
inline

Remove and return head.

Definition at line 178 of file LList.H.

Referenced by Foam::polyMeshZipUpCells(), LIFOStack< Foam::FvWallInfoData >::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 187 of file LList.H.

◆ remove() [2/2]

T remove ( iterator it)
inline

Remove and return element specified by iterator.

Definition at line 196 of file LList.H.

◆ clear()

void clear ( )

Delete contents of list.

Definition at line 73 of file LList.C.

Referenced by LList< Foam::chemPointISAT *>::LList(), and LList< Foam::chemPointISAT *>::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 86 of file LList.C.

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

Here is the caller graph for this function:

◆ operator=() [1/3]

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

Assignment operator.

Definition at line 96 of file LList.C.

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

Here is the caller graph for this function:

◆ operator=() [2/3]

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

Move assignment operator.

Definition at line 108 of file LList.C.

◆ operator=() [3/3]

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

Assignment to an initialiser list.

Definition at line 115 of file LList.C.

◆ begin() [1/2]

iterator begin ( )
inline

◆ end() [1/2]

const iterator& end ( )
inline

Definition at line 286 of file LList.H.

Referenced by List< Field< scalar > >::operator=(), PtrList< transferModel >::read(), and Foam::writeEntry().

Here is the caller graph for this function:

◆ cbegin()

const_iterator cbegin ( ) const
inline

Definition at line 339 of file LList.H.

◆ cend()

const const_iterator& cend ( ) const
inline

Definition at line 344 of file LList.H.

◆ begin() [2/2]

const_iterator begin ( ) const
inline

Definition at line 349 of file LList.H.

◆ end() [2/2]

const const_iterator& end ( ) const
inline

Definition at line 354 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 *>::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: