1 // File: PartSetPlugin_Duplicate.h
2 // Created: 20 May 2014
3 // Author: Mikhail PONIKAROV
5 #ifndef PartSetPlugin_Duplicate_H_
6 #define PartSetPlugin_Duplicate_H_
8 #include "PartSetPlugin_Part.h"
10 /**\class PartSetPlugin_Duplicate
12 * \brief Duplicates the active part (not root). Creates a new "part" feature.
14 class PartSetPlugin_Duplicate : public PartSetPlugin_Part
18 inline static const std::string& ID()
20 static const std::string MY_DUPLICATE_KIND("Duplicate");
21 return MY_DUPLICATE_KIND;
23 /// Returns the kind of a feature
24 PARTSETPLUGIN_EXPORT virtual const std::string& getKind()
26 static std::string MY_KIND = PartSetPlugin_Duplicate::ID();
30 /// the reference to copy: reference to the attribute
31 inline static const std::string& ORIGIN_REF()
33 static const std::string MY_DUPLICATE_ID("Origin");
34 return MY_DUPLICATE_ID;
36 /// Makes a new part, copy of active
37 PartSetPlugin_Duplicate();
39 /// Request for initialization of data model of the feature: adding all attributes
40 PARTSETPLUGIN_EXPORT virtual void initAttributes();
42 /// doesn't call creation of new document, just does nothing if document was not copied
43 PARTSETPLUGIN_EXPORT virtual void execute();