ILList< LListBase, T > Class Template Reference

Template class for intrusive linked lists. More...

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

Public Member Functions

 ILList ()=default
 Default construct. More...
 
 ILList (T *item)
 Construct and add initial item pointer. More...
 
 ILList (Istream &is)
 Construct from Istream. More...
 
 ILList (const ILList< LListBase, T > &lst)
 Copy construct using the 'clone()' method for each element. More...
 
 ILList (ILList< LListBase, T > &&lst)
 Move construct. More...
 
template<class CloneArg >
 ILList (const ILList< LListBase, T > &lst, const CloneArg &cloneArg)
 Copy constructor with additional argument for clone 'clone()'. More...
 
template<class INew >
 ILList (Istream &is, const INew &inew)
 Construct from Istream using given Istream constructor class. More...
 
 ~ILList ()
 Destructor. More...
 
bool eraseHead ()
 Remove the head element specified from the list and delete it. More...
 
bool erase (T *item)
 Remove the specified element from the list and delete it. More...
 
void clear ()
 Clear the contents of the list. More...
 
void transfer (ILList< LListBase, T > &lst)
 
void operator= (const ILList< LListBase, T > &lst)
 Copy assignment using the 'clone()' method for each element. More...
 
void operator= (ILList< LListBase, T > &&lst)
 Move assignment. More...
 
- Public Member Functions inherited from UILList< LListBase, T >
 UILList ()=default
 Default construct. More...
 
 UILList (T *item)
 Construct and add initial item pointer. More...
 
 UILList (const UILList< LListBase, T > &lst)
 Construct as copy. More...
 
Tfirst ()
 The first entry in the list. More...
 
const Tfirst () const
 The first entry in the list (const access) More...
 
Tlast ()
 The last entry in the list. More...
 
const Tlast () const
 The last entry in the list (const access) More...
 
TremoveHead ()
 Remove and return head. More...
 
Tremove (T *item)
 Remove and return element. More...
 
Tremove (iterator &iter)
 Remove and return item specified by iterator. More...
 
void operator= (const UILList< LListBase, T > &lst)
 Copy assignment. More...
 
bool operator== (const UILList< LListBase, T > &lst) const
 Equality. True both lists are element-wise equal. More...
 
bool operator!= (const UILList< LListBase, T > &lst) const
 The opposite of the equality operation. Takes linear time. More...
 
OstreamwriteList (Ostream &os, const label shortLen=0) const
 Write UILList with line-breaks when length exceeds shortLen. More...
 
iterator begin ()
 Iterator to first item in list with non-const access. More...
 
const_iterator cbegin () const
 Iterator to first item in list with const access. More...
 
reverse_iterator rbegin ()
 Iterator to last item in list with non-const access. More...
 
const_reverse_iterator crbegin () const
 Iterator to last item in list with const access. More...
 
const_iterator begin () const
 Iterator to first item in list with const access. More...
 
const_reverse_iterator rbegin () const
 Iterator to last item in list with const access. More...
 
const iteratorend ()
 End of list for forward iterators. More...
 
const const_iteratorcend () const
 End of list for forward iterators. More...
 
const reverse_iteratorrend ()
 End of list for reverse iterators. More...
 
const const_reverse_iteratorcrend () const
 End of list for reverse iterators. More...
 
const const_iteratorend () const
 End of list for forward iterators. More...
 
const const_reverse_iteratorrend () const
 End of list for reverse iterators. More...
 

Friends

Istreamoperator>> (Istream &is, ILList< LListBase, T > &list)
 Read from Istream, discarding existing contents. More...
 

Additional Inherited Members

- Public Types inherited from UILList< LListBase, T >
typedef T value_type
 Type of values stored. More...
 
typedef Tpointer
 Pointer for value_type. More...
 
typedef const Tconst_pointer
 Const pointer for value_type. More...
 
typedef Treference
 Reference for value_type. More...
 
typedef const Tconst_reference
 Const reference for value_type. More...
 
typedef label size_type
 The type that can represent the container size. More...
 
typedef label difference_type
 The difference between iterator objects. More...
 
using base_iterator = typename LListBase::iterator
 
using const_base_iterator = typename LListBase::const_iterator
 

Detailed Description

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

Template class for intrusive linked lists.

Source files

Definition at line 66 of file ILList.H.

Constructor & Destructor Documentation

◆ ILList() [1/7]

ILList ( )
default

Default construct.

◆ ILList() [2/7]

ILList ( T item)
inlineexplicit

Construct and add initial item pointer.

Definition at line 85 of file ILList.H.

◆ ILList() [3/7]

ILList ( Istream is)
explicit

Construct from Istream.

Definition at line 130 of file ILListIO.C.

◆ ILList() [4/7]

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

Copy construct using the 'clone()' method for each element.

Definition at line 34 of file ILList.C.

References append().

Here is the call graph for this function:

◆ ILList() [5/7]

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

Move construct.

Definition at line 46 of file ILList.C.

References kinematicSingleLayer::transfer().

Here is the call graph for this function:

◆ ILList() [6/7]

ILList ( const ILList< LListBase, T > &  lst,
const CloneArg &  cloneArg 
)

Copy constructor with additional argument for clone 'clone()'.

Definition at line 56 of file ILList.C.

References append().

Here is the call graph for this function:

◆ ILList() [7/7]

ILList ( Istream is,
const INew inew 
)

Construct from Istream using given Istream constructor class.

Definition at line 123 of file ILListIO.C.

◆ ~ILList()

Destructor.

Definition at line 74 of file ILList.C.

References clear().

Here is the call graph for this function:

Member Function Documentation

◆ eraseHead()

bool eraseHead

Remove the head element specified from the list and delete it.

Definition at line 83 of file ILList.C.

References bool, p, and T.

◆ erase()

bool erase ( T item)

Remove the specified element from the list and delete it.

Definition at line 92 of file ILList.C.

◆ clear()

void clear

Clear the contents of the list.

Definition at line 101 of file ILList.C.

Referenced by DSMCCloud< ParcelType >::clear(), and moleculeCloud::moleculeCloud().

Here is the caller graph for this function:

◆ transfer()

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

Transfer the contents of the argument into this List and annul the argument list.

Definition at line 115 of file ILList.C.

◆ operator=() [1/2]

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

Copy assignment using the 'clone()' method for each element.

Definition at line 125 of file ILList.C.

References clear().

Referenced by Cloud< ParticleType >::Cloud(), and Cloud< ParticleType >::cloudReset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [2/2]

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

Move assignment.

Definition at line 137 of file ILList.C.

References clear(), and kinematicSingleLayer::transfer().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator>>

Istream & operator>> ( Istream is,
ILList< LListBase, T > &  list 
)
friend

Read from Istream, discarding existing contents.


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