1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: BuildAPI_SubShapes.h
4 // Created: 09 June 2016
5 // Author: Dmitry Bobylev
7 #ifndef BuildAPI_SubShapes_H_
8 #define BuildAPI_SubShapes_H_
12 #include <BuildPlugin_SubShapes.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Selection;
19 /// \class BuildAPI_SubShapes
20 /// \ingroup CPPHighAPI
21 /// \brief Interface for SubShapes feature.
22 class BuildAPI_SubShapes: public ModelHighAPI_Interface
25 /// Constructor without values.
27 explicit BuildAPI_SubShapes(const std::shared_ptr<ModelAPI_Feature>& theFeature);
29 /// Constructor with values.
31 explicit BuildAPI_SubShapes(const std::shared_ptr<ModelAPI_Feature>& theFeature,
32 const ModelHighAPI_Selection& theBaseShape,
33 const std::list<ModelHighAPI_Selection>& theSubShapes);
37 virtual ~BuildAPI_SubShapes();
39 INTERFACE_2(BuildPlugin_SubShapes::ID(),
40 baseShape, BuildPlugin_SubShapes::BASE_SHAPE_ID(), ModelAPI_AttributeSelection, /** Base shape */,
41 subShapes, BuildPlugin_SubShapes::SUBSHAPES_ID(), ModelAPI_AttributeSelectionList, /** Sub-shapes */)
43 /// Modify base attribute of the feature.
45 void setBaseShape(const ModelHighAPI_Selection& theBaseShape);
47 /// Modify sub-shapes attribute of the feature.
49 void setSubShapes(const std::list<ModelHighAPI_Selection>& theSubShapes);
52 /// Pointer on SubShapes object.
53 typedef std::shared_ptr<BuildAPI_SubShapes> SubShapesPtr;
55 /// \ingroup CPPHighAPI
56 /// \brief Create SubShapes feature.
58 SubShapesPtr addSubShapes(const std::shared_ptr<ModelAPI_Document>& thePart,
59 const ModelHighAPI_Selection& theBaseShape,
60 const std::list<ModelHighAPI_Selection>& theSubShapes);
62 #endif // BuildAPI_SubShapes_H_