Salome HOME
Merge branch 'BR_internationalization'
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_RemoveSubShapes.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        FeaturesPlugin_RemoveSubShapes.h
4 // Created:     23 May 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef FeaturesPlugin_RemoveSubShapes_H_
8 #define FeaturesPlugin_RemoveSubShapes_H_
9
10 #include "FeaturesPlugin.h"
11
12 #include <ModelAPI_Feature.h>
13
14 /// \class FeaturesPlugin_RemoveSubShapes
15 /// \ingroup Plugins
16 /// \brief Feature for removing sub-shapes from collections(wire, shell, compsolid, compound).
17 class FeaturesPlugin_RemoveSubShapes: public ModelAPI_Feature
18 {
19 public:
20   /// Use plugin manager for features creation
21   FeaturesPlugin_RemoveSubShapes();
22
23   /// Feature kind.
24   inline static const std::string& ID()
25   {
26     static const std::string MY_ID("Remove_SubShapes");
27     return MY_ID;
28   }
29
30   /// Attribute name of base shape.
31   inline static const std::string& BASE_SHAPE_ID()
32   {
33     static const std::string MY_BASE_SHAPE_ID("base_shape");
34     return MY_BASE_SHAPE_ID;
35   }
36
37   /// Attribute name of sub-shapes.
38   inline static const std::string& SUBSHAPES_ID()
39   {
40     static const std::string MY_SUBSHAPES_ID("subshapes");
41     return MY_SUBSHAPES_ID;
42   }
43
44   /// \return the kind of a feature.
45   FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
46   {
47     static std::string MY_KIND = FeaturesPlugin_RemoveSubShapes::ID();
48     return MY_KIND;
49   }
50
51   /// Request for initialization of data model of the feature: adding all attributes.
52   FEATURESPLUGIN_EXPORT virtual void initAttributes();
53
54   /// Called on change of any argument-attribute of this object.
55   /// \param[in] theID identifier of changed attribute.
56   FEATURESPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
57
58   /// Creates a new part document if needed.
59   FEATURESPLUGIN_EXPORT virtual void execute();
60 };
61
62 #endif