Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes
NCollection_Haft< CPPClass > Class Template Reference

Template CLI class providing the way to encapsulate instance of C++ class as a field in the C++/CLI (ref) class. More...

#include <NCollection_Haft.h>

Public Member Functions

 NCollection_Haft ()
 Initialize CLI Haft object by default-constructed C++ object. More...
 
template<class T >
 NCollection_Haft (const T *aPtr)
 Initialize CLI Haft object by compatible C++ pointer. More...
 
 NCollection_Haft (const CPPClass &aPtr)
 Initialize CLI Haft object by C++ class object. More...
 
 ~NCollection_Haft ()
 Destructor - invoked explicitly by delete, or automatically when local variable is scoped out. More...
 
 !NCollection_Haft ()
 Finalizer - called undeterministically by garbage collector. More...
 
CPPClass & operator() ()
 Function call operator is provided to access underlying C++ object. More...
 

Protected Member Functions

void Nullify ()
 Invalidate the haft. More...
 

Protected Attributes

CPPClass * myPtr
 

Detailed Description

template<class CPPClass>
class NCollection_Haft< CPPClass >

Template CLI class providing the way to encapsulate instance of C++ class as a field in the C++/CLI (ref) class.

It can be helpful to encapsulate OCCT Handles, maps, arrays, etc.

Use of variable of the Haft type is very similar to that of encapsulated class:

Constructor & Destructor Documentation

template<class CPPClass >
NCollection_Haft< CPPClass >::NCollection_Haft ( )
inline

Initialize CLI Haft object by default-constructed C++ object.

template<class CPPClass >
template<class T >
NCollection_Haft< CPPClass >::NCollection_Haft ( const T *  aPtr)
inline

Initialize CLI Haft object by compatible C++ pointer.

template<class CPPClass >
NCollection_Haft< CPPClass >::NCollection_Haft ( const CPPClass &  aPtr)
inline

Initialize CLI Haft object by C++ class object.

template<class CPPClass >
NCollection_Haft< CPPClass >::~NCollection_Haft ( )
inline

Destructor - invoked explicitly by delete, or automatically when local variable is scoped out.

template<class CPPClass >
NCollection_Haft< CPPClass >::!NCollection_Haft ( )
inline

Finalizer - called undeterministically by garbage collector.

Member Function Documentation

template<class CPPClass >
void NCollection_Haft< CPPClass >::Nullify ( )
inlineprotected

Invalidate the haft.

template<class CPPClass >
CPPClass& NCollection_Haft< CPPClass >::operator() ( )
inline

Function call operator is provided to access underlying C++ object.

Field Documentation

template<class CPPClass >
CPPClass* NCollection_Haft< CPPClass >::myPtr
protected

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