1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: BuildPlugin_SubShapes.h
4 // Created: 14 April 2016
5 // Author: Dmitry Bobylev
7 #ifndef BuildPlugin_SubShapes_H_
8 #define BuildPlugin_SubShapes_H_
10 #include "BuildPlugin.h"
12 #include <ModelAPI_Feature.h>
14 /// \class BuildPlugin_SubShapes
16 /// \brief Feature for adding or removing sub-shapes from shape.
17 class BuildPlugin_SubShapes: public ModelAPI_Feature
20 /// Use plugin manager for features creation
21 BuildPlugin_SubShapes();
24 inline static const std::string& ID()
26 static const std::string MY_ID("SubShapes");
30 /// Attribute name of base shape.
31 inline static const std::string& BASE_SHAPE_ID()
33 static const std::string MY_BASE_SHAPE_ID("base_shape");
34 return MY_BASE_SHAPE_ID;
37 /// Attribute name of sub-shapes.
38 inline static const std::string& SUBSHAPES_ID()
40 static const std::string MY_SUBSHAPES_ID("subshapes");
41 return MY_SUBSHAPES_ID;
44 /// \return the kind of a feature.
45 BUILDPLUGIN_EXPORT virtual const std::string& getKind()
47 static std::string MY_KIND = BuildPlugin_SubShapes::ID();
51 /// Request for initialization of data model of the feature: adding all attributes.
52 BUILDPLUGIN_EXPORT virtual void initAttributes();
54 /// Called on change of any argument-attribute of this object.
55 /// \param[in] theID identifier of changed attribute.
56 BUILDPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
58 /// Creates a new part document if needed.
59 BUILDPLUGIN_EXPORT virtual void execute();