39 #ifndef Foam_UILList_H 40 #define Foam_UILList_H 52 template<
class LListBase,
class T>
class UILList;
54 template<
class LListBase,
class T>
66 template<
class LListBase,
class T>
114 this->push_front(item);
126 return static_cast<T*
>(LListBase::front());
132 return static_cast<const T*
>(LListBase::front());
138 return static_cast<T*
>(LListBase::back());
142 const T*
back()
const 144 return static_cast<const T*
>(LListBase::back());
151 return static_cast<T*
>(LListBase::removeHead());
157 return static_cast<T*
>(LListBase::remove(item));
161 T*
remove(iterator& iter)
163 return static_cast<T*
>(LListBase::remove(iter));
188 friend Ostream& operator<< <LListBase, T>
212 return static_cast<T*
>(base_iterator::get_node());
217 return *(this->
get());
262 return static_cast<const T*
>(const_base_iterator::get_node());
267 return *(this->
get());
306 return static_cast<T*
>(base_iterator::get_node());
311 return *(this->
get());
350 return static_cast<const T*
>(const_base_iterator::get_node());
355 return *(this->
get());
379 return LListBase::template iterator_first<base_iterator>();
385 return LListBase::template iterator_first<const_base_iterator>();
391 return LListBase::template iterator_last<base_iterator>();
397 return LListBase::template iterator_last<const_base_iterator>();
416 return LListBase::template iterator_end<iterator>();
422 return LListBase::template iterator_end<const_iterator>();
428 return LListBase::template iterator_rend<reverse_iterator>();
434 return LListBase::template iterator_rend<const_reverse_iterator>();
438 inline const const_iterator&
end()
const 444 inline const const_reverse_iterator&
rend()
const void operator=(const UILList< LListBase, T > &lst)
Copy assignment.
const const_iterator & cend() const
End of list for forward iterators.
Template class for intrusive linked lists.
bool operator==(const UILList< LListBase, T > &lst) const
Equality. True both lists are element-wise equal.
const_iterator(const_base_iterator iter)
Construct from base const_iterator.
const T & const_reference
Const reference for value_type.
A reverse_iterator, for LListBase classes that support reverse iteration.
T * front()
The first entry in the list.
const T * const_pointer
Const pointer for value_type.
pointer operator->() const
iterator(base_iterator iter)
UILList()=default
Default construct.
T * last()
The last entry in the list.
reverse_iterator & operator++()
reference operator()() const
bool operator!=(const UILList< LListBase, T > &lst) const
The opposite of the equality operation. Takes linear time.
const_reference operator*() const
reference operator()() const
const_iterator cbegin() const
Iterator to first item in list with const access.
const_reference operator()() const
const_iterator & operator++()
reference operator*() const
const_reference operator*() const
reverse_iterator rbegin()
Iterator to last item in list with non-const access.
const iterator & end()
End of list for forward iterators.
reference operator*() const
const_pointer operator->() const
const reverse_iterator & rend()
End of list for reverse iterators.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
T * pointer
Pointer for value_type.
const_reverse_iterator(const_base_iterator iter)
label difference_type
The difference between iterator objects.
typename LListBase::const_iterator const_base_iterator
const_reverse_iterator crbegin() const
Iterator to last item in list with const access.
OBJstream os(runTime.globalPath()/outputName)
T value_type
Type of values stored.
T & reference
Reference for value_type.
constexpr auto cbegin(const C &c) -> decltype(c.begin())
Return const_iterator to the beginning of the container c.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
A const_reverse_iterator, for LListBase classes that support reverse iteration.
const_pointer operator->() const
pointer operator->() const
typename LListBase::iterator base_iterator
label size_type
The type that can represent the container size.
const_reverse_iterator & operator++()
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write UILList with line-breaks when length exceeds shortLen.
Includes some standard C++ headers, defines global macros and templates used in multiple places by Op...
reverse_iterator(base_iterator iter)
const_reference operator()() const
T * first()
The first entry in the list.
T * removeHead()
Remove and return head.
iterator begin()
Iterator to first item in list with non-const access.
const const_reverse_iterator & crend() const
End of list for reverse iterators.
T * back()
The last entry in the list.