Loading...
Searching...
No Matches
UPtrList< T >::const_iterator Class Reference

Forward iterator with const access. More...

#include <UPtrList.H>

Inheritance diagram for UPtrList< T >::const_iterator:
Collaboration diagram for UPtrList< T >::const_iterator:

Public Types

using pointer = const T*
using reference = const T&
Public Types inherited from UPtrList< T >::Iterator< true >
using list_type
 The list container type.

Public Member Functions

 const_iterator ()=default
 Default construct (end iterator).
 const_iterator (const const_iterator &)=default
 Copy construct.
const_iteratoroperator= (const const_iterator &)=default
 Copy assignment.
template<bool Any>
 const_iterator (const Iterator< Any > &iter)
 Copy construct from any access type.
 const_iterator (const iterator &iter)
 Implicit conversion from dissimilar access type.
pointer get () const
 Pointer to the referenced object (failsafe).
reference val () const
 Reference to the object.
pointer operator-> () const
 Pointer to the referenced object.
reference operator* () const
 Reference to the object.
reference operator() () const
 Legacy call operator: reference to the object.
const_iteratoroperator++ ()
 Move to the next non-nullptr entry.
const_iterator operator++ (int)
Public Member Functions inherited from UPtrList< T >::Iterator< true >
bool good () const noexcept
 True if iterator points to a non-null entry.
label key () const noexcept
 The iterator position/index within the list.
bool operator== (const Iterator< Any > &iter) const noexcept
 Compare hash-entry element pointers.
bool operator!= (const Iterator< Any > &iter) const noexcept

Additional Inherited Members

Protected Member Functions inherited from UPtrList< T >::Iterator< true >
constexpr Iterator () noexcept
 Default construct. Also the same as the end iterator.
void increment ()
 Increment to the next non-null position.
 operator const Iterator< Any > & () const
 Permit explicit cast to the other (const/non-const) iterator.
Protected Attributes inherited from UPtrList< T >::Iterator< true >
list_typelist_
 The parent being iterated.
label pos_
 The position within the list.

Detailed Description

template<class T>
class Foam::UPtrList< T >::const_iterator

Forward iterator with const access.

Definition at line 713 of file UPtrList.H.

Member Typedef Documentation

◆ pointer

template<class T>
using pointer = const T*

Definition at line 718 of file UPtrList.H.

◆ reference

template<class T>
using reference = const T&

Definition at line 719 of file UPtrList.H.

Constructor & Destructor Documentation

◆ const_iterator() [1/4]

template<class T>
const_iterator ( )
default

Default construct (end iterator).

Referenced by const_iterator(), const_iterator(), operator++(), and operator=().

Here is the caller graph for this function:

◆ const_iterator() [2/4]

template<class T>
const_iterator ( const const_iterator & )
default

Copy construct.

References const_iterator().

Here is the call graph for this function:

◆ const_iterator() [3/4]

template<class T>
template<bool Any>
const_iterator ( const Iterator< Any > & iter)
inline

Copy construct from any access type.

Definition at line 746 of file UPtrList.H.

References UPtrList< T >::Iterator< true >::Iterator().

Here is the call graph for this function:

◆ const_iterator() [4/4]

template<class T>
const_iterator ( const iterator & iter)
inline

Implicit conversion from dissimilar access type.

Definition at line 754 of file UPtrList.H.

References const_iterator().

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

template<class T>
const_iterator & operator= ( const const_iterator & )
default

Copy assignment.

References const_iterator().

Here is the call graph for this function:

◆ get()

template<class T>
const T * get ( ) const
inline

Pointer to the referenced object (failsafe).

Definition at line 380 of file UPtrListI.H.

References UPtrList< T >::Iterator< true >::good(), UPtrList< T >::Iterator< true >::list_, UPtrList< T >::Iterator< true >::pos_, and Foam::T().

Referenced by operator->().

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

◆ val()

template<class T>
const T & val ( ) const
inline

Reference to the object.

Definition at line 387 of file UPtrListI.H.

References UPtrList< T >::Iterator< true >::list_, UPtrList< T >::Iterator< true >::pos_, and Foam::T().

Referenced by operator()(), and operator*().

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

◆ operator->()

template<class T>
pointer operator-> ( ) const
inline

Pointer to the referenced object.

Definition at line 775 of file UPtrList.H.

References get().

Here is the call graph for this function:

◆ operator*()

template<class T>
reference operator* ( ) const
inline

Reference to the object.

Definition at line 780 of file UPtrList.H.

References val().

Here is the call graph for this function:

◆ operator()()

template<class T>
reference operator() ( ) const
inline

Legacy call operator: reference to the object.

Definition at line 785 of file UPtrList.H.

References val().

Here is the call graph for this function:

◆ operator++() [1/2]

template<class T>
Foam::UPtrList< T >::const_iterator & operator++ ( )
inline

Move to the next non-nullptr entry.

Definition at line 395 of file UPtrListI.H.

References UPtrList< T >::Iterator< true >::increment().

Here is the call graph for this function:

◆ operator++() [2/2]

template<class T>
Foam::UPtrList< T >::const_iterator operator++ ( int )
inline

Definition at line 404 of file UPtrListI.H.

References const_iterator(), and UPtrList< T >::Iterator< true >::increment().

Here is the call graph for this function:

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