1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2 // Name : ParametersAPI_Parameter.h
6 // 16/06/16 - Sergey POKHODENKO - Creation of the file
8 #ifndef SRC_PARAMETERSAPI_PARAMETERSAPI_PARAMETER_H_
9 #define SRC_PARAMETERSAPI_PARAMETERSAPI_PARAMETER_H_
11 //--------------------------------------------------------------------------------------
12 #include "ParametersAPI.h"
14 #include <ParametersPlugin_Parameter.h>
16 #include <ModelHighAPI_Interface.h>
17 #include <ModelHighAPI_Macro.h>
18 //--------------------------------------------------------------------------------------
19 class ModelHighAPI_Double;
20 //--------------------------------------------------------------------------------------
21 /**\class ParametersAPI_Parameter
23 * \brief Interface for Parameter feature
25 class ParametersAPI_Parameter : public ModelHighAPI_Interface
28 /// Constructor without values
30 explicit ParametersAPI_Parameter(const std::shared_ptr<ModelAPI_Feature> & theFeature);
31 /// Constructor with values
33 explicit ParametersAPI_Parameter(const std::shared_ptr<ModelAPI_Feature> & theFeature,
34 const std::string & theName,
35 const std::string & theExpression,
36 const std::string & theComment = std::string());
39 virtual ~ParametersAPI_Parameter();
41 INTERFACE_3(ParametersPlugin_Parameter::ID(),
42 name, ParametersPlugin_Parameter::VARIABLE_ID(),
43 ModelAPI_AttributeString, /** Name */,
44 expression, ParametersPlugin_Parameter::EXPRESSION_ID(),
45 ModelAPI_AttributeString, /** Expression */,
46 comment, ParametersPlugin_Parameter::COMMENT_ID(),
47 ModelAPI_AttributeString, /** Comment */
50 /// Dump wrapped feature
52 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
56 //! Pointer on Parameter object
57 typedef std::shared_ptr<ParametersAPI_Parameter> ParameterPtr;
59 /**\ingroup CPPHighAPI
60 * \brief Create Parameter feature
63 ParameterPtr addParameter(const std::shared_ptr<ModelAPI_Document> & thePart,
64 const std::string & theName,
65 const std::string & theExpression,
66 const std::string & theComment = std::string());
68 //--------------------------------------------------------------------------------------
69 //--------------------------------------------------------------------------------------
70 #endif /* SRC_PARAMETERSAPI_PARAMETERSAPI_PARAMETER_H_ */