1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_RemoveSubShapes.h
4 // Created: 09 June 2016
5 // Author: Dmitry Bobylev
7 #ifndef FeaturesAPI_RemoveSubShapes_H_
8 #define FeaturesAPI_RemoveSubShapes_H_
10 #include "FeaturesAPI.h"
12 #include <FeaturesPlugin_RemoveSubShapes.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Selection;
19 /// \class FeaturesAPI_RemoveSubShapes
20 /// \ingroup CPPHighAPI
21 /// \brief Interface for RemoveSubShapes feature.
22 class FeaturesAPI_RemoveSubShapes: public ModelHighAPI_Interface
25 /// Constructor without values.
27 explicit FeaturesAPI_RemoveSubShapes(const std::shared_ptr<ModelAPI_Feature>& theFeature);
29 /// Constructor with values.
31 explicit FeaturesAPI_RemoveSubShapes(const std::shared_ptr<ModelAPI_Feature>& theFeature,
32 const ModelHighAPI_Selection& theBase);
36 virtual ~FeaturesAPI_RemoveSubShapes();
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 */)
42 /// Modify objects attribute of the feature.
44 void setBase(const ModelHighAPI_Selection& theBase);
46 /// Modify tools attribute of the feature.
48 void setSubShapesToKeep(const std::list<ModelHighAPI_Selection>& theSubShapes);
51 /// Pointer on RemoveSubShapes object.
52 typedef std::shared_ptr<FeaturesAPI_RemoveSubShapes> RemoveSubShapesPtr;
54 /// \ingroup CPPHighAPI
55 /// \brief Create RemoveSubShapes feature.
57 RemoveSubShapesPtr addRemoveSubShapes(const std::shared_ptr<ModelAPI_Document>& thePart,
58 const ModelHighAPI_Selection& theBase);
60 #endif // FeaturesAPI_RemoveSubShapes_H_