Salome HOME
Merge remote-tracking branch 'remotes/origin/HighLevelDump'
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_Union.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_Union.h
4 // Created:     09 June 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef FeaturesAPI_Union_H_
8 #define FeaturesAPI_Union_H_
9
10 #include "FeaturesAPI.h"
11
12 #include <FeaturesPlugin_Union.h>
13
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
16
17 class ModelHighAPI_Dumper;
18 class ModelHighAPI_Selection;
19
20 /// \class FeaturesAPI_Union
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for Union feature.
23 class FeaturesAPI_Union: public ModelHighAPI_Interface
24 {
25 public:
26   /// Constructor without values.
27   FEATURESAPI_EXPORT
28   explicit FeaturesAPI_Union(const std::shared_ptr<ModelAPI_Feature>& theFeature);
29
30   /// Constructor with values.
31   FEATURESAPI_EXPORT
32   explicit FeaturesAPI_Union(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33                              const std::list<ModelHighAPI_Selection>& theBaseObjects);
34
35   /// Destructor.
36   FEATURESAPI_EXPORT
37   virtual ~FeaturesAPI_Union();
38
39   INTERFACE_1(FeaturesPlugin_Union::ID(),
40               baseObjects, FeaturesPlugin_Union::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */)
41
42   /// Modify base attribute of the feature.
43   FEATURESAPI_EXPORT
44   void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
45
46   /// Dump wrapped feature
47   FEATURESAPI_EXPORT
48   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
49 };
50
51 /// Pointer on Union object.
52 typedef std::shared_ptr<FeaturesAPI_Union> UnionPtr;
53
54 /// \ingroup CPPHighAPI
55 /// \brief Create Union feature.
56 FEATURESAPI_EXPORT
57 UnionPtr addUnion(const std::shared_ptr<ModelAPI_Document>& thePart,
58                   const std::list<ModelHighAPI_Selection>& theBaseObjects);
59
60 #endif // FeaturesAPI_Union_H_