0030773: Application Framework - To allow to inherit existing attributes to reuse...
authormpv <mpv@opencascade.com>
Fri, 19 Jun 2020 20:12:17 +0000 (23:12 +0300)
committerabv <abv@opencascade.com>
Sat, 12 Sep 2020 17:42:18 +0000 (20:42 +0300)
commitc99ad5d7600fc399d1ee6fd42eeb12e4fe64b80c
treea994bad2970ed85d89061b6e9417edbeb3b3438c
parent59e11a2f751f3b7b2e03b20622469dfb087ec87a
0030773: Application Framework - To allow to inherit existing attributes to reuse persistence mechanisms

Added possibility to inherit existing attributes if the same persistent fields are used. All methods that allow controlling the data model changes or getting some callbacks may be overridden in successor. They may have same GUIDs as a base class or new ones.

Special macros IMPLEMENT_DERIVED_ATTRIBUTE and IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE must be used instead of standard Handle macro definition IMPLEMENT_STANDARD_RTTIEXT to register new derived attributes.

Using this improvement several existing attributes from TDataStd, TDataXtd and XCAFDoc packages become inherited from other base attribute-classes. XML and Bin drivers of these attributes are removed. New base attribute classes are added: TDataStd_GenericEmpty and TDataStd_GenericExtString.

