1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: ParametersPlugin_Parameter.h
4 // Created: 23 MArch 2015
7 #ifndef PARAMETERSPLUGIN_PARAMETER_H_
8 #define PARAMETERSPLUGIN_PARAMETER_H_
10 #include "ParametersPlugin.h"
11 #include <ModelAPI_Feature.h>
13 class ParametersPlugin_PyInterp;
15 class ParametersPlugin_Parameter : public ModelAPI_Feature
18 virtual ~ParametersPlugin_Parameter();
21 inline static const std::string& ID()
23 static const std::string MY_EXTRUSION_ID("Parameter");
24 return MY_EXTRUSION_ID;
26 /// attribute name of references sketch entities list, it should contain a sketch result or
27 /// a pair a sketch result to sketch face
28 inline static const std::string& VARIABLE_ID()
30 static const std::string MY_VARIABLE_ID("variable");
31 return MY_VARIABLE_ID;
34 /// attribute name of extrusion size
35 inline static const std::string& EXPRESSION_ID()
37 static const std::string MY_EXPRESSION_ID("expression");
38 return MY_EXPRESSION_ID;
41 /// Returns the kind of a feature
42 PARAMETERSPLUGIN_EXPORT virtual const std::string& getKind()
44 static std::string MY_KIND = ParametersPlugin_Parameter::ID();
48 /// Creates a new part document if needed
49 PARAMETERSPLUGIN_EXPORT virtual void execute();
51 /// Request for initialization of data model of the feature: adding all attributes
52 PARAMETERSPLUGIN_EXPORT virtual void initAttributes();
54 PARAMETERSPLUGIN_EXPORT virtual bool isInHistory(); //false
56 PARAMETERSPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
58 /// Use plugin manager for features creation
59 ParametersPlugin_Parameter();
62 double evaluate(const std::string& theExpression, std::string& theError);
65 ParametersPlugin_PyInterp* myInterp;