FougTools
0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
|
Downcasting operator for OpenCascade handles. More...
#include <down_cast.h>
Public Member Functions | |
down_cast (const Handle_Standard_Transient &handle) | |
Construct the operator that will down cast object to an handle of type TYPE. More... | |
operator TYPE () const | |
Downcasted handle to type TYPE. More... | |
const TYPE | operator-> () const |
Downcasted handle to type TYPE. More... | |
Downcasting operator for OpenCascade handles.
It wraps up into a syntactic C++ sugar the way casting of handles is supported in OpenCascade
Example : suppose you would like to downcast an Handle_Geom_Curve into a Handle_Geom_Circle. With OpenCascade it can be done by :
The equivalent with the down_cast<> operator is :
|
explicit |
Construct the operator that will down cast object
to an handle of type TYPE.
occ::down_cast< TYPE >::operator TYPE | ( | ) | const |
Downcasted handle to type TYPE.
const TYPE occ::down_cast< TYPE >::operator-> | ( | ) | const |
Downcasted handle to type TYPE.