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(),
41 ModelAPI_AttributeSelection, /** Base */,
42 subshapes, FeaturesPlugin_RemoveSubShapes::SUBSHAPES_ID(),
43 ModelAPI_AttributeSelectionList, /** Subshapes */)
45 /// Modify objects attribute of the feature.
47 void setBase(const ModelHighAPI_Selection& theBase);
49 /// Modify tools attribute of the feature.
51 void setSubShapesToKeep(const std::list<ModelHighAPI_Selection>& theSubShapes);
53 /// Dump wrapped feature
55 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
58 /// Pointer on RemoveSubShapes object.
59 typedef std::shared_ptr<FeaturesAPI_RemoveSubShapes> RemoveSubShapesPtr;
61 /// \ingroup CPPHighAPI
62 /// \brief Create RemoveSubShapes feature.
64 RemoveSubShapesPtr addRemoveSubShapes(const std::shared_ptr<ModelAPI_Document>& thePart,
65 const ModelHighAPI_Selection& theBase);
67 #endif // FeaturesAPI_RemoveSubShapes_H_