Salome HOME
Issue #1648: Dump Python in the High Level Parameterized Geometry API
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_Intersection.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_Intersection.h
4 // Created:     09 June 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef FeaturesAPI_Intersection_H_
8 #define FeaturesAPI_Intersection_H_
9
10 #include "FeaturesAPI.h"
11
12 #include <FeaturesPlugin_Intersection.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_Intersection
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for Intersection feature.
23 class FeaturesAPI_Intersection: public ModelHighAPI_Interface
24 {
25 public:
26   /// Constructor without values.
27   FEATURESAPI_EXPORT
28   explicit FeaturesAPI_Intersection(const std::shared_ptr<ModelAPI_Feature>& theFeature);
29
30   /// Constructor with values.
31   FEATURESAPI_EXPORT
32   explicit FeaturesAPI_Intersection(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33                                     const std::list<ModelHighAPI_Selection>& theObjects,
34                                     const std::list<ModelHighAPI_Selection>& theTools);
35
36   /// Destructor.
37   FEATURESAPI_EXPORT
38   virtual ~FeaturesAPI_Intersection();
39
40   INTERFACE_2(FeaturesPlugin_Intersection::ID(),
41               objects, FeaturesPlugin_Intersection::OBJECT_LIST_ID(), ModelAPI_AttributeSelectionList, /** Objects */,
42               tools, FeaturesPlugin_Intersection::TOOL_LIST_ID(), ModelAPI_AttributeSelectionList, /** Tools */)
43
44   /// Modify objects attribute of the feature.
45   FEATURESAPI_EXPORT
46   void setObjects(const std::list<ModelHighAPI_Selection>& theObjects);
47
48   /// Modify tools attribute of the feature.
49   FEATURESAPI_EXPORT
50   void setTools(const std::list<ModelHighAPI_Selection>& theTools);
51
52   /// Dump wrapped feature
53   FEATURESAPI_EXPORT
54   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
55 };
56
57 /// Pointer on Intersection object.
58 typedef std::shared_ptr<FeaturesAPI_Intersection> IntersectionPtr;
59
60 /// \ingroup CPPHighAPI
61 /// \brief Create Intersection feature.
62 FEATURESAPI_EXPORT
63 IntersectionPtr addIntersection(const std::shared_ptr<ModelAPI_Document>& thePart,
64                                 const std::list<ModelHighAPI_Selection>& theObjects,
65                                 const std::list<ModelHighAPI_Selection>& theTools);
66
67 #endif // FeaturesAPI_Intersection_H_