20 #ifndef SRC_PARAMETERSAPI_PARAMETERSAPI_PARAMETER_H_
21 #define SRC_PARAMETERSAPI_PARAMETERSAPI_PARAMETER_H_
24 #include "ParametersAPI.h"
26 #include <ParametersPlugin_Parameter.h>
28 #include <ModelHighAPI_Interface.h>
29 #include <ModelHighAPI_Macro.h>
46 const std::string & theName,
47 const std::string & theExpression,
48 const std::wstring & theComment = std::wstring());
63 PARAMETERSAPI_EXPORT
void setValue(const
double theValue);
65 PARAMETERSAPI_EXPORT
double value();
81 const std::
string & theName,
82 const std::
string & theExpression,
83 const std::wstring & theComment = std::wstring());
90 const ParameterPtr & theParameter);
API for the attribute that contains std (null terminated) string.
Definition: ModelAPI_AttributeString.h:33
Document for internal data structure of any object storage.
Definition: ModelAPI_Document.h:52
Class for filling ModelAPI_AttributeDouble.
Definition: ModelHighAPI_Double.h:37
Dump engine for the model.
Definition: ModelHighAPI_Dumper.h:81
Base class for feature interfaces.
Definition: ModelHighAPI_Interface.h:42
Interface for Parameter feature.
Definition: ParametersAPI_Parameter.h:38
virtual ~ParametersAPI_Parameter()
Destructor.
Definition: ParametersAPI_Parameter.cpp:67
virtual std::shared_ptr< ModelAPI_AttributeString > name() const
Name.
Definition: ParametersAPI_Parameter.h:60
ParametersAPI_Parameter(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: ParametersAPI_Parameter.cpp:27
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: ParametersAPI_Parameter.cpp:71
void setValue(const double theValue)
Just sets the numeric value to the parameter (it resets the previous expression)
Definition: ParametersAPI_Parameter.cpp:51
double value()
Returns the current value of the parameter: the expression result.
Definition: ParametersAPI_Parameter.cpp:60
virtual std::shared_ptr< ModelAPI_AttributeString > comment() const
Comment.
Definition: ParametersAPI_Parameter.h:60
virtual std::shared_ptr< ModelAPI_AttributeString > expression() const
Expression.
Definition: ParametersAPI_Parameter.h:60
static const std::string & ID()
Feature kind.
Definition: ParametersPlugin_Parameter.h:39
static const std::string & COMMENT_ID()
return comment attribute Id
Definition: ParametersPlugin_Parameter.h:70
static const std::string & EXPRESSION_ID()
attribute of parameter expression
Definition: ParametersPlugin_Parameter.h:51
static const std::string & VARIABLE_ID()
attribute of parameter name
Definition: ParametersPlugin_Parameter.h:45
ParameterPtr addParameter(const std::shared_ptr< ModelAPI_Document > &thePart, const std::string &theName, const std::string &theExpression, const std::wstring &theComment=std::wstring())
Create Parameter feature.
Definition: ParametersAPI_Parameter.cpp:87
void removeParameter(const std::shared_ptr< ModelAPI_Document > &thePart, const ParameterPtr &theParameter)
Remove Parameter feature and substitute it by the value in referred features.
Definition: ParametersAPI_Parameter.cpp:105