Open CASCADE Technology
7.3.0
|
Purpose: This template class is used to define Handle adaptor for allocated dynamically objects of arbitrary type. More...
#include <NCollection_Handle.hxx>
Public Types | |
typedef T | element_type |
Public Types inherited from opencascade::handle< Standard_Transient > | |
typedef Standard_Transient | element_type |
STL-compliant typedef of contained type. More... | |
Public Member Functions | |
NCollection_Handle () | |
Default constructor; creates null handle. More... | |
NCollection_Handle (T *theObject) | |
Constructor of handle from pointer on newly allocated object. More... | |
T * | get () |
Cast handle to contained type. More... | |
const T * | get () const |
Cast handle to contained type. More... | |
T * | operator-> () |
Cast handle to contained type. More... | |
const T * | operator-> () const |
Cast handle to contained type. More... | |
T & | operator* () |
Cast handle to contained type. More... | |
const T & | operator* () const |
Cast handle to contained type. More... | |
Public Member Functions inherited from opencascade::handle< Standard_Transient > | |
handle () | |
Empty constructor. More... | |
handle (const Standard_Transient *thePtr) | |
Constructor from pointer to new object. More... | |
handle (const handle &theHandle) | |
Copy constructor. More... | |
handle (handle &&theHandle) | |
Move constructor. More... | |
~handle () | |
Destructor. More... | |
void | Nullify () |
Nullify the handle. More... | |
bool | IsNull () const |
Check for being null. More... | |
void | reset (Standard_Transient *thePtr) |
Reset by new pointer. More... | |
handle & | operator= (const handle &theHandle) |
Assignment operator. More... | |
handle & | operator= (const Standard_Transient *thePtr) |
Assignment to pointer. More... | |
handle & | operator= (handle &&theHandle) |
Move operator. More... | |
Standard_Transient * | get () const |
STL-like cast to pointer to referred object (note non-const). More... | |
Standard_Transient * | operator-> () const |
Member access operator (note non-const) More... | |
Standard_Transient & | operator* () const |
Dereferencing operator (note non-const) More... | |
bool | operator== (const handle< T2 > &theHandle) const |
Check for equality. More... | |
bool | operator== (const T2 *thePtr) const |
Check for equality. More... | |
bool | operator!= (const handle< T2 > &theHandle) const |
Check for inequality. More... | |
bool | operator!= (const T2 *thePtr) const |
Check for inequality. More... | |
bool | operator< (const handle< T2 > &theHandle) const |
Compare operator for possible use in std::map<> etc. More... | |
Standard_DEPRECATED ("down-casting from object of the same or unrelated type is meaningless") static handle DownCast(const handle< T2 > &theObject | |
For compatibility, define down casting operator from non-base type, as deprecated. More... | |
Static Public Member Functions | |
static NCollection_Handle< T > | DownCast (const opencascade::handle< Standard_Transient > &theOther) |
Downcast arbitrary Handle to the argument type if contained object is Handle for this type; returns null otherwise. More... | |
Static Public Member Functions inherited from opencascade::handle< Standard_Transient > | |
static opencascade::std::enable_if< is_base_but_not_same< T2, Standard_Transient >::value, handle >::type | DownCast (const handle< T2 > &theObject) |
Down casting operator from handle to base type. More... | |
static opencascade::std::enable_if< is_base_but_not_same< T2, Standard_Transient >::value, handle >::type | DownCast (const T2 *thePtr) |
Down casting operator from pointer to base type. More... | |
Purpose: This template class is used to define Handle adaptor for allocated dynamically objects of arbitrary type.
The advantage is that this handle will automatically destroy the object when last referred Handle is destroyed (i.e. it is a typical smart pointer), and that it can be handled as Handle(Standard_Transient) in OCCT components.
typedef T NCollection_Handle< T >::element_type |
|
inline |
Default constructor; creates null handle.
|
inline |
Constructor of handle from pointer on newly allocated object.
|
inlinestatic |
Downcast arbitrary Handle to the argument type if contained object is Handle for this type; returns null otherwise.
|
inline |
Cast handle to contained type.
|
inline |
Cast handle to contained type.
|
inline |
Cast handle to contained type.
|
inline |
Cast handle to contained type.
|
inline |
Cast handle to contained type.
|
inline |
Cast handle to contained type.