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