Salome HOME
Temporary modification
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_RemoveSubShapes.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_RemoveSubShapes.h
4 // Created:     09 June 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef FeaturesAPI_RemoveSubShapes_H_
8 #define FeaturesAPI_RemoveSubShapes_H_
9
10 #include "FeaturesAPI.h"
11
12 #include <FeaturesPlugin_RemoveSubShapes.h>
13
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
16
17 class ModelHighAPI_Selection;
18
19 /// \class FeaturesAPI_RemoveSubShapes
20 /// \ingroup CPPHighAPI
21 /// \brief Interface for RemoveSubShapes feature.
22 class FeaturesAPI_RemoveSubShapes: public ModelHighAPI_Interface
23 {
24 public:
25   /// Constructor without values.
26   FEATURESAPI_EXPORT
27   explicit FeaturesAPI_RemoveSubShapes(const std::shared_ptr<ModelAPI_Feature>& theFeature);
28
29   /// Constructor with values.
30   FEATURESAPI_EXPORT
31   explicit FeaturesAPI_RemoveSubShapes(const std::shared_ptr<ModelAPI_Feature>& theFeature,
32                                        const ModelHighAPI_Selection& theBase);
33
34   /// Destructor.
35   FEATURESAPI_EXPORT
36   virtual ~FeaturesAPI_RemoveSubShapes();
37
38   INTERFACE_2(FeaturesPlugin_RemoveSubShapes::ID(),
39               base, FeaturesPlugin_RemoveSubShapes::BASE_SHAPE_ID(), ModelAPI_AttributeSelection, /** Base */,
40               subshapes, FeaturesPlugin_RemoveSubShapes::SUBSHAPES_ID(), ModelAPI_AttributeSelectionList, /** Subshapes */)
41
42   /// Modify objects attribute of the feature.
43   FEATURESAPI_EXPORT
44   void setBase(const ModelHighAPI_Selection& theBase);
45
46   /// Modify tools attribute of the feature.
47   FEATURESAPI_EXPORT
48   void setSubShapesToKeep(const std::list<ModelHighAPI_Selection>& theSubShapes);
49 };
50
51 /// Pointer on RemoveSubShapes object.
52 typedef std::shared_ptr<FeaturesAPI_RemoveSubShapes> RemoveSubShapesPtr;
53
54 /// \ingroup CPPHighAPI
55 /// \brief Create RemoveSubShapes feature.
56 FEATURESAPI_EXPORT
57 RemoveSubShapesPtr addRemoveSubShapes(const std::shared_ptr<ModelAPI_Document>& thePart,
58                                       const ModelHighAPI_Selection& theBase);
59
60 #endif // FeaturesAPI_RemoveSubShapes_H_