Data Structures | Public Types | Public Member Functions | Data Fields | Friends
LList Class Reference

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

Inheritance diagram for LList:
Inheritance graph
[legend]

Data Structures

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 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...
 
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 > &)
 
iterator begin ()
 
const iteratorend ()
 
const_iterator cbegin () const
 
const const_iteratorcend () const
 
const_iterator begin () const
 
const const_iteratorend () const
 

Data Fields

const typedef Tconst_reference
 Type that can be used for storing into constant. More...
 

Friends

class iterator
 
class const_iterator
 
Istreamoperator>> (Istream &, LList< LListBase, T > &)
 
Ostreamoperator (Ostream &, const LList< LListBase, T > &)
 

Detailed Description

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

◆ reference

typedef T& reference

Type that can be used for storing into value_type.

objects.

Definition at line 218 of file LList.H.

◆ size_type

typedef label size_type

The type that can represent the size of a LList.

Definition at line 225 of file LList.H.

◆ LListBase_iterator

typedef LListBase::iterator LListBase_iterator

Definition at line 230 of file LList.H.

◆ LListBase_const_iterator

typedef LListBase::const_iterator LListBase_const_iterator

Definition at line 281 of file LList.H.

Constructor & Destructor Documentation

◆ LList() [1/4]

LList ( )
inline

Null construct.

Definition at line 108 of file LList.H.

◆ LList() [2/4]

LList ( T  a)
inline

Construct given initial T.

Definition at line 112 of file LList.H.

◆ LList() [3/4]

LList ( Istream )

Construct from Istream.

◆ LList() [4/4]

LList ( const LList< LListBase, T > &  )

Construct as copy.

◆ ~LList()

~LList ( )

Destructor.

Definition at line 44 of file LList.C.

Member Function Documentation

◆ first() [1/2]

T& first ( )
inline

◆ first() [2/2]

const T& first ( ) const
inline

Return const access to the first entry added.

Definition at line 139 of file LList.H.

◆ last() [1/2]

T& last ( )
inline

Return the last entry added.

Definition at line 145 of file LList.H.

Referenced by LPtrList< SLListBase, Reaction< Foam::sutherlandTransport > >::last(), Foam::polyMeshZipUpCells(), and polyMeshGenModifier::zipUpCells().

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

◆ insert()

void insert ( const T a)
inline

Add at head of list.

Definition at line 160 of file LList.H.

Referenced by immersedBoundaryFvPatch::makeTriAddressing(), Foam::polyMeshZipUpCells(), and polyMeshGenModifier::zipUpCells().

Here is the caller graph for this function:

◆ append()

void append ( const T a)
inline

◆ removeHead()

T removeHead ( )
inline

◆ remove() [1/2]

T remove ( link l)
inline

Remove and return element.

Definition at line 181 of file LList.H.

◆ remove() [2/2]

T remove ( iterator it)
inline

Remove and return element specified by iterator.

Definition at line 190 of file LList.H.

◆ clear()

void clear ( )

Delete contents of list.

Definition at line 53 of file LList.C.

◆ transfer()

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.

◆ operator=()

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

Definition at line 76 of file LList.C.

◆ begin() [1/2]

iterator begin ( )
inline

◆ end() [1/2]

const iterator& end ( )
inline

Definition at line 273 of file LList.H.

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

Here is the caller graph for this function:

◆ cbegin()

const_iterator cbegin ( ) const
inline

Definition at line 326 of file LList.H.

◆ cend()

const const_iterator& cend ( ) const
inline

Definition at line 331 of file LList.H.

◆ begin() [2/2]

const_iterator begin ( ) const
inline

Definition at line 336 of file LList.H.

◆ end() [2/2]

const const_iterator& end ( ) const
inline

Definition at line 341 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< DLListBase, Foam::entry * >::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

Field Documentation

◆ const_reference

const typedef T& const_reference

Type that can be used for storing into constant.

LList::value_type objects.

Definition at line 222 of file LList.H.


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