Salome HOME
440e43013115365897168255f97c9745e88561ea
[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_Selection;
18
19 /// \class FeaturesAPI_Intersection
20 /// \ingroup CPPHighAPI
21 /// \brief Interface for Intersection feature.
22 class FeaturesAPI_Intersection: public ModelHighAPI_Interface
23 {
24 public:
25   /// Constructor without values.
26   FEATURESAPI_EXPORT
27   explicit FeaturesAPI_Intersection(const std::shared_ptr<ModelAPI_Feature>& theFeature);
28
29   /// Constructor with values.
30   FEATURESAPI_EXPORT
31   explicit FeaturesAPI_Intersection(const std::shared_ptr<ModelAPI_Feature>& theFeature,
32                                     const std::list<ModelHighAPI_Selection>& theObjects,
33                                     const std::list<ModelHighAPI_Selection>& theTools);
34
35   /// Destructor.
36   FEATURESAPI_EXPORT
37   virtual ~FeaturesAPI_Intersection();
38
39   INTERFACE_2(FeaturesPlugin_Intersection::ID(),
40               objects, FeaturesPlugin_Intersection::OBJECT_LIST_ID(), ModelAPI_AttributeSelectionList, /** Objects */,
41               tools, FeaturesPlugin_Intersection::TOOL_LIST_ID(), ModelAPI_AttributeSelectionList, /** Tools */)
42
43   /// Modify objects attribute of the feature.
44   FEATURESAPI_EXPORT
45   void setObjects(const std::list<ModelHighAPI_Selection>& theObjects);
46
47   /// Modify tools attribute of the feature.
48   FEATURESAPI_EXPORT
49   void setTools(const std::list<ModelHighAPI_Selection>& theTools);
50 };
51
52 /// Pointer on Intersection object.
53 typedef std::shared_ptr<FeaturesAPI_Intersection> IntersectionPtr;
54
55 /// \ingroup CPPHighAPI
56 /// \brief Create Intersection feature.
57 FEATURESAPI_EXPORT
58 IntersectionPtr addIntersection(const std::shared_ptr<ModelAPI_Document>& thePart,
59                                 const std::list<ModelHighAPI_Selection>& theObjects,
60                                 const std::list<ModelHighAPI_Selection>& theTools);
61
62 #endif // FeaturesAPI_Intersection_H_