Salome HOME
Adjust unit tests to new behavior of SketchBuilder
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Union.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesPlugin_Union.h
4 // Created:     17 June 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef FeaturesPlugin_Union_H_
8 #define FeaturesPlugin_Union_H_
9
10 #include "FeaturesPlugin.h"
11 #include <ModelAPI_Feature.h>
12
13 #include <GeomAPI_Shape.h>
14
15 class GeomAlgoAPI_MakeShape;
16
17 /// \class FeaturesPlugin_Union
18 /// \ingroup Plugins
19 /// \brief Feature for applying of Union operations on Shapes. Union removes shared shapes from
20 ///        several shapes and combines them into one.
21 class FeaturesPlugin_Union : public ModelAPI_Feature
22 {
23 public:
24   /// Feature kind.
25   inline static const std::string& ID()
26   {
27     static const std::string MY_ID("Union");
28     return MY_ID;
29   }
30
31   /// Attribute name of base objects.
32   inline static const std::string& BASE_OBJECTS_ID()
33   {
34     static const std::string MY_BASE_OBJECTS_ID("base_objects");
35     return MY_BASE_OBJECTS_ID;
36   }
37
38   /// \return the kind of a feature.
39   FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
40   {
41     static std::string MY_KIND = FeaturesPlugin_Union::ID();
42     return MY_KIND;
43   }
44
45   /// Creates a new part document if needed
46   FEATURESPLUGIN_EXPORT virtual void execute();
47
48   /// Request for initialization of data model of the feature: adding all attributes
49   FEATURESPLUGIN_EXPORT virtual void initAttributes();
50
51   /// Use plugin manager for features creation
52   FeaturesPlugin_Union();
53 };
54
55 #endif