Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions
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_ForwardRangeoperator= (const NCollection_ForwardRange &)=delete
 
 NCollection_ForwardRange (NCollection_ForwardRange &&)=default
 
NCollection_ForwardRangeoperator= (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
Standalone range wrapper for OCCT iterators.
Definition NCollection_ForwardRange.hxx:246
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
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

◆ iterator

◆ sentinel

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]

Construct from an rvalue (moves the host).

◆ NCollection_ForwardRange() [3/4]

◆ NCollection_ForwardRange() [4/4]

Member Function Documentation

◆ begin()

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

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
inline

Returns const-access iterator (same as begin).

◆ cend()

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

Returns sentinel marking the end.

◆ end()

Returns sentinel marking the end.

◆ operator=() [1/2]

◆ operator=() [2/2]


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