1 // File: PartSetPlugin_Part.h
2 // Created: 27 Mar 2014
3 // Author: Mikhail PONIKAROV
5 #ifndef PartSetPlugin_Part_H_
6 #define PartSetPlugin_Part_H_
8 #include "PartSetPlugin.h"
9 #include <ModelAPI_Feature.h>
11 /**\class PartSetPlugin_Part
13 * \brief Feature for creation of the new part in PartSet.
15 class PartSetPlugin_Part : public ModelAPI_Feature
19 inline static const std::string& ID()
21 static const std::string MY_PART_KIND("Part");
24 /// Returns the kind of a feature
25 PARTSETPLUGIN_EXPORT virtual const std::string& getKind()
27 static std::string MY_KIND = PartSetPlugin_Part::ID();
31 /// Returns to which group in the document must be added feature
32 PARTSETPLUGIN_EXPORT virtual const std::string& getGroup()
34 static std::string MY_GROUP = "Parts";
38 /// Creates a new part document if needed
39 PARTSETPLUGIN_EXPORT virtual void execute();
41 /// Request for initialization of data model of the feature: adding all attributes
42 PARTSETPLUGIN_EXPORT virtual void initAttributes();
44 PARTSETPLUGIN_EXPORT virtual boost::shared_ptr<ModelAPI_Document> documentToAdd();
46 /// Returns true if this feature must be displayed in the history (top level of Part tree)
47 PARTSETPLUGIN_EXPORT virtual bool isInHistory()
52 /// Use plugin manager for features creation