This improvement does not change both present formats Bin and XML documents. The obsolete Standard scheme is not changed at all.
202 files changed:
src/BinMDF/BinMDF_ADriver.cxx
src/BinMDF/BinMDF_ADriver.hxx
src/BinMDF/BinMDF_ADriver.lxx
src/BinMDF/BinMDF_ADriverTable.cxx
src/BinMDF/BinMDF_ADriverTable.hxx
src/BinMDF/BinMDF_ADriverTable.lxx
src/BinMDF/BinMDF_DerivedDriver.cxx [new file with mode: 0644]
src/BinMDF/BinMDF_DerivedDriver.hxx [new file with mode: 0644]
src/BinMDF/FILES
src/BinMDataStd/BinMDataStd.cxx
src/BinMDataStd/BinMDataStd.hxx
src/BinMDataStd/BinMDataStd_CommentDriver.cxx [deleted file]
src/BinMDataStd/BinMDataStd_CommentDriver.hxx [deleted file]
src/BinMDataStd/BinMDataStd_DirectoryDriver.cxx [deleted file]
src/BinMDataStd/BinMDataStd_DirectoryDriver.hxx [deleted file]
src/BinMDataStd/BinMDataStd_GenericEmptyDriver.cxx [moved from src/BinMDataStd/BinMDataStd_TickDriver.cxx with 63% similarity]
src/BinMDataStd/BinMDataStd_GenericEmptyDriver.hxx [moved from src/BinMDataXtd/BinMDataXtd_AxisDriver.hxx with 67% similarity]
src/BinMDataStd/BinMDataStd_GenericExtStringDriver.cxx [moved from src/BinMDataStd/BinMDataStd_NameDriver.cxx with 68% similarity]
src/BinMDataStd/BinMDataStd_GenericExtStringDriver.hxx [moved from src/BinMDataStd/BinMDataStd_NameDriver.hxx with 69% similarity]
src/BinMDataStd/BinMDataStd_IntegerDriver.cxx
src/BinMDataStd/BinMDataStd_NoteBookDriver.cxx [deleted file]
src/BinMDataStd/BinMDataStd_NoteBookDriver.hxx [deleted file]
src/BinMDataStd/BinMDataStd_RelationDriver.cxx [deleted file]
src/BinMDataStd/BinMDataStd_RelationDriver.hxx [deleted file]
src/BinMDataStd/BinMDataStd_TickDriver.hxx [deleted file]
src/BinMDataStd/FILES
src/BinMDataXtd/BinMDataXtd.cxx
src/BinMDataXtd/BinMDataXtd.hxx
src/BinMDataXtd/BinMDataXtd_AxisDriver.cxx [deleted file]
src/BinMDataXtd/BinMDataXtd_PlacementDriver.cxx [deleted file]
src/BinMDataXtd/BinMDataXtd_PlacementDriver.hxx [deleted file]
src/BinMDataXtd/BinMDataXtd_PlaneDriver.cxx [deleted file]
src/BinMDataXtd/BinMDataXtd_PlaneDriver.hxx [deleted file]
src/BinMDataXtd/BinMDataXtd_PointDriver.cxx [deleted file]
src/BinMDataXtd/BinMDataXtd_PointDriver.hxx [deleted file]
src/BinMDataXtd/BinMDataXtd_ShapeDriver.cxx [deleted file]
src/BinMDataXtd/BinMDataXtd_ShapeDriver.hxx [deleted file]
src/BinMDataXtd/FILES
src/BinMXCAFDoc/BinMXCAFDoc.cxx
src/BinMXCAFDoc/BinMXCAFDoc.hxx
src/BinMXCAFDoc/BinMXCAFDoc_AreaDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_AreaDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_ClippingPlaneToolDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_ClippingPlaneToolDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_ColorToolDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_ColorToolDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_DimTolToolDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_DimTolToolDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_DimensionDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_DimensionDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_DocumentToolDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_DocumentToolDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_GeomToleranceDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_GeomToleranceDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_LayerToolDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_LayerToolDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_MaterialToolDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_MaterialToolDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_NoteBalloonDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_NoteBalloonDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_ShapeToolDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_ShapeToolDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_ViewDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_ViewDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_ViewToolDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_ViewToolDriver.hxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.cxx [deleted file]
src/BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.hxx [deleted file]
src/BinMXCAFDoc/FILES
src/DDF/DDF_BasicCommands.cxx
src/TDF/FILES
src/TDF/TDF_DerivedAttribute.cxx [new file with mode: 0644]
src/TDF/TDF_DerivedAttribute.hxx [new file with mode: 0644]
src/TDataStd/FILES
src/TDataStd/TDataStd_Comment.cxx
src/TDataStd/TDataStd_Comment.hxx
src/TDataStd/TDataStd_Directory.cxx
src/TDataStd/TDataStd_Directory.hxx
src/TDataStd/TDataStd_Expression.cxx
src/TDataStd/TDataStd_Expression.hxx
src/TDataStd/TDataStd_GenericEmpty.cxx [new file with mode: 0644]
src/TDataStd/TDataStd_GenericEmpty.hxx [new file with mode: 0644]
src/TDataStd/TDataStd_GenericExtString.cxx [new file with mode: 0644]
src/TDataStd/TDataStd_GenericExtString.hxx [new file with mode: 0644]
src/TDataStd/TDataStd_Name.cxx
src/TDataStd/TDataStd_Name.hxx
src/TDataStd/TDataStd_NoteBook.cxx
src/TDataStd/TDataStd_NoteBook.hxx
src/TDataStd/TDataStd_Real.hxx
src/TDataStd/TDataStd_Relation.cxx
src/TDataStd/TDataStd_Relation.hxx
src/TDataStd/TDataStd_Tick.cxx
src/TDataStd/TDataStd_Tick.hxx
src/TDataXtd/TDataXtd_Axis.cxx
src/TDataXtd/TDataXtd_Axis.hxx
src/TDataXtd/TDataXtd_Placement.cxx
src/TDataXtd/TDataXtd_Placement.hxx
src/TDataXtd/TDataXtd_Plane.cxx
src/TDataXtd/TDataXtd_Plane.hxx
src/TDataXtd/TDataXtd_Point.cxx
src/TDataXtd/TDataXtd_Point.hxx
src/TDataXtd/TDataXtd_Shape.cxx
src/TDataXtd/TDataXtd_Shape.hxx
src/XCAFDoc/XCAFDoc_Area.cxx
src/XCAFDoc/XCAFDoc_Area.hxx
src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx
src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx
src/XCAFDoc/XCAFDoc_ColorTool.cxx
src/XCAFDoc/XCAFDoc_ColorTool.hxx
src/XCAFDoc/XCAFDoc_DimTolTool.cxx
src/XCAFDoc/XCAFDoc_DimTolTool.hxx
src/XCAFDoc/XCAFDoc_Dimension.cxx
src/XCAFDoc/XCAFDoc_Dimension.hxx
src/XCAFDoc/XCAFDoc_DocumentTool.cxx
src/XCAFDoc/XCAFDoc_DocumentTool.hxx
src/XCAFDoc/XCAFDoc_GeomTolerance.cxx
src/XCAFDoc/XCAFDoc_GeomTolerance.hxx
src/XCAFDoc/XCAFDoc_LayerTool.cxx
src/XCAFDoc/XCAFDoc_LayerTool.hxx
src/XCAFDoc/XCAFDoc_MaterialTool.cxx
src/XCAFDoc/XCAFDoc_MaterialTool.hxx
src/XCAFDoc/XCAFDoc_Note.hxx
src/XCAFDoc/XCAFDoc_NoteBalloon.cxx
src/XCAFDoc/XCAFDoc_NoteBalloon.hxx
src/XCAFDoc/XCAFDoc_NotesTool.cxx
src/XCAFDoc/XCAFDoc_NotesTool.hxx
src/XCAFDoc/XCAFDoc_ShapeTool.cxx
src/XCAFDoc/XCAFDoc_ShapeTool.hxx
src/XCAFDoc/XCAFDoc_View.cxx
src/XCAFDoc/XCAFDoc_View.hxx
src/XCAFDoc/XCAFDoc_ViewTool.cxx
src/XCAFDoc/XCAFDoc_ViewTool.hxx
src/XCAFDoc/XCAFDoc_Volume.cxx
src/XCAFDoc/XCAFDoc_Volume.hxx
src/XmlMDF/FILES
src/XmlMDF/XmlMDF.cxx
src/XmlMDF/XmlMDF_ADriver.cxx
src/XmlMDF/XmlMDF_ADriver.hxx
src/XmlMDF/XmlMDF_ADriverTable.cxx
src/XmlMDF/XmlMDF_ADriverTable.hxx
src/XmlMDF/XmlMDF_DerivedDriver.cxx [new file with mode: 0644]
src/XmlMDF/XmlMDF_DerivedDriver.hxx [new file with mode: 0644]
src/XmlMDataStd/FILES
src/XmlMDataStd/XmlMDataStd.cxx
src/XmlMDataStd/XmlMDataStd.hxx
src/XmlMDataStd/XmlMDataStd_CommentDriver.cxx [deleted file]
src/XmlMDataStd/XmlMDataStd_CommentDriver.hxx [deleted file]
src/XmlMDataStd/XmlMDataStd_DirectoryDriver.cxx [deleted file]
src/XmlMDataStd/XmlMDataStd_DirectoryDriver.hxx [deleted file]
src/XmlMDataStd/XmlMDataStd_GenericEmptyDriver.cxx [moved from src/XmlMDataStd/XmlMDataStd_TickDriver.cxx with 63% similarity]
src/XmlMDataStd/XmlMDataStd_GenericEmptyDriver.hxx [moved from src/XmlMDataStd/XmlMDataStd_TickDriver.hxx with 68% similarity]
src/XmlMDataStd/XmlMDataStd_GenericExtStringDriver.cxx [moved from src/XmlMDataStd/XmlMDataStd_NameDriver.cxx with 59% similarity]
src/XmlMDataStd/XmlMDataStd_GenericExtStringDriver.hxx [moved from src/XmlMDataStd/XmlMDataStd_NameDriver.hxx with 69% similarity]
src/XmlMDataStd/XmlMDataStd_IntegerDriver.cxx
src/XmlMDataStd/XmlMDataStd_NoteBookDriver.cxx [deleted file]
src/XmlMDataStd/XmlMDataStd_NoteBookDriver.hxx [deleted file]
src/XmlMDataStd/XmlMDataStd_RelationDriver.cxx [deleted file]
src/XmlMDataStd/XmlMDataStd_RelationDriver.hxx [deleted file]
src/XmlMDataXtd/FILES
src/XmlMDataXtd/XmlMDataXtd.cxx
src/XmlMDataXtd/XmlMDataXtd.hxx
src/XmlMDataXtd/XmlMDataXtd_AxisDriver.cxx [deleted file]
src/XmlMDataXtd/XmlMDataXtd_AxisDriver.hxx [deleted file]
src/XmlMDataXtd/XmlMDataXtd_PlacementDriver.cxx [deleted file]
src/XmlMDataXtd/XmlMDataXtd_PlacementDriver.hxx [deleted file]
src/XmlMDataXtd/XmlMDataXtd_PlaneDriver.cxx [deleted file]
src/XmlMDataXtd/XmlMDataXtd_PlaneDriver.hxx [deleted file]
src/XmlMDataXtd/XmlMDataXtd_PointDriver.cxx [deleted file]
src/XmlMDataXtd/XmlMDataXtd_PointDriver.hxx [deleted file]
src/XmlMDataXtd/XmlMDataXtd_ShapeDriver.cxx [deleted file]
src/XmlMDataXtd/XmlMDataXtd_ShapeDriver.hxx [deleted file]
src/XmlMXCAFDoc/FILES
src/XmlMXCAFDoc/XmlMXCAFDoc.cxx
src/XmlMXCAFDoc/XmlMXCAFDoc.hxx
src/XmlMXCAFDoc/XmlMXCAFDoc_AreaDriver.cxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_AreaDriver.hxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_ClippingPlaneToolDriver.cxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_ClippingPlaneToolDriver.hxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_ColorToolDriver.cxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_ColorToolDriver.hxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_DimTolToolDriver.cxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_DimTolToolDriver.hxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_DocumentToolDriver.cxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_DocumentToolDriver.hxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_LayerToolDriver.cxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_LayerToolDriver.hxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_MaterialToolDriver.cxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_MaterialToolDriver.hxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_NoteBalloonDriver.cxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_NoteBalloonDriver.hxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_NotesToolDriver.cxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_NotesToolDriver.hxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_ShapeToolDriver.cxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_ShapeToolDriver.hxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_ViewToolDriver.cxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_ViewToolDriver.hxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_VolumeDriver.cxx [deleted file]
src/XmlMXCAFDoc/XmlMXCAFDoc_VolumeDriver.hxx [deleted file]
tests/caf/basic/F4 [new file with mode: 0644]
tests/caf/basic/F5 [new file with mode: 0644]