Loading...
Searching...
No Matches
UILList< LListBase, T > Class Template Reference

Template class for intrusive linked lists. More...

#include <UILList.H>

Inheritance diagram for UILList< LListBase, T >:
Collaboration diagram for UILList< LListBase, T >:

Classes

class  iterator
 A non-const iterator. More...
class  const_iterator
 A const_iterator. More...
class  reverse_iterator
 A reverse_iterator, for LListBase classes that support reverse iteration. More...
class  const_reverse_iterator
 A const_reverse_iterator, for LListBase classes that support reverse iteration. More...

Public Types

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

Public Member Functions

 UILList ()=default
 Default construct.
 UILList (T *item)
 Construct and add initial item pointer.
 UILList (const UILList< LListBase, T > &list)
 Construct as copy.
Tfront ()
 The first entry in the list.
const Tfront () const
 The first entry in the list (const access).
Tback ()
 The last entry in the list.
const Tback () const
 The last entry in the list (const access).
TremoveHead ()
 Remove and return head.
Tremove (T *item)
 Remove and return element.
Tremove (iterator &iter)
 Remove and return item specified by iterator.
void operator= (const UILList< LListBase, T > &lst)
 Copy assignment.
bool operator== (const UILList< LListBase, T > &lst) const
 Equality. True both lists are element-wise equal.
bool operator!= (const UILList< LListBase, T > &lst) const
 The opposite of the equality operation. Takes linear time.
OstreamwriteList (Ostream &os, const label shortLen=0) const
 Write UILList with line-breaks when length exceeds shortLen.
iterator begin ()
 Iterator to first item in list with non-const access.
const_iterator cbegin () const
 Iterator to first item in list with const access.
reverse_iterator rbegin ()
 Iterator to last item in list with non-const access.
const_reverse_iterator crbegin () const
 Iterator to last item in list with const access.
const_iterator begin () const
 Iterator to first item in list with const access.
const_reverse_iterator rbegin () const
 Iterator to last item in list with const access.
const iteratorend ()
 End of list for forward iterators.
const const_iteratorcend () const
 End of list for forward iterators.
const reverse_iteratorrend ()
 End of list for reverse iterators.
const const_reverse_iteratorcrend () const
 End of list for reverse iterators.
const const_iteratorend () const
 End of list for forward iterators.
const const_reverse_iteratorrend () const
 End of list for reverse iterators.
Tfirst ()
 The first entry in the list.
const Tfirst () const
 The first entry in the list (const access).
Tlast ()
 The last entry in the list.
const Tlast () const
 The last entry in the list (const access).

Friends

Ostreamoperator (Ostream &os, const UILList< LListBase, T > &lst)
 Write UILList to Ostream with line breaks, as per writeList() with shortLen=-1.

Detailed Description

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

Template class for intrusive linked lists.

Source files

Definition at line 62 of file UILList.H.

Member Typedef Documentation

◆ value_type

template<class LListBase, class T>
typedef T value_type

Type of values stored.

Definition at line 73 of file UILList.H.

◆ pointer

template<class LListBase, class T>
typedef T* pointer

Pointer for value_type.

Definition at line 78 of file UILList.H.

◆ const_pointer

template<class LListBase, class T>
typedef const T* const_pointer

Const pointer for value_type.

Definition at line 83 of file UILList.H.

◆ reference

template<class LListBase, class T>
typedef T& reference

Reference for value_type.

Definition at line 88 of file UILList.H.

◆ const_reference

template<class LListBase, class T>
typedef const T& const_reference

Const reference for value_type.

Definition at line 93 of file UILList.H.

◆ size_type

template<class LListBase, class T>
typedef label size_type

The type that can represent the container size.

Definition at line 98 of file UILList.H.

◆ difference_type

template<class LListBase, class T>
typedef label difference_type

The difference between iterator objects.

Definition at line 103 of file UILList.H.

◆ base_iterator

