Open CASCADE Technology  7.4.0
Data Structures | Namespaces | Macros | Functions
Standard_Handle.hxx File Reference
#include <Standard_Address.hxx>
#include <Standard_Std.hxx>
#include <Standard_Stream.hxx>
#include <Standard_Transient.hxx>

Data Structures

class  opencascade::handle< T >
 Intrusive smart pointer for use with Standard_Transient class and its descendants. More...
 

Namespaces

 opencascade
 Namespace opencascade is intended for low-level template classes and functions.
 

Macros

#define Handle(Class)   opencascade::handle<Class>
 Define Handle() macro. More...
 
#define DEFINE_STANDARD_HANDLECLASS(C1, C2, BC)   class C1; typedef Handle(C1) Handle_##C1;
 For compatibility with previous versions of OCCT, define Handle_Class alias for opencascade::handle<Class>. More...
 
#define DEFINE_STANDARD_HANDLE(C1, C2)   DEFINE_STANDARD_HANDLECLASS(C1,C2,Standard_Transient)
 
#define DEFINE_STANDARD_PHANDLE(C1, C2)   DEFINE_STANDARD_HANDLECLASS(C1,C2,Standard_Persistent)
 

Functions

template<class TheTransientType >
Standard_Integer HashCode (const Handle< TheTransientType > &theHandle, const Standard_Integer theUpperBound)
 Computes a hash code for the standard handle, in the range [1, theUpperBound]. More...
 

Macro Definition Documentation

◆ DEFINE_STANDARD_HANDLE

#define DEFINE_STANDARD_HANDLE (   C1,
  C2 
)    DEFINE_STANDARD_HANDLECLASS(C1,C2,Standard_Transient)

◆ DEFINE_STANDARD_HANDLECLASS

#define DEFINE_STANDARD_HANDLECLASS (   C1,
  C2,
  BC 
)    class C1; typedef Handle(C1) Handle_##C1;

For compatibility with previous versions of OCCT, define Handle_Class alias for opencascade::handle<Class>.

For other compilers, use simple typedef

◆ DEFINE_STANDARD_PHANDLE

#define DEFINE_STANDARD_PHANDLE (   C1,
  C2 
)    DEFINE_STANDARD_HANDLECLASS(C1,C2,Standard_Persistent)

◆ Handle

#define Handle (   Class)    opencascade::handle<Class>

Define Handle() macro.

Function Documentation

◆ HashCode()

template<class TheTransientType >
Standard_Integer HashCode ( const Handle< TheTransientType > &  theHandle,
const Standard_Integer  theUpperBound 
)

Computes a hash code for the standard handle, in the range [1, theUpperBound].

Parameters
TheTransientTypethe type of the object the handle is referred to
theHandlethe standard handle which hash code is to be computed
theUpperBoundthe upper bound of the range a computing hash code must be within
Returns
a computed hash code, in the range [1, theUpperBound]