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

Standalone range wrapper for OCCT iterators. More...

#include <NCollection_ForwardRange.hxx>

Public Types

using iterator = NCollection_ForwardRangeIterator<HostType>
using const_iterator = iterator
using sentinel = NCollection_ForwardRangeSentinel

Public Member Functions

template<typename U = HostType, typename = std::enable_if_t<std::is_copy_constructible_v<U>>>
 NCollection_ForwardRange (const HostType &theHost)
 Construct from a copyable host (lvalue).
 NCollection_ForwardRange (HostType &&theHost)
 Construct from an rvalue (moves the host).
 NCollection_ForwardRange (const NCollection_ForwardRange &)=delete
NCollection_ForwardRange & operator= (const NCollection_ForwardRange &)=delete
 NCollection_ForwardRange (NCollection_ForwardRange &&)=default
NCollection_ForwardRange & operator= (NCollection_ForwardRange &&)=default
iterator begin () const
 Returns iterator to the current position of the host. Const-qualified: iteration advances the internal cursor (mutable), not the logical state of the range.
sentinel end () const
 Returns sentinel marking the end.
const_iterator cbegin () const
 Returns const-access iterator (same as begin).
sentinel cend () const
 Returns sentinel marking the end.

Detailed Description

template<typename HostType>
class NCollection_ForwardRange< HostType >

Standalone range wrapper for OCCT iterators.

Owns a copy/move of the host iterator and provides begin()/end() for range-based for loops. Use this when the host class does not have its own begin()/end() methods.

for (const TopoDS_Shape& aFace :
{
// process aFace
}
@ TopAbs_FACE
Definition TopAbs_ShapeEnum.hxx:51
NCollection_ForwardRange(const HostType &theHost)
Construct from a copyable host (lvalue).
Definition NCollection_ForwardRange.hxx:254
An Explorer is a Tool to visit a Topological Data Structure from the TopoDS package.
Definition TopExp_Explorer.hxx:84
Describes a shape which.
Definition TopoDS_Shape.hxx:41
Template Parameters
HostTypeOCCT iterator/explorer with More(), Next(), and a value accessor.

Member Typedef Documentation

◆ const_iterator

template<typename HostType>
using NCollection_ForwardRange< HostType >::const_iterator = iterator

◆ iterator

template<typename HostType>
using NCollection_ForwardRange< HostType >::iterator = NCollection_ForwardRangeIterator<HostType>

◆ sentinel

template<typename HostType>
using NCollection_ForwardRange< HostType >::sentinel = NCollection_ForwardRangeSentinel

Constructor & Destructor Documentation

◆ NCollection_ForwardRange() [1/4]

template<typename HostType>
template<typename U = HostType, typename = std::enable_if_t<std::is_copy_constructible_v<U>>>
NCollection_ForwardRange< HostType >::NCollection_ForwardRange ( const HostType & theHost)
inlineexplicit

Construct from a copyable host (lvalue).

◆ NCollection_ForwardRange() [2/4]

template<typename HostType>
NCollection_ForwardRange< HostType >::NCollection_ForwardRange ( HostType && theHost)
inlineexplicit

Construct from an rvalue (moves the host).

◆ NCollection_ForwardRange() [3/4]

template<typename HostType>
NCollection_ForwardRange< HostType >::NCollection_ForwardRange ( const NCollection_ForwardRange< HostType > & )
delete

◆ NCollection_ForwardRange() [4/4]

template<typename HostType>
NCollection_ForwardRange< HostType >::NCollection_ForwardRange ( NCollection_ForwardRange< HostType > && )
default

Member Function Documentation

◆ begin()

template<typename HostType>
iterator NCollection_ForwardRange< HostType >::begin ( ) const
inlinenodiscard

Returns iterator to the current position of the host. Const-qualified: iteration advances the internal cursor (mutable), not the logical state of the range.

◆ cbegin()

template<typename HostType>
const_iterator NCollection_ForwardRange< HostType >::cbegin ( ) const
inlinenodiscard

Returns const-access iterator (same as begin).

◆ cend()

template<typename HostType>
sentinel NCollection_ForwardRange< HostType >::cend ( ) const
inlinenodiscard

Returns sentinel marking the end.

◆ end()

template<typename HostType>
sentinel NCollection_ForwardRange< HostType >::end ( ) const
inlinenodiscard

Returns sentinel marking the end.

◆ operator=() [1/2]

template<typename HostType>
NCollection_ForwardRange & NCollection_ForwardRange< HostType >::operator= ( const NCollection_ForwardRange< HostType > & )
delete

◆ operator=() [2/2]

template<typename HostType>
NCollection_ForwardRange & NCollection_ForwardRange< HostType >::operator= ( NCollection_ForwardRange< HostType > && )
default

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