Salome HOME
b65fce9b9053aeae6fde879f03744bc59e4b45aa
[modules/shaper.git] / src / PartSetAPI / PartSetAPI_Part.h
1 // Name   : PartSetAPI_Part.h
2 // Purpose: 
3 //
4 // History:
5 // 16/06/16 - Sergey POKHODENKO - Creation of the file
6
7 #ifndef SRC_PARTSETAPI_PARTSETAPI_PART_H_
8 #define SRC_PARTSETAPI_PARTSETAPI_PART_H_
9
10 //--------------------------------------------------------------------------------------
11 #include "PartSetAPI.h"
12
13 #include <PartSetPlugin_Part.h>
14
15 #include <ModelHighAPI_Interface.h>
16 #include <ModelHighAPI_Macro.h>
17 //--------------------------------------------------------------------------------------
18 class ModelAPI_Document;
19 //--------------------------------------------------------------------------------------
20 /**\class PartSetAPI_Part
21  * \ingroup CPPHighAPI
22  * \brief Interface for Part feature
23  */
24 class PartSetAPI_Part : public ModelHighAPI_Interface
25 {
26 public:
27   /// Constructor without values
28   PARTSETAPI_EXPORT
29   explicit PartSetAPI_Part(const std::shared_ptr<ModelAPI_Feature> & theFeature);
30   /// Destructor
31   PARTSETAPI_EXPORT
32   virtual ~PartSetAPI_Part();
33
34   INTERFACE_0(PartSetPlugin_Part::ID())
35
36   /// Return document
37   PARTSETAPI_EXPORT
38   std::shared_ptr<ModelAPI_Document> document() const;
39 };
40
41 //! Pointer on Part object
42 typedef std::shared_ptr<PartSetAPI_Part> PartPtr;
43
44 /**\ingroup CPPHighAPI
45  * \brief Create Part feature
46  */
47 PARTSETAPI_EXPORT
48 PartPtr addPart(const std::shared_ptr<ModelAPI_Document> & thePartSet);
49
50 /**\ingroup CPPHighAPI
51  * \brief Duplicate Part feature
52  */
53 PARTSETAPI_EXPORT
54 PartPtr duplicatePart(const std::shared_ptr<ModelAPI_Document> & thePart);
55
56 /**\ingroup CPPHighAPI
57  * \brief Remove Part feature
58  */
59 PARTSETAPI_EXPORT
60 void removePart(const std::shared_ptr<ModelAPI_Document> & thePart);
61
62 //--------------------------------------------------------------------------------------
63 //--------------------------------------------------------------------------------------
64 #endif /* SRC_PARTSETAPI_PARTSETAPI_PART_H_ */