Loading...
Searching...
No Matches
UPtrList< T >::Iterator< Const > Class Template Reference

Internally used base for iterator and const_iterator. More...

#include <UPtrList.H>

Inheritance diagram for UPtrList< T >::Iterator< Const >:

Public Types

using list_type
 The list container type.

Public Member Functions

bool good () const noexcept
 True if iterator points to a non-null entry.
label key () const noexcept
 The iterator position/index within the list.
template<bool Any>
bool operator== (const Iterator< Any > &iter) const noexcept
 Compare hash-entry element pointers.
template<bool Any>
bool operator!= (const Iterator< Any > &iter) const noexcept

Protected Member Functions

constexpr Iterator () noexcept
 Default construct. Also the same as the end iterator.
 Iterator (list_type *list)
 Construct begin iterator.
void increment ()
 Increment to the next non-null position.
template<bool Any>
 operator const Iterator< Any > & () const
 Permit explicit cast to the other (const/non-const) iterator.

Protected Attributes

list_typelist_
 The parent being iterated.
label pos_
 The position within the list.

Friends

class UPtrList

Detailed Description

template<class T>
template<bool Const>
class Foam::UPtrList< T >::Iterator< Const >

Internally used base for iterator and const_iterator.

The iterator base for UPtrList (internal use only).

Iterates non-nullptr entries.

Definition at line 547 of file UPtrList.H.

Member Typedef Documentation

◆ list_type

template<class T>
template<bool Const>
using list_type
Initial value:
std::conditional_t<Const, const UPtrList<T>, UPtrList<T>>
friend class UPtrList
Definition UPtrList.H:577

The list container type.

Definition at line 556 of file UPtrList.H.

Constructor & Destructor Documentation

◆ Iterator() [1/2]

template<class T>
template<bool Const>
Iterator ( )
inlineconstexprprotectednoexcept

Default construct. Also the same as the end iterator.

Definition at line 307 of file UPtrListI.H.

References Iterator(), and Foam::noexcept.

Referenced by Iterator(), Iterator(), operator const Iterator< Any > &(), operator!=(), operator==(), and UPtrList.

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

◆ Iterator() [2/2]

template<class T>
template<bool Const>
Iterator ( list_type * list)
inlineexplicitprotected

Construct begin iterator.

Definition at line 316 of file UPtrListI.H.

References Iterator().

Here is the call graph for this function:

Member Function Documentation

◆ increment()

template<class T>
template<bool Const>
void increment ( )
inlineprotected

Increment to the next non-null position.

Definition at line 333 of file UPtrListI.H.

References increment(), list_, and pos_.

Referenced by increment(), and UPtrList.

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

◆ operator const Iterator< Any > &()

template<class T>
template<bool Const>
template<bool Any>
operator const Iterator< Any > & ( ) const
inlineexplicitprotected

Permit explicit cast to the other (const/non-const) iterator.

Definition at line 604 of file UPtrList.H.

References Iterator().

Here is the call graph for this function:

◆ good()

template<class T>
template<bool Const>
bool good ( ) const
inlinenoexcept

True if iterator points to a non-null entry.

Definition at line 617 of file UPtrList.H.

References list_, Foam::noexcept, and pos_.

◆ key()

template<class T>
template<bool Const>
label key ( ) const
inlinenoexcept

The iterator position/index within the list.

Definition at line 622 of file UPtrList.H.

References Foam::noexcept, and pos_.

◆ operator==()

template<class T>
template<bool Const>
template<bool Any>
bool operator== ( const Iterator< Any > & iter) const
inlinenoexcept

Compare hash-entry element pointers.

Independent of const/non-const access

Definition at line 630 of file UPtrList.H.

References Iterator(), and pos_.

Here is the call graph for this function:

◆ operator!=()

template<class T>
template<bool Const>
template<bool Any>
bool operator!= ( const Iterator< Any > & iter) const
inlinenoexcept

Definition at line 636 of file UPtrList.H.

References Iterator(), and pos_.

Here is the call graph for this function:

◆ UPtrList

template<class T>
template<bool Const>
friend class UPtrList
friend

Definition at line 577 of file UPtrList.H.

References increment(), Iterator(), Foam::noexcept, and UPtrList.

Referenced by UPtrList.

Member Data Documentation

◆ list_

template<class T>
template<bool Const>
list_type* list_
protected

The parent being iterated.

Uses pointer for default copy/assignment

Definition at line 569 of file UPtrList.H.

Referenced by good(), and increment().

◆ pos_

template<class T>
template<bool Const>
label pos_
protected

The position within the list.

Definition at line 574 of file UPtrList.H.

Referenced by good(), increment(), key(), operator!=(), and operator==().


The documentation for this class was generated from the following files:
  • src/OpenFOAM/containers/PtrLists/UPtrList/UPtrList.H
  • src/OpenFOAM/containers/PtrLists/UPtrList/UPtrListI.H