1 // File: PartSetPlugin_Part.h
2 // Created: 27 Mar 2014
3 // Author: Mikhail PONIKAROV
5 #ifndef PartSetPlugin_Part_HeaderFile
6 #define PartSetPlugin_Part_HeaderFile
8 #include "PartSetPlugin.h"
9 #include <ModelAPI_Feature.h>
11 /// part reference attribute
12 const std::string PART_ATTR_DOC_REF = "PartDocument";
14 /**\class PartSetPlugin_Part
16 * \brief Feature for creation of the new part in PartSet.
18 class PartSetPlugin_Part: public ModelAPI_Feature
21 /// Returns the kind of a feature
22 PARTSETPLUGIN_EXPORT virtual const std::string& getKind()
23 {static std::string MY_KIND = "Part"; return MY_KIND;}
25 /// Returns to which group in the document must be added feature
26 PARTSETPLUGIN_EXPORT virtual const std::string& getGroup()
27 {static std::string MY_GROUP = "Parts"; return MY_GROUP;}
29 /// Creates a new part document if needed
30 PARTSETPLUGIN_EXPORT virtual void execute();
32 /// Request for initialization of data model of the feature: adding all attributes
33 PARTSETPLUGIN_EXPORT virtual void initAttributes();
35 PARTSETPLUGIN_EXPORT virtual std::shared_ptr<ModelAPI_Document> documentToAdd();
37 /// Use plugin manager for features creation