Salome HOME
Issue #1834: Fix length of lines
[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_Dumper;
18 class ModelHighAPI_Selection;
19
20 /// \class FeaturesAPI_Partition
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for Partition feature.
23 class FeaturesAPI_Partition: public ModelHighAPI_Interface
24 {
25 public:
26   /// Constructor without values.
27   FEATURESAPI_EXPORT
28   explicit FeaturesAPI_Partition(const std::shared_ptr<ModelAPI_Feature>& theFeature);
29
30   /// Constructor with values.
31   FEATURESAPI_EXPORT
32   explicit FeaturesAPI_Partition(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33                                  const std::list<ModelHighAPI_Selection>& theBaseObjects);
34
35   /// Destructor.
36   FEATURESAPI_EXPORT
37   virtual ~FeaturesAPI_Partition();
38
39   INTERFACE_1(FeaturesPlugin_Partition::ID(),
40               baseObjects, FeaturesPlugin_Partition::BASE_OBJECTS_ID(),
41               ModelAPI_AttributeSelectionList, /** Base objects */)
42
43   /// Modify base attribute of the feature.
44   FEATURESAPI_EXPORT
45   void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
46
47   /// Dump wrapped feature
48   FEATURESAPI_EXPORT
49   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
50 };
51
52 /// Pointer on Partition object.
53 typedef std::shared_ptr<FeaturesAPI_Partition> PartitionPtr;
54
55 /// \ingroup CPPHighAPI
56 /// \brief Create Partition feature.
57 FEATURESAPI_EXPORT
58 PartitionPtr addPartition(const std::shared_ptr<ModelAPI_Document>& thePart,
59                           const std::list<ModelHighAPI_Selection>& theBaseObjects);
60
61 #endif // FeaturesAPI_Partition_H_