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