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_Dumper;
18 class ModelHighAPI_Selection;
20 /// \class FeaturesAPI_RemoveSubShapes
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for RemoveSubShapes feature.
23 class FeaturesAPI_RemoveSubShapes: public ModelHighAPI_Interface
26 /// Constructor without values.
28 explicit FeaturesAPI_RemoveSubShapes(const std::shared_ptr<ModelAPI_Feature>& theFeature);
30 /// Constructor with values.
32 explicit FeaturesAPI_RemoveSubShapes(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33 const ModelHighAPI_Selection& theBase);
37 virtual ~FeaturesAPI_RemoveSubShapes();
39 INTERFACE_2(FeaturesPlugin_RemoveSubShapes::ID(),
40 base, FeaturesPlugin_RemoveSubShapes::BASE_SHAPE_ID(), ModelAPI_AttributeSelection, /** Base */,
41 subshapes, FeaturesPlugin_RemoveSubShapes::SUBSHAPES_ID(), ModelAPI_AttributeSelectionList, /** Subshapes */)
43 /// Modify objects attribute of the feature.
45 void setBase(const ModelHighAPI_Selection& theBase);
47 /// Modify tools attribute of the feature.
49 void setSubShapesToKeep(const std::list<ModelHighAPI_Selection>& theSubShapes);
51 /// Dump wrapped feature
53 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
56 /// Pointer on RemoveSubShapes object.
57 typedef std::shared_ptr<FeaturesAPI_RemoveSubShapes> RemoveSubShapesPtr;
59 /// \ingroup CPPHighAPI
60 /// \brief Create RemoveSubShapes feature.
62 RemoveSubShapesPtr addRemoveSubShapes(const std::shared_ptr<ModelAPI_Document>& thePart,
63 const ModelHighAPI_Selection& theBase);
65 #endif // FeaturesAPI_RemoveSubShapes_H_