mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- manual
Restored possibility to have out-of-line implementation of DynamicCast() and STANDART_TYPE(): - Macro STANDARD_TYPE() now resolves to function get_type_descriptor() of the class - Macro DEFINE_STANDARD_RTTI is replaced by two variants: - DEFINE_STANDARD_RTTI_INLINE works as before, defining DynamicCast() and get_type_descriptor() as inline functions - DEFINE_STANDARD_RTTIEXT declares DynamicCast() and get_type_descriptor() as exported - Macro IMPLEMENT_STANDARD_RTTIEXT provides definition of DynamicCast() and get_type_descriptor() for a class Upgrade script amended to replace DEFINE_STANDARD_RTTI by pair of DEFINE_STANDARD_RTTIEXT / IMPLEMENT_STANDARD_RTTIEXT if source file with the same name as header is found in the same folder, and by DEFINE_STANDARD_RTTI_INLINE if either source is not found or class is defined in the source (i.e. not in header) Upgrade tool improved to recognize include statements with path prefix, like #include <occt/gp_Pnt.hxx> Code corrected to eliminate warnings reported by upgrade tool. Template of CXX file for testing upgrade tool added. Documentation of upgrade procedure updated.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <XmlObjMgt_GP.hxx>
|
||||
#include <XmlObjMgt_Persistent.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_LocationDriver,XmlMDF_ADriver)
|
||||
IMPLEMENT_DOMSTRING (DatumString, "datum")
|
||||
IMPLEMENT_DOMSTRING (LocationString, "location")
|
||||
IMPLEMENT_DOMSTRING (PowerString, "power")
|
||||
@@ -176,7 +177,7 @@ Standard_Boolean XmlMXCAFDoc_LocationDriver::Translate
|
||||
Standard_Integer aDatumID;
|
||||
aLocElem.getAttribute (::DatumString()).GetInteger (aDatumID);
|
||||
if (aDatumID > 0 && theMap.IsBound (aDatumID))
|
||||
aDatum = (Handle(TopLoc_Datum3D)&) theMap.Find (aDatumID);
|
||||
aDatum = Handle(TopLoc_Datum3D)::DownCast (theMap.Find (aDatumID));
|
||||
else
|
||||
return Standard_False;
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user