occt: master 69ff08ff

Author Committer Branch Timestamp Parent
abv abv master 2015-05-22 03:40:28 master 4052fe71
Affected Issues  0024947: Redesign OCCT legacy type system
Changeset 0024947: Redesign OCCT legacy type system

Global static functions instantiating RTTI descriptors for class types (used though STANDARD_TYPE macro) are replaced by template static method Instance() of the class Standard_Type.
Implementation of RTTI is revised accordingly (global registry of type descriptors added to ensure single instance of each type descriptor shared by all dynamic libraries).
Obsolete methods of Standard_Type class (IsInstance(), Ancestors()) are removed; new method Parent() is added returning type descriptor of the parent class.
Class Standard_AncestorIterator is removed; this iteration can be easily done by recursive calls to Standard_Type::Parent().

Definition of macro STANDARD_TYPE() moved from Standard_Macro.hxx to Standard_DefineHandle.hxx.
Inclusion of Standard_Type.hxx and the class header is now necessary for use of method DownCast() and function STANDARD_TYPE() for the class.
In general, Standard_Type.hxx should be included now instead of Standard_DefineHandle.hxx in places where these macros are used.

Macro DEFINE_STANDARD_EXCEPTION changed to define all methods inline; macro IMPLEMENT_STANDARD_EXCEPTION becomes obsolete.
Macros IMPLEMENT_DOWNCAST, IMPLEMENT_STANDARD_* become deprecated, they are still defined (as empty) for compatibility.

Implementation of Handle classes became fully inline.
Method get() is added in Handle classes returning pointer to the contained object.

RTTI removed from NCollection_Handle class.

Standard_Persistent is made empty descendant of Standard_Transient, instead of implementing its own hierarchy with reference counting.

Unused enumerations Standard_InternalType, Standard_WayOfLife, Standard_KindOfType are removed.
Global function HashCode() accepting Handle(Standard_Transient) is removed; HashCode() for Standard_CString with length should be used instead.

DRAW command dtryload is added for testing dynamic load / unload of the specified library.
New test perf fclasses bug24947 uses this command to measure performance of multiple (1000 times) loading / unloading OCCT libs on example of TKSTEP.
mod - src/DDF/DDF_DataCommands.cxx Diff File
mod - src/Draw/Draw_PloadCommands.cxx Diff File
mod - src/IFSelect/IFSelect_BasicDumper.cxx Diff File
mod - src/IntImp/IntImp_ComputeTangence.cxx Diff File
mod - src/Message/Message_Algorithm.cxx Diff File
mod - src/NCollection/NCollection_Handle.cxx Diff File
mod - src/NCollection/NCollection_Handle.hxx Diff File
mod - src/Precision/Precision.cxx Diff File
mod - src/SelectMgr/SelectMgr_SelectableObject.cxx Diff File
mod - src/Standard/FILES Diff File
mod - src/Standard/Handle_Standard_Persistent.cxx Diff File
mod - src/Standard/Handle_Standard_Persistent.hxx Diff File
mod - src/Standard/Handle_Standard_Transient.hxx Diff File
mod - src/Standard/Standard.cdl Diff File
rm - src/Standard/Standard_AncestorIterator.cdl Diff File
rm - src/Standard/Standard_AncestorIterator.cxx Diff File
mod - src/Standard/Standard_CString.cxx Diff File
mod - src/Standard/Standard_DefineException.hxx Diff File
mod - src/Standard/Standard_DefineHandle.hxx Diff File
mod - src/Standard/Standard_Failure.cdl Diff File
mod - src/Standard/Standard_Failure.cxx Diff File
mod - src/Standard/Standard_HashCode.cxx Diff File
mod - src/Standard/Standard_Macro.hxx Diff File
mod - src/Standard/Standard_Persistent.cxx Diff File
mod - src/Standard/Standard_Persistent_proto.hxx Diff File
mod - src/Standard/Standard_PrimitiveTypes.hxx Diff File
mod - src/Standard/Standard_ShortReal.hxx Diff File
mod - src/Standard/Standard_Transient.cdl Diff File
mod - src/Standard/Standard_Transient.cxx Diff File
mod - src/Standard/Standard_Transient.hxx Diff File
mod - src/Standard/Standard_Transient_proto.hxx Diff File
rm - src/Standard/Standard_Type.cdl Diff File
mod - src/Standard/Standard_Type.cxx Diff File
add - src/Standard/Standard_Type.hxx Diff File
rm - src/Standard/Standard_Type.lxx Diff File
mod - src/TDataStd/TDataStd_TreeNode.cxx Diff File
add - tests/perf/fclasses/bug24947 Diff File
mod - tests/perf/grids.list Diff File