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