0024023: Revamp the OCCT Handle -- handle
authorabv <abv@opencascade.com>
Wed, 1 Jul 2015 08:00:57 +0000 (11:00 +0300)
committerabv <abv@opencascade.com>
Sat, 11 Jul 2015 09:07:04 +0000 (12:07 +0300)
commite7195ab47605ab023b6fc78be745adb2bb2a36b0
tree0bf17c2b2a6d78bec7f2e8589d471c484b99037e
parente35db4162b694d8f14d8d2e88e27ae189abd7210
0024023: Revamp the OCCT Handle -- handle

Macro defining Handle class is replaced by template class implementing the same concept (defined in Standard_Handle.hxx and Standard_Transient.hxx), opencascade::handle<>.

Header file Standard_DefineHandle.hxx becomes deprecated: the only useful macro DEFINE_STANDARD_RTTI is defined now in Standard_Type.hxx. Standard_DefineHandle.hxx is kept for compatibility, it defines macros previously used for definition of Handles and RTTI as empty. Macro DEFINE_STANDARD_HANDLE(C1,C2) is also kept for compatibility; now it expands to typedef "Handle_C1" to corresponding handle class.

Definitions of macro Handle() and STANDARD_TYPE() moved from Standard_Macro.hxx to Standard_Handle.hxx (new file) and Standard_Type.hxx, respectively.

New template class NCollection_Shared added, allowing to define sub-class manipulated by handle, for any non-transient class.

Adaptations for compiling with GCC 4.7
23 files changed:
src/NCollection/FILES
src/NCollection/NCollection_DefineHSequence.hxx
src/NCollection/NCollection_Handle.cxx [deleted file]
src/NCollection/NCollection_Handle.hxx
src/NCollection/NCollection_Shared.hxx [new file with mode: 0644]
src/Standard/FILES
src/Standard/Handle_Standard_Persistent.cxx [deleted file]
src/Standard/Handle_Standard_Persistent.hxx [deleted file]
src/Standard/Handle_Standard_Transient.cxx [deleted file]
src/Standard/Handle_Standard_Transient.hxx [deleted file]
src/Standard/Standard.cdl
src/Standard/Standard_Copy.tcl
src/Standard/Standard_DefineHandle.hxx
src/Standard/Standard_Handle.hxx [new file with mode: 0644]
src/Standard/Standard_HashCode.cxx [deleted file]
src/Standard/Standard_Macro.hxx
src/Standard/Standard_Persistent.cdl
src/Standard/Standard_Persistent.hxx [moved from src/Standard/Standard_Persistent_proto.hxx with 57% similarity]
src/Standard/Standard_Transient.cxx
src/Standard/Standard_Transient.hxx
src/Standard/Standard_Transient_proto.hxx [deleted file]
src/Standard/Standard_Type.cxx
src/Standard/Standard_Type.hxx