Open CASCADE Technology 7.7.2
Standard_Handle.hxx File Reference

Data Structures

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

Namespaces

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

Macros

#define Handle(Class)   opencascade::handle<Class>
 Define Handle() macro.
 
#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>.
 
#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].
 

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
theHandlethe 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]