Template class for non-intrusive linked lists. More...
Classes | |
class | const_iterator |
An STL-conforming const_iterator. More... | |
class | const_reverse_iterator |
class | iterator |
An STL-conforming iterator. More... | |
struct | link |
The storage of T with linked nodes. More... | |
class | reverse_iterator |
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. 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... | |
bool | eraseHead () |
Erase the first entry. 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 | clear () |
Delete contents of list. More... | |
void | transfer (LList< LListBase, T > &lst) |
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... | |
void | insert (const T &elem) |
Add copy at front of list. Same as prepend() More... | |
void | insert (T &&elem) |
Move construct at front of list. Same as prepend() More... | |
Friends | |
Istream & | operator>> (Istream &, LList< LListBase, T > &lst) |
Read list from Istream. More... | |
Ostream & | operator (Ostream &os, const LList< LListBase, T > &lst) |
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.
Construct and copy add initial item.
Definition at line 177 of file LList.H.
References LList< LListBase, T >::prepend().
Construct and move add initial item.
Definition at line 183 of file LList.H.
References LList< LListBase, T >::prepend().
Construct from Istream.
Definition at line 36 of file LListIO.C.
References Foam::operator>>().
Copy construct.
Definition at line 34 of file LList.C.
References LList< LListBase, T >::append(), and T.
Move construct.
Definition at line 46 of file LList.C.
References kinematicSingleLayer::transfer().
Copy construct from an initializer list.
Definition at line 55 of file LList.C.
References LList< LListBase, T >::append(), and T.
|
inline |
The first entry in the list.
Definition at line 208 of file LList.H.
References ODESolver::stepState::first, and dictionary::Searcher< Const >::ref().
Referenced by FIFOStack< T >::bottom(), valueAverageBase::calc(), fieldAverageItem::calculateMeanField(), Foam::polyMeshZipUpCells(), and LIFOStack< T >::top().
|
inline |
The first entry in the list (const access)
Definition at line 214 of file LList.H.
References ODESolver::stepState::first, and dictionary::Searcher< Const >::ref().
|
inline |
The last entry in the list.
Definition at line 220 of file LList.H.
References ODESolver::stepState::last, and dictionary::Searcher< Const >::ref().
Referenced by LIFOStack< T >::bottom(), Foam::polyMeshZipUpCells(), and FIFOStack< T >::top().
|
inline |
The last entry in the list (const access)
Definition at line 226 of file LList.H.
References ODESolver::stepState::last, and dictionary::Searcher< Const >::ref().
|
inline |
Add copy at front of list.
Definition at line 233 of file LList.H.
References PDRblock::gridControl::prepend().
Referenced by LList< LListBase, T >::insert(), LList< LListBase, T >::LList(), and LIFOStack< T >::push().
|
inline |
Move construct at front of list.
Definition at line 239 of file LList.H.
References PDRblock::gridControl::prepend().
|
inline |
Add copy at back of list.
Definition at line 245 of file LList.H.
References outputOptions::append().
Referenced by LList< LListBase, T >::LList(), Foam::polyMeshZipUpCells(), FIFOStack< T >::push(), Foam::blockMeshTools::read(), and LList< LListBase, T >::readList().
|
inline |
Move construct at back of list.
Definition at line 251 of file LList.H.
References outputOptions::append().
|
inline |
Erase the first entry.
Definition at line 257 of file LList.H.
References bool, p, and LList< LListBase, T >::removeHead().
|
inline |
Remove and return first entry.
Definition at line 265 of file LList.H.
References PackedList< Width >::remove(), and LList< LListBase, T >::removeHead().
Referenced by LList< LListBase, T >::eraseHead(), Foam::polyMeshZipUpCells(), FIFOStack< T >::pop(), LIFOStack< T >::pop(), CircularBuffer< T >::readList(), UList< T >::readList(), LList< LListBase, T >::removeHead(), and UILList< LListBase, T >::removeHead().
Remove and return element.
Definition at line 271 of file LList.H.
References PackedList< Width >::remove().
Remove and return element specified by iterator.
Definition at line 277 of file LList.H.
References PackedList< Width >::remove().
void clear |
Delete contents of list.
Definition at line 78 of file LList.C.
References interfaceDefinitions::clear().
Referenced by LList< LListBase, T >::readList().
Transfer the contents of the argument into this List and annul the argument list.
Definition at line 92 of file LList.C.
References clear(), and kinematicSingleLayer::transfer().
Move assignment.
Definition at line 114 of file LList.C.
References clear(), and kinematicSingleLayer::transfer().
Foam::Istream & readList | ( | Istream & | is | ) |
Read list from Istream.
Definition at line 45 of file LListIO.C.
References LList< LListBase, T >::append(), LList< LListBase, T >::clear(), Foam::exit(), IOstream::fatalCheck(), Foam::FatalIOError, FatalIOErrorInFunction, FUNCTION_NAME, token::info(), token::isLabel(), token::isPunctuation(), token::labelToken(), Istream::putBack(), Istream::readBeginList(), Istream::readEndList(), and T.
Foam::Ostream & writeList | ( | Ostream & | os, |
const label | shortLen = 0 |
||
) | const |
|
inline |
Iterator to first item in list with non-const access.
Definition at line 503 of file LList.H.
Referenced by FixedList< T, N >::FixedList(), and FixedList< T, N >::operator=().
|
inline |
Iterator to first item in list with const access.
Definition at line 509 of file LList.H.
Referenced by valueAverageBase::calc(), fieldAverageItem::calculateMeanField(), multivariateScheme< Type, Scheme >::multivariateScheme(), and multivariateSelectionScheme< Type >::multivariateSelectionScheme().
|
inline |
|
inline |
Iterator to last item in list with const access.
Definition at line 521 of file LList.H.
Referenced by LList< LListBase, T >::rbegin().
|
inline |
Iterator to first item in list with const access.
Definition at line 527 of file LList.H.
References edgeFaceCirculator::cbegin().
|
inline |
Iterator to last item in list with const access.
Definition at line 533 of file LList.H.
References LList< LListBase, T >::crbegin().
|
inline |
End of list for forward iterators.
Definition at line 540 of file LList.H.
Referenced by namesList< T >::find().
|
inline |
End of list for forward iterators.
Definition at line 546 of file LList.H.
Referenced by LList< LListBase, T >::end().
|
inline |
|
inline |
End of list for reverse iterators.
Definition at line 558 of file LList.H.
Referenced by LList< LListBase, T >::rend().
|
inline |
End of list for forward iterators.
Definition at line 564 of file LList.H.
References LList< LListBase, T >::cend().
|
inline |
End of list for reverse iterators.
Definition at line 570 of file LList.H.
References LList< LListBase, T >::crend().
|
inline |
Add copy at front of list. Same as prepend()
Definition at line 579 of file LList.H.
References LList< LListBase, T >::prepend().
Referenced by Foam::polyMeshZipUpCells().
|
inline |
Move construct at front of list. Same as prepend()
Definition at line 582 of file LList.H.
References LList< LListBase, T >::prepend().