template<class LListBase, class T>
using base_iterator = typename LListBase::iterator

Definition at line 111 of file UILList.H.

◆ const_base_iterator

template<class LListBase, class T>
using const_base_iterator = typename LListBase::const_iterator

Definition at line 112 of file UILList.H.

Constructor & Destructor Documentation

◆ UILList() [1/3]

template<class LListBase, class T>
UILList ( )
default

Default construct.

Referenced by ILList< LListBase, T >::ILList(), ILList< LListBase, T >::ILList(), ILList< LListBase, T >::ILList(), operator!=(), operator=(), operator==(), and UILList().

Here is the caller graph for this function:

◆ UILList() [2/3]

template<class LListBase, class T>
UILList ( T * item)
inlineexplicit

Construct and add initial item pointer.

Definition at line 125 of file UILList.H.

◆ UILList() [3/3]

template<class LListBase, class T>
UILList ( const UILList< LListBase, T > & list)

Construct as copy.

Definition at line 27 of file UILList.C.

References cbegin(), cend(), and UILList().

Here is the call graph for this function:

Member Function Documentation

◆ front() [1/2]

template<class LListBase, class T>
T * front ( )
inline

The first entry in the list.

Definition at line 141 of file UILList.H.

Referenced by UILList< DLListBase, T >::first(), and UILList< DLListBase, T >::first().

Here is the caller graph for this function:

◆ front() [2/2]

template<class LListBase, class T>
const T * front ( ) const
inline

The first entry in the list (const access).

Definition at line 149 of file UILList.H.

◆ back() [1/2]

template<class LListBase, class T>
T * back ( )
inline

The last entry in the list.

Definition at line 157 of file UILList.H.

Referenced by UILList< DLListBase, T >::last(), and UILList< DLListBase, T >::last().

Here is the caller graph for this function:

◆ back() [2/2]

template<class LListBase, class T>
const T * back ( ) const
inline

The last entry in the list (const access).

Definition at line 165 of file UILList.H.

◆ removeHead()

template<class LListBase, class T>
T * removeHead ( )
inline

Remove and return head.

Definition at line 174 of file UILList.H.

Referenced by ILList< LListBase, T >::pop_front().

Here is the caller graph for this function:

◆ remove() [1/2]

template<class LListBase, class T>
T * remove ( T * item)
inline

Remove and return element.

Definition at line 182 of file UILList.H.

Referenced by ILList< LListBase, T >::erase().

Here is the caller graph for this function:

◆ remove() [2/2]

template<class LListBase, class T>
T * remove ( iterator & iter)
inline

Remove and return item specified by iterator.

Definition at line 190 of file UILList.H.

◆ operator=()

template<class LListBase, class T>
void operator= ( const UILList< LListBase, T > & lst)

Copy assignment.

Definition at line 39 of file UILList.C.

References cbegin(), cend(), and UILList().

Here is the call graph for this function:

◆ operator==()

template<class LListBase, class T>
bool operator== ( const UILList< LListBase, T > & lst) const

Equality. True both lists are element-wise equal.

(using value_type::operator==). Takes linear time.

Definition at line 51 of file UILList.C.

References cbegin(), cend(), operator, Foam::rhs(), and UILList().

Referenced by operator!=().

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

◆ operator!=()

template<class LListBase, class T>
bool operator!= ( const UILList< LListBase, T > & lst) const

The opposite of the equality operation. Takes linear time.

Definition at line 76 of file UILList.C.

References operator, operator==(), Foam::rhs(), and UILList().

Here is the call graph for this function:

◆ writeList()

template<class LListBase, class T>
Foam::Ostream & writeList ( Ostream & os,
const label shortLen = 0 ) const

Write UILList with line-breaks when length exceeds shortLen.

Using '0' suppresses line-breaks entirely.

Definition at line 29 of file UILListIO.C.

References token::BEGIN_LIST, token::END_LIST, FUNCTION_NAME, Foam::nl, os(), token::SPACE, and Foam::T().

