1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: PartSetPlugin_Part.h
4 // Created: 27 Mar 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef PartSetPlugin_Part_H_
8 #define PartSetPlugin_Part_H_
10 #include "PartSetPlugin.h"
11 #include <ModelAPI_Feature.h>
13 /**\class PartSetPlugin_Part
15 * \brief Feature for creation of the new part in PartSet.
17 class PartSetPlugin_Part : public ModelAPI_Feature
21 inline static const std::string& ID()
23 static const std::string MY_PART_KIND("Part");
26 /// Returns the kind of a feature
27 PARTSETPLUGIN_EXPORT virtual const std::string& getKind()
29 static std::string MY_KIND = PartSetPlugin_Part::ID();
33 /// Returns to which group in the document must be added feature
34 PARTSETPLUGIN_EXPORT virtual const std::string& getGroup()
36 static std::string MY_GROUP = "Parts";
40 /// Creates a new part document if needed
41 PARTSETPLUGIN_EXPORT virtual void execute();
43 /// Request for initialization of data model of the feature: adding all attributes
44 PARTSETPLUGIN_EXPORT virtual void initAttributes();
46 PARTSETPLUGIN_EXPORT virtual std::shared_ptr<ModelAPI_Document> documentToAdd();
48 /// Returns true if this feature must be displayed in the history (top level of Part tree)
49 PARTSETPLUGIN_EXPORT virtual bool isInHistory()
54 /// Use plugin manager for features creation