Salome HOME
f3e92af1840391f9ac98134791929f883573c344
[modules/shaper.git] / src / ParametersAPI / ParametersAPI_Parameter.h
1 // Name   : ParametersAPI_Parameter.h
2 // Purpose: 
3 //
4 // History:
5 // 16/06/16 - Sergey POKHODENKO - Creation of the file
6
7 #ifndef SRC_PARAMETERSAPI_PARAMETERSAPI_PARAMETER_H_
8 #define SRC_PARAMETERSAPI_PARAMETERSAPI_PARAMETER_H_
9
10 //--------------------------------------------------------------------------------------
11 #include "ParametersAPI.h"
12
13 #include <ParametersPlugin_Parameter.h>
14
15 #include <ModelHighAPI_Interface.h>
16 #include <ModelHighAPI_Macro.h>
17 //--------------------------------------------------------------------------------------
18 class ModelHighAPI_Double;
19 //--------------------------------------------------------------------------------------
20 /**\class ParametersAPI_Parameter
21  * \ingroup CPPHighAPI
22  * \brief Interface for Parameter feature
23  */
24 class ParametersAPI_Parameter : public ModelHighAPI_Interface
25 {
26 public:
27   /// Constructor without values
28   PARAMETERSAPI_EXPORT
29   explicit ParametersAPI_Parameter(const std::shared_ptr<ModelAPI_Feature> & theFeature);
30   /// Constructor with values
31   PARAMETERSAPI_EXPORT
32   explicit ParametersAPI_Parameter(const  std::shared_ptr<ModelAPI_Feature> & theFeature,
33                                    const std::string & theName,
34                                    const std::string & theExpression,
35                                    const std::string & theComment = std::string());
36   /// Destructor
37   PARAMETERSAPI_EXPORT
38   virtual ~ParametersAPI_Parameter();
39
40   INTERFACE_3(ParametersPlugin_Parameter::ID(),
41               name, ParametersPlugin_Parameter::VARIABLE_ID(), ModelAPI_AttributeString, /** Name */,
42               expression, ParametersPlugin_Parameter::EXPRESSION_ID(), ModelAPI_AttributeString, /** Expression */,
43               comment, ParametersPlugin_Parameter::COMMENT_ID(), ModelAPI_AttributeString, /** Comment */
44   )
45
46 };
47
48 //! Pointer on Parameter object
49 typedef std::shared_ptr<ParametersAPI_Parameter> ParameterPtr;
50
51 /**\ingroup CPPHighAPI
52  * \brief Create Parameter feature
53  */
54 PARAMETERSAPI_EXPORT
55 ParameterPtr addParameter(const std::shared_ptr<ModelAPI_Document> & thePart,
56                           const std::string & theName,
57                           const std::string & theExpression,
58                           const std::string & theComment = std::string());
59
60 //--------------------------------------------------------------------------------------
61 //--------------------------------------------------------------------------------------
62 #endif /* SRC_PARAMETERSAPI_PARAMETERSAPI_PARAMETER_H_ */