51 template<
class LListBase,
class T>
class LList;
53 template<
class LListBase,
class T>
60 template<
class LListBase,
class T>
72 template<
class LListBase,
class T>
106 class const_iterator;
115 public LListBase::link
134 static T remove(
typename LListBase::link* node)
137 T val(std::move(
p->val_));
143 static constexpr
T*
ptr(
typename LListBase::link* node)
145 return &(
static_cast<link*
>(node)->
val_);
149 static constexpr
const T*
ptr(
const typename LListBase::link* node)
151 return &(
static_cast<const link*
>(node)->
val_);
155 static constexpr
T&
ref(
typename LListBase::link* node)
157 return static_cast<link*
>(node)->
val_;
161 static constexpr
const T&
ref(
const typename LListBase::link* node)
163 return static_cast<const link*
>(node)->
val_;
174 explicit LList(
const T& elem)
195 LList(std::initializer_list<T> lst);
232 LListBase::push_front(
new link(elem));
238 LListBase::push_front(
new link(std::move(elem)));
244 LListBase::push_back(
new link(elem));
250 LListBase::push_back(
new link(std::move(elem)));
272 T remove(iterator& iter)
304 friend Istream&
operator>> <LListBase,
T>
312 friend Ostream& operator<< <LListBase, T>
457 class const_reverse_iterator
496 return LListBase::template iterator_first<base_iterator>();
502 return LListBase::template iterator_first<const_base_iterator>();
508 return LListBase::template iterator_last<base_iterator>();
512 inline const_reverse_iterator
crbegin()
const 514 return LListBase::template iterator_last<const_base_iterator>();
533 return LListBase::template iterator_end<iterator>();
539 return LListBase::template iterator_end<const_iterator>();
545 return LListBase::template iterator_rend<reverse_iterator>();
551 return LListBase::template iterator_rend<const_reverse_iterator>();
555 inline const const_iterator&
end()
const A const_reverse_iterator, for LListBase classes that support reverse iteration.
reverse_iterator rbegin()
Iterator to last item in list with non-const access.
T * pointer
Pointer for value_type.
void operator=(const LList< LListBase, T > &lst)
Copy assignment.
reverse_iterator(base_iterator iter)
Construct from base iterator.
void prepend(const T &elem)
Add copy at front of list.
void append(const T &elem)
Add copy at back of list.
reference front()
The first entry in the list.
const iterator & end()
End of list for forward iterators.
const const_iterator & cend() const
End of list for forward iterators.
const T * const_pointer
Const pointer for value_type.
The storage of T with linked nodes.
Template class for non-intrusive linked lists.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
An STL-conforming const_iterator.
const_reverse_iterator(const_base_iterator iter)
Construct from base iterator.
An STL-conforming iterator.
const_iterator & operator++()
pointer operator->() const
void pop_front(label n=1)
Remove first element(s) from the list (deletes pointers)
Istream & readList(Istream &is)
Read list from Istream.
label difference_type
The difference between iterators.
T removeHead()
Remove and return first entry.
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write LList with line-breaks when length exceeds shortLen.
const_iterator(const_base_iterator iter)
Construct from base iterator.
reference operator*() const
const_reverse_iterator & operator++()
static constexpr T & ref(typename LListBase::link *node)
Dereference LListBase::link to obtain the stored object.
void transfer(LList< LListBase, T > &lst)
Transfer the contents of the argument into this List and annul the argument list. ...
reference last()
The last entry in the list.
static constexpr T * ptr(typename LListBase::link *node)
Dereference LListBase::link to obtain address of stored object.
void insert(const T &elem)
Add copy at front of list. Same as push_front()
LList()=default
Default construct.
void push_back(const T &elem)
Add copy at back of list.
static T remove(typename LListBase::link *node)
Delete linked item and return the element value.
void push_front(const T &elem)
Add copy at front of list.
const_reference operator()() const
typename Foam::chemPointISAT< CompType, ThermoType > *::iterator base_iterator
reference operator*() const
const_reference operator*() const
pointer operator->() const
~LList()
Destructor. Calls clear()
An Ostream is an abstract base class for all output systems (streams, files, token lists...
reference first()
The first entry in the list.
const_reverse_iterator crbegin() const
Iterator to last item in list with const access.
OBJstream os(runTime.globalPath()/outputName)
void clear()
Delete contents of list.
const_iterator & operator--()
iterator begin()
Iterator to first item in list with non-const access.
constexpr auto cbegin(const C &c) -> decltype(c.begin())
Return const_iterator to the beginning of the container c.
const_pointer operator->() const
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
T & reference
Reference for value_type.
const_iterator cbegin() const
Iterator to first item in list with const access.
const_reverse_iterator & operator--()
link(const T &elem)
Copy construct from given object.
label size_type
The type that can represent the container size.
A reverse_iterator, for LListBase classes that support reverse iteration.
const const_reverse_iterator & crend() const
End of list for reverse iterators.
iterator(base_iterator iter)
Construct from base iterator.
const_reference operator*() const
const_pointer operator->() const
typename Foam::chemPointISAT< CompType, ThermoType > *::const_iterator const_base_iterator
Includes some standard C++ headers, defines global macros and templates used in multiple places by Op...
const reverse_iterator & rend()
End of list for reverse iterators.
const T & const_reference
Const reference for value_type.
reference operator()() const
reference back()
The last entry in the list.
T value_type
Type of values stored.