Salome HOME
Issue #1834: Fix length of lines
[modules/shaper.git] / src / BuildAPI / BuildAPI_SubShapes.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        BuildAPI_SubShapes.h
4 // Created:     09 June 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef BuildAPI_SubShapes_H_
8 #define BuildAPI_SubShapes_H_
9
10 #include "BuildAPI.h"
11
12 #include <BuildPlugin_SubShapes.h>
13
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
16
17 class ModelHighAPI_Selection;
18
19 /// \class BuildAPI_SubShapes
20 /// \ingroup CPPHighAPI
21 /// \brief Interface for SubShapes feature.
22 class BuildAPI_SubShapes: public ModelHighAPI_Interface
23 {
24 public:
25   /// Constructor without values.
26   BUILDAPI_EXPORT
27   explicit BuildAPI_SubShapes(const std::shared_ptr<ModelAPI_Feature>& theFeature);
28
29   /// Constructor with values.
30   BUILDAPI_EXPORT
31   explicit BuildAPI_SubShapes(const std::shared_ptr<ModelAPI_Feature>& theFeature,
32                               const ModelHighAPI_Selection& theBaseShape,
33                               const std::list<ModelHighAPI_Selection>& theSubShapes);
34
35   /// Destructor.
36   BUILDAPI_EXPORT
37   virtual ~BuildAPI_SubShapes();
38
39   INTERFACE_2(BuildPlugin_SubShapes::ID(),
40               baseShape, BuildPlugin_SubShapes::BASE_SHAPE_ID(),
41               ModelAPI_AttributeSelection, /** Base shape */,
42               subShapes, BuildPlugin_SubShapes::SUBSHAPES_ID(),
43               ModelAPI_AttributeSelectionList, /** Sub-shapes */)
44
45   /// Modify base attribute of the feature.
46   BUILDAPI_EXPORT
47   void setBaseShape(const ModelHighAPI_Selection& theBaseShape);
48
49   /// Modify sub-shapes attribute of the feature.
50   BUILDAPI_EXPORT
51   void setSubShapes(const std::list<ModelHighAPI_Selection>& theSubShapes);
52
53   /// Dump wrapped feature
54   BUILDAPI_EXPORT
55   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
56 };
57
58 /// Pointer on SubShapes object.
59 typedef std::shared_ptr<BuildAPI_SubShapes> SubShapesPtr;
60
61 /// \ingroup CPPHighAPI
62 /// \brief Create SubShapes feature.
63 BUILDAPI_EXPORT
64 SubShapesPtr addSubShapes(const std::shared_ptr<ModelAPI_Document>& thePart,
65                           const ModelHighAPI_Selection& theBaseShape,
66                           const std::list<ModelHighAPI_Selection>& theSubShapes);
67
68 #endif // BuildAPI_SubShapes_H_