Template class for non-intrusive linked lists. More...
Classes | |
class | const_iterator |
An STL-conforming const_iterator. More... | |
class | const_reverse_iterator |
A const_reverse_iterator, for LListBase classes that support reverse iteration. More... | |
class | iterator |
An STL-conforming iterator. More... | |
struct | link |
The storage of T with linked nodes. More... | |
class | reverse_iterator |
A reverse_iterator, for LListBase classes that support reverse iteration. More... | |
Public Types | |
typedef T | value_type |
Type of values stored. More... | |
typedef T * | pointer |
Pointer for value_type. More... | |
typedef const T * | const_pointer |
Const pointer for value_type. More... | |
typedef T & | reference |
Reference for value_type. More... | |
typedef const T & | const_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 iterators. More... | |
using | base_iterator = typename LListBase::iterator |
using | const_base_iterator = typename LListBase::const_iterator |
Public Member Functions | |
LList ()=default | |
Default construct. More... | |
LList (const T &elem) | |
Construct and copy add initial item. More... | |
LList (T &&elem) | |
Construct and move add initial item. More... | |
LList (Istream &is) | |
Construct from Istream. More... | |
LList (const LList< LListBase, T > &lst) | |
Copy construct. More... | |
LList (LList< LListBase, T > &&lst) | |
Move construct. More... | |
LList (std::initializer_list< T > lst) | |
Copy construct from an initializer list. More... | |
~LList () | |
Destructor. Calls clear() More... | |
reference | front () |
The first entry in the list. More... | |
const_reference | front () const |
The first entry in the list (const access) More... | |
reference | back () |
The last entry in the list. More... | |
const_reference | back () const |
The last entry in the list (const access) More... | |
void | push_front (const T &elem) |
Add copy at front of list. More... | |
void | push_front (T &&elem) |
Move construct at front of list. More... | |
void | push_back (const T &elem) |
Add copy at back of list. More... | |
void | push_back (T &&elem) |
Move construct at back of list. More... | |
void | clear () |
Delete contents of list. More... | |
void | pop_front (label n=1) |
Remove first element(s) from the list (deletes pointers) More... | |
T | removeHead () |
Remove and return first entry. More... | |
T | remove (link *item) |
Remove and return element. More... | |
T | remove (iterator &iter) |
Remove and return element specified by iterator. More... | |
void | transfer (LList< LListBase, T > &lst) |
Transfer the contents of the argument into this List and annul the argument list. More... | |
void | operator= (const LList< LListBase, T > &lst) |
Copy assignment. More... | |
void | operator= (LList< LListBase, T > &&lst) |
Move assignment. More... | |
void | operator= (std::initializer_list< T > lst) |
Copy assignment from an initializer list. More... | |
Istream & | readList (Istream &is) |
Read list from Istream. More... | |
Ostream & | writeList (Ostream &os, const label shortLen=0) const |
Write LList 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 iterator & | end () |
End of list for forward iterators. More... | |
const const_iterator & | cend () const |
End of list for forward iterators. More... | |
const reverse_iterator & | rend () |
End of list for reverse iterators. More... | |
const const_reverse_iterator & | crend () const |
End of list for reverse iterators. More... | |
const const_iterator & | end () const |
End of list for forward iterators. More... | |
const const_reverse_iterator & | rend () const |
End of list for reverse iterators. More... | |
reference | first () |
The first entry in the list. More... | |
const_reference | first () const |
The first entry in the list (const access) More... | |
reference | last () |
The last entry in the list. More... | |
const_reference | last () const |
The last entry in the list (const access) More... | |
void | prepend (const T &elem) |
Add copy at front of list. More... | |
void | prepend (T &&elem) |
Move construct at front of list. More... | |
void | append (const T &elem) |
Add copy at back of list. More... | |
void | append (T &&elem) |
Move construct at back of list. More... | |
void | insert (const T &elem) |
Add copy at front of list. Same as push_front() More... | |
void | insert (T &&elem) |
Move construct at front of list. Same as push_front() More... | |
Friends | |
Istream & | operator>> (Istream &, LList< LListBase, T > &lst) |
Read list from Istream. More... | |
Ostream & | operator (Ostream &os, const LList< LListBase, T > &lst) |
Write LList to Ostream with line breaks, as per writeList with shortLen=-1. More... | |
Template class for non-intrusive linked lists.
typedef T value_type |
typedef const T* const_pointer |
typedef const T& const_reference |
typedef label size_type |
typedef label difference_type |
using base_iterator = typename LListBase::iterator |
using const_base_iterator = typename LListBase::const_iterator |
|
default |
Default construct.
|
inline |
The first entry in the list.
Definition at line 254 of file LList.H.
Referenced by FIFOStack< writeData *>::bottom(), LList< Foam::chemPointISAT< CompType, ThermoType > *>::first(), and LIFOStack< T >::top().
|
inline |
|
inline |
The last entry in the list.
Definition at line 270 of file LList.H.
Referenced by LIFOStack< T >::bottom(), LList< Foam::chemPointISAT< CompType, ThermoType > *>::last(), and FIFOStack< writeData *>::top().
|
inline |
|
inline |
Add copy at front of list.
Definition at line 287 of file LList.H.
Referenced by LList< Foam::chemPointISAT< CompType, ThermoType > *>::insert(), LList< Foam::chemPointISAT< CompType, ThermoType > *>::LList(), LList< Foam::chemPointISAT< CompType, ThermoType > *>::prepend(), and LIFOStack< T >::push().
|
inline |
|
inline |
Add copy at back of list.
Definition at line 303 of file LList.H.
Referenced by LList< Foam::chemPointISAT< CompType, ThermoType > *>::append(), FIFOStack< writeData *>::push(), and LList< Foam::chemPointISAT< CompType, ThermoType > *>::readList().
|
inline |
void clear | ( | ) |
Delete contents of list.
Definition at line 88 of file LList.C.
Referenced by LList< Foam::chemPointISAT< CompType, ThermoType > *>::readList().
void pop_front | ( | label | n = 1 | ) |
|
inline |
Remove and return first entry.
Definition at line 329 of file LList.H.
Referenced by FIFOStack< writeData *>::pop(), LIFOStack< T >::pop(), CircularBuffer< T >::readList(), and UList< Foam::vector >::readList().
Foam::Istream & readList | ( | Istream & | is | ) |
Foam::Ostream & writeList | ( | Ostream & | os, |
const label | shortLen = 0 |
||
) | const |
|
inline |
Iterator to first item in list with non-const access.
Definition at line 604 of file LList.H.
Referenced by FixedList< point, 2 >::FixedList(), and FixedList< point, 2 >::operator=().
|
inline |
Iterator to first item in list with const access.
Definition at line 612 of file LList.H.
Referenced by valueAverageBase::calc().
|
inline |
|
inline |
Iterator to last item in list with const access.
Definition at line 628 of file LList.H.
Referenced by LList< Foam::chemPointISAT< CompType, ThermoType > *>::rbegin().
|
inline |
|
inline |
|
inline |
End of list for forward iterators.
Definition at line 653 of file LList.H.
Referenced by namesList< solutionEntry >::find().
|
inline |
End of list for forward iterators.
Definition at line 661 of file LList.H.
Referenced by LList< Foam::chemPointISAT< CompType, ThermoType > *>::end().
|
inline |
|
inline |
End of list for reverse iterators.
Definition at line 677 of file LList.H.
Referenced by LList< Foam::chemPointISAT< CompType, ThermoType > *>::rend().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Add copy at back of list.
FOAM_DEPRECATED_FOR(2022-10, "push_back()")
Definition at line 748 of file LList.H.
Referenced by Foam::blockMeshTools::read().
|
inline |
|
inline |
Add copy at front of list. Same as push_front()
FOAM_DEPRECATED_FOR(2022-01, "push_front()")
|
inline |
Move construct at front of list. Same as push_front()
FOAM_DEPRECATED_FOR(2022-01, "push_front()")
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.