SHAPER  9.12.0
GeomAPI_ShapeIterator Class Reference

Iterates on the underlying shape underlying a given GeomAPI_Shape object, providing access to its component sub-shapes. More...

Inheritance diagram for GeomAPI_ShapeIterator:
Inheritance graph

Public Member Functions

 GeomAPI_ShapeIterator ()
 Default constructor. Creates an empty iterator, becomes usefull after Init. More...
 
 GeomAPI_ShapeIterator (const std::shared_ptr< GeomAPI_Shape > theShape)
 Creates an iterator on theShape sub-shapes. More...
 
void init (const std::shared_ptr< GeomAPI_Shape > theShape)
 Initializes this iterator with theShape. More...
 
bool more () const
 
void next ()
 Moves on to the next sub-shape in the shape which this iterator is scanning. More...
 
std::shared_ptr< GeomAPI_Shapecurrent ()
 
template<class T >
T * implPtr ()
 Returns the pointer to the impl. More...
 
template<class T >
const T * implPtr () const
 Returns the pointer to the impl. More...
 
template<class T >
const T & impl () const
 Returns the reference object of the impl. More...
 
template<class T >
void setImpl (T *theImpl)
 Updates the impl (deletes the old one) More...
 
GEOMAPI_EXPORT bool empty () const
 Returns true if the impl is empty. More...
 

Detailed Description

Iterates on the underlying shape underlying a given GeomAPI_Shape object, providing access to its component sub-shapes.

Each component shape is returned as a GeomAPI_Shape with an orientation, and a compound of the original values and the relative values.

Constructor & Destructor Documentation

◆ GeomAPI_ShapeIterator() [1/2]

GeomAPI_ShapeIterator::GeomAPI_ShapeIterator ( )

Default constructor. Creates an empty iterator, becomes usefull after Init.

◆ GeomAPI_ShapeIterator() [2/2]

GeomAPI_ShapeIterator::GeomAPI_ShapeIterator ( const std::shared_ptr< GeomAPI_Shape theShape)

Creates an iterator on theShape sub-shapes.

Parameters
[in]theShapeshape to iterate.

Member Function Documentation

◆ init()

void GeomAPI_ShapeIterator::init ( const std::shared_ptr< GeomAPI_Shape theShape)

Initializes this iterator with theShape.

Parameters
[in]theShapeshape to iterate.

◆ more()

bool GeomAPI_ShapeIterator::more ( ) const
Returns
true if there is another sub-shape in the shape which this iterator is scanning.

◆ next()

void GeomAPI_ShapeIterator::next ( )

Moves on to the next sub-shape in the shape which this iterator is scanning.

◆ current()

std::shared_ptr< GeomAPI_Shape > GeomAPI_ShapeIterator::current ( )
Returns
the current sub-shape in the shape which this iterator is scanning.

◆ implPtr() [1/2]

template<class T >
T* GeomAPI_Interface::implPtr ( )
inlineinherited

Returns the pointer to the impl.

◆ implPtr() [2/2]

template<class T >
const T* GeomAPI_Interface::implPtr ( ) const
inlineinherited

Returns the pointer to the impl.

◆ impl()

template<class T >
const T& GeomAPI_Interface::impl ( ) const
inlineinherited

Returns the reference object of the impl.

◆ setImpl()

template<class T >
void GeomAPI_Interface::setImpl ( T *  theImpl)
inlineinherited

Updates the impl (deletes the old one)

◆ empty()

bool GeomAPI_Interface::empty ( ) const
inherited

Returns true if the impl is empty.