From: nds Date: Wed, 6 Apr 2016 15:26:49 +0000 (+0300) Subject: ModuleBase_ViewerPrs is wrapped into shared_ptr: remove include of this class from... X-Git-Tag: V_2.3.0~283 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9ddad7aadf48e6754d8ddeea4eaf0c37c66a9b8f;p=modules%2Fshaper.git ModuleBase_ViewerPrs is wrapped into shared_ptr: remove include of this class from headers. --- diff --git a/src/ModuleBase/ModuleBase_IModule.h b/src/ModuleBase/ModuleBase_IModule.h index 5e33eecb5..269c11568 100755 --- a/src/ModuleBase/ModuleBase_IModule.h +++ b/src/ModuleBase/ModuleBase_IModule.h @@ -29,6 +29,9 @@ class Config_WidgetAPI; class ModuleBase_ModelWidget; class ModuleBase_Operation; class ModuleBase_IWorkshop; +class ModelAPI_Result; + +class Handle_AIS_InteractiveObject; /** * \ingroup GUI @@ -202,7 +205,7 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject const bool theUpdateViewer) {} /// Modifies the given presentation in the custom way. - virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs, + virtual bool customisePresentation(std::shared_ptr theResult, AISObjectPtr thePrs, GeomCustomPrsPtr theCustomPrs) { return false; }; /// Update the object presentable properties such as color, lines width and other @@ -231,7 +234,8 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// Create specific for the module presentation /// \param theResult an object for presentation /// \return created presentation or NULL(default value) - virtual Handle(AIS_InteractiveObject) createPresentation(const ResultPtr& theResult); + virtual Handle_AIS_InteractiveObject createPresentation( + const std::shared_ptr& theResult); //! Returns data object by AIS virtual ObjectPtr findPresentedObject(const AISObjectPtr& theAIS) const = 0; diff --git a/src/ModuleBase/ModuleBase_ISelection.cpp b/src/ModuleBase/ModuleBase_ISelection.cpp index 05bc1d6c1..1669c2381 100644 --- a/src/ModuleBase/ModuleBase_ISelection.cpp +++ b/src/ModuleBase/ModuleBase_ISelection.cpp @@ -2,6 +2,8 @@ #include "ModuleBase_ISelection.h" +#include "ModuleBase_ViewerPrs.h" + #include #include #include diff --git a/src/ModuleBase/ModuleBase_ISelection.h b/src/ModuleBase/ModuleBase_ISelection.h index fbfa973a6..65badd60f 100644 --- a/src/ModuleBase/ModuleBase_ISelection.h +++ b/src/ModuleBase/ModuleBase_ISelection.h @@ -9,7 +9,6 @@ #include "ModuleBase.h" #include "ModuleBase_Definitions.h" -#include "ModuleBase_ViewerPrs.h" #include #include @@ -21,6 +20,7 @@ #include +class ModuleBase_ViewerPrs; class Handle_SelectMgr_EntityOwner; /** diff --git a/src/ModuleBase/ModuleBase_IWorkshop.h b/src/ModuleBase/ModuleBase_IWorkshop.h index 3c0fa44d1..45284de1b 100644 --- a/src/ModuleBase/ModuleBase_IWorkshop.h +++ b/src/ModuleBase/ModuleBase_IWorkshop.h @@ -10,7 +10,6 @@ #include "ModuleBase.h" #include "ModuleBase_Definitions.h" #include -#include #include #include @@ -23,6 +22,7 @@ class ModuleBase_IViewer; class ModuleBase_IPropertyPanel; class ModuleBase_Operation; class ModuleBase_FilterFactory; +class ModuleBase_ViewerPrs; /** * \ingroup GUI diff --git a/src/ModuleBase/ModuleBase_ModelWidget.cpp b/src/ModuleBase/ModuleBase_ModelWidget.cpp index d12cfbeb2..1985400a4 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.cpp +++ b/src/ModuleBase/ModuleBase_ModelWidget.cpp @@ -5,6 +5,7 @@ // Author: Natalia ERMOLAEVA #include "ModuleBase_ModelWidget.h" +#include "ModuleBase_ViewerPrs.h" #include "ModuleBase_Tools.h" #include diff --git a/src/ModuleBase/ModuleBase_ModelWidget.h b/src/ModuleBase/ModuleBase_ModelWidget.h index 3da454d0e..6712bc029 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@ -8,7 +8,6 @@ #define MODULEBASE_MODELWIDGET_H #include -#include #include #include @@ -18,6 +17,7 @@ class Config_WidgetAPI; class ModuleBase_IWorkshop; +class ModuleBase_ViewerPrs; class QKeyEvent; /**\class ModuleBase_ModelWidget diff --git a/src/ModuleBase/ModuleBase_OperationFeature.h b/src/ModuleBase/ModuleBase_OperationFeature.h index 48c374a65..6bc625b3e 100755 --- a/src/ModuleBase/ModuleBase_OperationFeature.h +++ b/src/ModuleBase/ModuleBase_OperationFeature.h @@ -12,7 +12,6 @@ #include #include -#include #include #include @@ -27,6 +26,7 @@ class ModuleBase_ModelWidget; class ModuleBase_ISelection; class ModuleBase_IViewer; class ModuleBase_IWorkshop; +class ModuleBase_ViewerPrs; class QKeyEvent; diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index 8e2785151..6e47e2892 100755 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.cpp b/src/ModuleBase/ModuleBase_WidgetSelector.cpp index 4d8034ed8..b9fe6ef9c 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelector.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.h b/src/ModuleBase/ModuleBase_WidgetSelector.h index 152b76f1e..b6af3a3f9 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetSelector.h @@ -9,7 +9,6 @@ #include "ModuleBase.h" #include "ModuleBase_WidgetValidated.h" -#include #include "ModuleBase_Definitions.h" #include @@ -19,6 +18,8 @@ class Config_WidgetAPI; class QWidget; class ModuleBase_IWorkshop; +class ModuleBase_ViewerPrs; +class ModelAPI_Result; /** * \ingroup GUI @@ -94,7 +95,8 @@ protected: /// in the construction. /// \param theShape a shape /// \param theResult a selected result - bool acceptSubShape(const GeomShapePtr& theShape, const ResultPtr& theResult) const; + bool acceptSubShape(const GeomShapePtr& theShape, + const std::shared_ptr& theResult) const; /// Return an object and geom shape by the viewer presentation /// \param thePrs a selection diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index ff003f0e8..39387667a 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.h b/src/ModuleBase/ModuleBase_WidgetShapeSelector.h index 35ce69e16..e7154df8e 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.h @@ -10,7 +10,6 @@ #include "ModuleBase.h" #include "ModuleBase_WidgetSelector.h" #include "ModuleBase_ViewerFilters.h" -#include #include #include @@ -26,6 +25,7 @@ class QLabel; class QLineEdit; class QToolButton; class ModuleBase_IWorkshop; +class ModuleBase_ViewerPrs; class ModelAPI_Validator; /** diff --git a/src/ModuleBase/ModuleBase_WidgetValidated.cpp b/src/ModuleBase/ModuleBase_WidgetValidated.cpp index a78a1c893..0bc4aef1a 100644 --- a/src/ModuleBase/ModuleBase_WidgetValidated.cpp +++ b/src/ModuleBase/ModuleBase_WidgetValidated.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include diff --git a/src/PartSet/PartSet_FilterInfinite.cpp b/src/PartSet/PartSet_FilterInfinite.cpp index ce873e62e..df38f4ceb 100755 --- a/src/PartSet/PartSet_FilterInfinite.cpp +++ b/src/PartSet/PartSet_FilterInfinite.cpp @@ -8,6 +8,8 @@ #include #include +#include + #include #include diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index cb741d4f0..ca96ae5cc 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include diff --git a/src/PartSet/PartSet_Module.h b/src/PartSet/PartSet_Module.h index 93084a2ae..6b70b2341 100755 --- a/src/PartSet/PartSet_Module.h +++ b/src/PartSet/PartSet_Module.h @@ -35,6 +35,7 @@ class PartSet_MenuMgr; class PartSet_CustomPrs; class PartSet_SketcherMgr; class PartSet_SketcherReetntrantMgr; +class ModelAPI_Result; class QAction; @@ -228,7 +229,8 @@ public: const bool theUpdateViewer); /// Modifies the given presentation in the custom way. - virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs, + virtual bool customisePresentation(std::shared_ptr theResult, + AISObjectPtr thePrs, std::shared_ptr theCustomPrs); /// Update the object presentable properties such as color, lines width and other @@ -252,7 +254,8 @@ public: /// Create specific for the module presentation /// \param theResult an object for presentation /// \return created presentation or NULL(default value) - virtual Handle(AIS_InteractiveObject) createPresentation(const ResultPtr& theResult); + virtual Handle(AIS_InteractiveObject) createPresentation( + const std::shared_ptr& theResult); //! Returns data object by AIS virtual ObjectPtr findPresentedObject(const AISObjectPtr& theAIS) const; diff --git a/src/PartSet/PartSet_OperationPrs.cpp b/src/PartSet/PartSet_OperationPrs.cpp index 76e143c82..98bd33298 100755 --- a/src/PartSet/PartSet_OperationPrs.cpp +++ b/src/PartSet/PartSet_OperationPrs.cpp @@ -16,6 +16,7 @@ #include "ModuleBase_IModule.h" #include #include +#include #include #include diff --git a/src/PartSet/PartSet_Tools.h b/src/PartSet/PartSet_Tools.h index 292e4c84c..bd68e4fb6 100755 --- a/src/PartSet/PartSet_Tools.h +++ b/src/PartSet/PartSet_Tools.h @@ -9,7 +9,6 @@ #include "PartSet.h" -#include #include #include @@ -29,11 +28,13 @@ class Handle_V3d_View; class ModuleBase_ViewerPrs; class ModuleBase_IWorkshop; class GeomDataAPI_Point2D; +class GeomAPI_Shape; class GeomAPI_Pln; class GeomAPI_Pnt2d; class GeomAPI_Pnt; class GeomAPI_Edge; class GeomAPI_Vertex; +class ModelAPI_Result; /*! * \class PartSet_Tools @@ -159,7 +160,8 @@ public: /// \param theObject a selected result object /// \param theSketch a sketch feature /// \return result of found feature or NULL - static ResultPtr findFixedObjectByExternal(const TopoDS_Shape& theShape, + static std::shared_ptr findFixedObjectByExternal( + const TopoDS_Shape& theShape, const ObjectPtr& theObject, CompositeFeaturePtr theSketch); @@ -170,7 +172,8 @@ public: /// \param theSketch a sketch feature /// \param theTemporary the created external object is temporary, execute is not performed for it /// \return result of created feature - static ResultPtr createFixedObjectByExternal(const TopoDS_Shape& theShape, + static std::shared_ptr createFixedObjectByExternal( + const TopoDS_Shape& theShape, const ObjectPtr& theObject, CompositeFeaturePtr theSketch, const bool theTemporary = false); @@ -186,13 +189,15 @@ public: /// \param theSketch - the sketch feature /// \param theEdge - the edge /// \return result object with external edge if it is found - static ResultPtr findExternalEdge(CompositeFeaturePtr theSketch, std::shared_ptr theEdge); + static std::shared_ptr findExternalEdge(CompositeFeaturePtr theSketch, + std::shared_ptr theEdge); /// Returns Result object if the given sketch contains external vertex equal to the given /// \param theSketch - the sketch feature /// \param theVert - the vertex /// \return result object with external vertex if it is found - static ResultPtr findExternalVertex(CompositeFeaturePtr theSketch, std::shared_ptr theVert); + static std::shared_ptr findExternalVertex(CompositeFeaturePtr theSketch, + std::shared_ptr theVert); /// Returns whether the selected presentation has a shape with the vertex type /// \param thePrs a selected presentation @@ -219,7 +224,7 @@ public: * \param theWorkshop a reference to workshop * \return a geometry shape */ - static GeomShapePtr findShapeBy2DPoint(const AttributePtr& theAttribute, + static std::shared_ptr findShapeBy2DPoint(const AttributePtr& theAttribute, ModuleBase_IWorkshop* theWorkshop); /** diff --git a/src/PartSet/PartSet_Validators.cpp b/src/PartSet/PartSet_Validators.cpp index 925856843..38ef8be3a 100755 --- a/src/PartSet/PartSet_Validators.cpp +++ b/src/PartSet/PartSet_Validators.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/src/PartSet/PartSet_WidgetMultiSelector.cpp b/src/PartSet/PartSet_WidgetMultiSelector.cpp index f3e429361..e8695bf21 100755 --- a/src/PartSet/PartSet_WidgetMultiSelector.cpp +++ b/src/PartSet/PartSet_WidgetMultiSelector.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include diff --git a/src/PartSet/PartSet_WidgetMultiSelector.h b/src/PartSet/PartSet_WidgetMultiSelector.h index d3d367119..b079c7530 100644 --- a/src/PartSet/PartSet_WidgetMultiSelector.h +++ b/src/PartSet/PartSet_WidgetMultiSelector.h @@ -11,11 +11,11 @@ #include "PartSet.h" #include -#include #include class PartSet_ExternalObjectsMgr; +class ModuleBase_ViewerPrs; /** * \ingroup Modules diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index f5e9903da..07270eacc 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/src/PartSet/PartSet_WidgetShapeSelector.cpp b/src/PartSet/PartSet_WidgetShapeSelector.cpp index c291eb0ff..aa20ad82c 100755 --- a/src/PartSet/PartSet_WidgetShapeSelector.cpp +++ b/src/PartSet/PartSet_WidgetShapeSelector.cpp @@ -13,6 +13,8 @@ #include #include +#include + #include #include diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index 91d36980b..ba9f9f124 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -37,6 +37,8 @@ #include #include #include +#include + #include #include diff --git a/src/XGUI/XGUI_ActionsMgr.cpp b/src/XGUI/XGUI_ActionsMgr.cpp index 2468786c4..66c6bf5a8 100644 --- a/src/XGUI/XGUI_ActionsMgr.cpp +++ b/src/XGUI/XGUI_ActionsMgr.cpp @@ -1,9 +1,5 @@ // Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> -/* - * XGUI_ActionsMgr.cpp - */ - #ifndef HAVE_SALOME #include #endif diff --git a/src/XGUI/XGUI_ContextMenuMgr.cpp b/src/XGUI/XGUI_ContextMenuMgr.cpp index 6122c232f..051fa8028 100644 --- a/src/XGUI/XGUI_ContextMenuMgr.cpp +++ b/src/XGUI/XGUI_ContextMenuMgr.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index bfb5ce29f..e969fbf01 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/src/XGUI/XGUI_Displayer.h b/src/XGUI/XGUI_Displayer.h index 0ef3285f8..a25c306f7 100644 --- a/src/XGUI/XGUI_Displayer.h +++ b/src/XGUI/XGUI_Displayer.h @@ -18,7 +18,6 @@ #include #include -#include #include @@ -29,6 +28,7 @@ #include #include +class ModuleBase_ViewerPrs; class ModelAPI_Feature; class XGUI_Workshop; diff --git a/src/XGUI/XGUI_Selection.cpp b/src/XGUI/XGUI_Selection.cpp index 6e9a0abc9..07fcafc61 100644 --- a/src/XGUI/XGUI_Selection.cpp +++ b/src/XGUI/XGUI_Selection.cpp @@ -11,6 +11,7 @@ #include "XGUI_ObjectsBrowser.h" #include "ModuleBase_ResultPrs.h" +#include #include #include diff --git a/src/XGUI/XGUI_Selection.h b/src/XGUI/XGUI_Selection.h index f1de36228..570820e2c 100644 --- a/src/XGUI/XGUI_Selection.h +++ b/src/XGUI/XGUI_Selection.h @@ -9,7 +9,6 @@ #include "XGUI.h" -#include #include #include @@ -22,6 +21,7 @@ class XGUI_Workshop; class Handle_SelectMgr_EntityOwner; +class ModuleBase_ViewerPrs; /** * \ingroup GUI