Salome HOME
Replace boost::shared_ptr<ModelAPI_Feature> on FeaturePtr
[modules/shaper.git] / src / XGUI / XGUI_ViewerPrs.h
1 // File:        XGUI_ViewerPrs.h
2 // Created:     20 Apr 2014
3 // Author:      Natalia ERMOLAEVA
4
5 #ifndef XGUI_ViewerPrs_H
6 #define XGUI_ViewerPrs_H
7
8 #include "XGUI.h"
9
10 #include <boost/shared_ptr.hpp>
11 #include <TopoDS_Shape.hxx>
12 #include <SelectMgr_EntityOwner.hxx>
13
14 #include <ModelAPI_Feature.h>
15
16 /**\class XGUI_ViewerPrs
17  * \ingroup GUI
18  * \brief Presentation. Provides container to have feature, shape and/or selection owner.
19  */
20 class XGUI_EXPORT XGUI_ViewerPrs
21 {
22 public:
23   /// Constructor
24   XGUI_ViewerPrs();
25   /// Constructor
26   /// \param theFeature a model feature
27   /// \param theShape a viewer shape
28   /// \param theOwner a selection owner
29   XGUI_ViewerPrs(FeaturePtr theFeature,
30                  const TopoDS_Shape& theShape,
31                  Handle_SelectMgr_EntityOwner theOwner);
32   /// Destructor
33   virtual ~XGUI_ViewerPrs();
34
35   /// Sets the feature.
36   /// \param theFeature a feature instance
37   void setFeature(FeaturePtr theFeature);
38
39   /// Returns the feature.
40   /// \return a feature instance
41   FeaturePtr feature() const;
42
43   /// Returns the presentation owner
44   /// \param the owner
45   void setOwner(Handle_SelectMgr_EntityOwner theOwner);
46
47   /// Returns the presentation owner
48   /// \return an owner
49   Handle_SelectMgr_EntityOwner owner() const;
50
51   /// Sets the shape
52   /// \param theShape a shape instance
53   void setShape(const TopoDS_Shape& theShape);
54
55   /// Returns the shape
56   /// \return a shape instance
57   const TopoDS_Shape& shape() const;
58
59 private:
60   FeaturePtr myFeature; /// the feature
61   Handle(SelectMgr_EntityOwner) myOwner; /// the selection owner
62   TopoDS_Shape myShape; /// the shape
63 };
64
65 #endif