1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: PartSetPlugin_Duplicate.h
4 // Created: 20 May 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef PartSetPlugin_Duplicate_H_
8 #define PartSetPlugin_Duplicate_H_
10 #include "PartSetPlugin.h"
11 #include <ModelAPI_Feature.h>
13 /**\class PartSetPlugin_Duplicate
15 * \brief Duplicates the active part (not root). Creates a new "part" feature.
17 class PartSetPlugin_Duplicate : public ModelAPI_Feature
22 inline static const std::string& ID()
24 static const std::string MY_REMOVE_KIND("Duplicate");
25 return MY_REMOVE_KIND;
27 /// Returns the kind of a feature
28 PARTSETPLUGIN_EXPORT virtual const std::string& getKind()
30 static std::string MY_KIND = PartSetPlugin_Duplicate::ID();
34 /// Returns to which group in the document must be added feature
35 PARTSETPLUGIN_EXPORT virtual const std::string& getGroup()
37 static std::string MY_GROUP = "Parts";
41 /// Request for initialization of data model of the feature: adding all attributes
42 PARTSETPLUGIN_EXPORT virtual void initAttributes()
46 /// Not normal feature that stored in the tree
47 PARTSETPLUGIN_EXPORT virtual bool isAction()
52 /// Performs the "duplicate"
53 PARTSETPLUGIN_EXPORT virtual void execute();
55 /// Use plugin manager for features creation
56 PartSetPlugin_Duplicate()