Here is the call graph for this function:

◆ begin() [1/2]

template<class LListBase, class T>
iterator begin ( )
inline

Iterator to first item in list with non-const access.

Definition at line 440 of file UILList.H.

◆ cbegin()

template<class LListBase, class T>
const_iterator cbegin ( ) const
inline

Iterator to first item in list with const access.

Definition at line 448 of file UILList.H.

Referenced by operator=(), operator==(), and UILList().

Here is the caller graph for this function:

◆ rbegin() [1/2]

template<class LListBase, class T>
reverse_iterator rbegin ( )
inline

Iterator to last item in list with non-const access.

Definition at line 456 of file UILList.H.

◆ crbegin()

template<class LListBase, class T>
const_reverse_iterator crbegin ( ) const
inline

Iterator to last item in list with const access.

Definition at line 464 of file UILList.H.

Referenced by UILList< DLListBase, T >::rbegin().

Here is the caller graph for this function:

◆ begin() [2/2]

template<class LListBase, class T>
const_iterator begin ( ) const
inline

Iterator to first item in list with const access.

Definition at line 472 of file UILList.H.

◆ rbegin() [2/2]

template<class LListBase, class T>
const_reverse_iterator rbegin ( ) const
inline

Iterator to last item in list with const access.

Definition at line 480 of file UILList.H.

◆ end() [1/2]

template<class LListBase, class T>
const iterator & end ( )
inline

End of list for forward iterators.

Definition at line 489 of file UILList.H.

◆ cend()

template<class LListBase, class T>
const const_iterator & cend ( ) const
inline

End of list for forward iterators.

Definition at line 497 of file UILList.H.

Referenced by UILList< DLListBase, T >::end(), operator=(), operator==(), and UILList().

Here is the caller graph for this function:

◆ rend() [1/2]

template<class LListBase, class T>
const reverse_iterator & rend ( )
inline

End of list for reverse iterators.

Definition at line 505 of file UILList.H.

◆ crend()

template<class LListBase, class T>
const const_reverse_iterator & crend ( ) const
inline

End of list for reverse iterators.

Definition at line 513 of file UILList.H.

Referenced by UILList< DLListBase, T >::rend().

Here is the caller graph for this function:

◆ end() [2/2]

template<class LListBase, class T>
const const_iterator & end ( ) const
inline

End of list for forward iterators.

Definition at line 521 of file UILList.H.

◆ rend() [2/2]

template<class LListBase, class T>
const const_reverse_iterator & rend ( ) const
inline

End of list for reverse iterators.

Definition at line 529 of file UILList.H.

◆ first() [1/2]

template<class LListBase, class T>
T * first ( )
inline

The first entry in the list.

FOAM_DEPRECATED_FOR(2022-10, "front()")

Definition at line 542 of file UILList.H.

◆ first() [2/2]

template<class LListBase, class T>
const T * first ( ) const
inline

The first entry in the list (const access).

FOAM_DEPRECATED_FOR(2022-10, "front()")

Definition at line 549 of file UILList.H.

◆ last() [1/2]

template<class LListBase, class T>
T * last ( )
inline

The last entry in the list.

FOAM_DEPRECATED_FOR(2022-10, "back()")

Definition at line 556 of file UILList.H.

◆ last() [2/2]

template<class LListBase, class T>
const T * last ( ) const
inline

The last entry in the list (const access).

FOAM_DEPRECATED_FOR(2022-10, "back()")

Definition at line 563 of file UILList.H.

◆ operator

template<class LListBase, class T>
Ostream & operator ( Ostream & os,
const UILList< LListBase, T > & lst )
friend

Write UILList to Ostream with line breaks, as per writeList() with shortLen=-1.

Referenced by operator!=(), and operator==().


The documentation for this class was generated from the following files:
  • src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H
  • src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.C
  • src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILListIO.C