]> SALOME platform Git repositories - modules/shaper.git/blob - src/FeaturesPlugin/FeaturesPlugin_Boolean.h
Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Boolean.h
1 // File:        FeaturesPlugin_Boolean.h
2 // Created:     02 Sept 2014
3 // Author:      Vitaly SMETANNIKOV
4
5 #ifndef FeaturesPlugin_Cut_H_
6 #define FeaturesPlugin_Cut_H_
7
8 #include "FeaturesPlugin.h"
9 #include <ModelAPI_Feature.h>
10 #include <GeomAPI_Shape.h>
11
12 class FeaturesPlugin_Boolean : public ModelAPI_Feature
13 {
14  public:
15   /// Extrusion kind
16   inline static const std::string& ID()
17   {
18     static const std::string MY_CUT_ID("Boolean");
19     return MY_CUT_ID;
20   }
21   /// attribute name of referenced object
22   inline static const std::string& OBJECT_ID()
23   {
24     static const std::string MY_OBJECT_ID("main_object");
25     return MY_OBJECT_ID;
26   }
27   /// attribute name of tool object
28   inline static const std::string& TOOL_ID()
29   {
30     static const std::string MY_TOOL_ID("tool_object");
31     return MY_TOOL_ID;
32   }
33   /// attribute name of operation type
34   inline static const std::string& TYPE_ID()
35   {
36     static const std::string MY_TOOL_ID("bool_type");
37     return MY_TOOL_ID;
38   }
39
40
41
42   /// Returns the kind of a feature
43   FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
44   {
45     static std::string MY_KIND = FeaturesPlugin_Boolean::ID();
46     return MY_KIND;
47   }
48
49   /// Creates a new part document if needed
50   FEATURESPLUGIN_EXPORT virtual void execute();
51
52   /// Request for initialization of data model of the feature: adding all attributes
53   FEATURESPLUGIN_EXPORT virtual void initAttributes();
54
55   /// Use plugin manager for features creation
56   FeaturesPlugin_Boolean();
57
58 private:
59   boost::shared_ptr<GeomAPI_Shape> getShape(const std::string& theAttrName);
60
61 };
62
63 #endif