]> SALOME platform Git repositories - modules/shaper.git/blob - src/PartSetPlugin/PartSetPlugin_Duplicate.h
Salome HOME
f327aa7f2ed382c0598aa1e162910ca42a334fa1
[modules/shaper.git] / src / PartSetPlugin / PartSetPlugin_Duplicate.h
1 // File:        PartSetPlugin_Duplicate.h
2 // Created:     20 May 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef PartSetPlugin_Duplicate_H_
6 #define PartSetPlugin_Duplicate_H_
7
8 #include "PartSetPlugin_Part.h"
9
10 /**\class PartSetPlugin_Duplicate
11  * \ingroup DataModel
12  * \brief Duplicates the active part (not root). Creates a new "part" feature.
13  */
14 class PartSetPlugin_Duplicate : public PartSetPlugin_Part
15 {
16  public:
17     /// Duplicate kind
18   inline static const std::string& ID()
19   {
20     static const std::string MY_DUPLICATE_KIND("Duplicate");
21     return MY_DUPLICATE_KIND;
22   }
23
24   /// the reference to copy: reference to the attribute
25   inline static const std::string& ORIGIN_REF()
26   {
27     static const std::string MY_DUPLICATE_ID("Origin");
28     return MY_DUPLICATE_ID;
29   }
30   /// Makes a new part, copy of active
31   PartSetPlugin_Duplicate();
32
33   /// Request for initialization of data model of the feature: adding all attributes
34   PARTSETPLUGIN_EXPORT virtual void initAttributes();
35
36   /// doesn't call creation of new document, just does nothing if document was not copied
37   PARTSETPLUGIN_EXPORT virtual void execute();
38 };
39
40 #endif