Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
NCollection_ForwardRangeIterator< HostType > Class Template Reference

STL input iterator that wraps an OCCT More()/Next() iterator. More...

#include <NCollection_ForwardRange.hxx>

Data Structures

struct  PostfixProxy
 Postfix increment: captures the current value, then advances. Returns a proxy holding the old value (safe for non-copyable hosts). More...

Public Types

using value_type = std::remove_cv_t<std::remove_reference_t<RawReturn>>
using difference_type = std::ptrdiff_t
using iterator_category = std::input_iterator_tag
using reference = RawReturn
using pointer

Public Member Functions

 NCollection_ForwardRangeIterator (HostType *theHost)
 Construct from a pointer to the host iterator.
RawReturn operator* () const
 Dereference: returns the current value from the host.
pointer operator-> () const
 Arrow operator: returns a pointer or proxy to the current value.
NCollection_ForwardRangeIterator & operator++ ()
 Prefix increment: advances the host iterator.
PostfixProxy operator++ (int)

Detailed Description

template<typename HostType>
class NCollection_ForwardRangeIterator< HostType >

STL input iterator that wraps an OCCT More()/Next() iterator.

Holds a non-owning pointer to the host iterator/explorer. The host must outlive this iterator (guaranteed by range-for semantics).

Template Parameters
HostTypeOCCT iterator/explorer with More(), Next(), and a value accessor.

Member Typedef Documentation

◆ difference_type

template<typename HostType>
using NCollection_ForwardRangeIterator< HostType >::difference_type = std::ptrdiff_t

◆ iterator_category

template<typename HostType>
using NCollection_ForwardRangeIterator< HostType >::iterator_category = std::input_iterator_tag

◆ pointer

template<typename HostType>
using NCollection_ForwardRangeIterator< HostType >::pointer
Initial value:
std::conditional_t<std::is_reference_v<RawReturn>,
std::add_pointer_t<std::remove_reference_t<RawReturn>>,
Proxy for operator-> when the accessor returns a value (not a reference).
Definition NCollection_ForwardRange.hxx:121

◆ reference

template<typename HostType>
using NCollection_ForwardRangeIterator< HostType >::reference = RawReturn

◆ value_type

template<typename HostType>
using NCollection_ForwardRangeIterator< HostType >::value_type = std::remove_cv_t<std::remove_reference_t<RawReturn>>

Constructor & Destructor Documentation

◆ NCollection_ForwardRangeIterator()

template<typename HostType>
NCollection_ForwardRangeIterator< HostType >::NCollection_ForwardRangeIterator ( HostType * theHost)
inlineexplicit

Construct from a pointer to the host iterator.

Member Function Documentation

◆ operator*()

template<typename HostType>
RawReturn NCollection_ForwardRangeIterator< HostType >::operator* ( ) const
inline

Dereference: returns the current value from the host.

◆ operator++() [1/2]

template<typename HostType>
NCollection_ForwardRangeIterator & NCollection_ForwardRangeIterator< HostType >::operator++ ( )
inline

Prefix increment: advances the host iterator.

◆ operator++() [2/2]

template<typename HostType>
PostfixProxy NCollection_ForwardRangeIterator< HostType >::operator++ ( int )
inline

◆ operator->()

template<typename HostType>
pointer NCollection_ForwardRangeIterator< HostType >::operator-> ( ) const
inline

Arrow operator: returns a pointer or proxy to the current value.


The documentation for this class was generated from the following file: