Salome HOME
Issue #1860: fix end lines with spaces
[modules/shaper.git] / src / ParametersAPI / ParametersAPI_Parameter.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2 // Name   : ParametersAPI_Parameter.h
3 // Purpose:
4 //
5 // History:
6 // 16/06/16 - Sergey POKHODENKO - Creation of the file
7
8 #ifndef SRC_PARAMETERSAPI_PARAMETERSAPI_PARAMETER_H_
9 #define SRC_PARAMETERSAPI_PARAMETERSAPI_PARAMETER_H_
10
11 //--------------------------------------------------------------------------------------
12 #include "ParametersAPI.h"
13
14 #include <ParametersPlugin_Parameter.h>
15
16 #include <ModelHighAPI_Interface.h>
17 #include <ModelHighAPI_Macro.h>
18 //--------------------------------------------------------------------------------------
19 class ModelHighAPI_Double;
20 //--------------------------------------------------------------------------------------
21 /**\class ParametersAPI_Parameter
22  * \ingroup CPPHighAPI
23  * \brief Interface for Parameter feature
24  */
25 class ParametersAPI_Parameter : public ModelHighAPI_Interface
26 {
27 public:
28   /// Constructor without values
29   PARAMETERSAPI_EXPORT
30   explicit ParametersAPI_Parameter(const std::shared_ptr<ModelAPI_Feature> & theFeature);
31   /// Constructor with values
32   PARAMETERSAPI_EXPORT
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());
37   /// Destructor
38   PARAMETERSAPI_EXPORT
39   virtual ~ParametersAPI_Parameter();
40
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 */
48   )
49
50   /// Dump wrapped feature
51   PARAMETERSAPI_EXPORT
52   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
53
54 };
55
56 //! Pointer on Parameter object
57 typedef std::shared_ptr<ParametersAPI_Parameter> ParameterPtr;
58
59 /**\ingroup CPPHighAPI
60  * \brief Create Parameter feature
61  */
62 PARAMETERSAPI_EXPORT
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());
67
68 //--------------------------------------------------------------------------------------
69 //--------------------------------------------------------------------------------------
70 #endif /* SRC_PARAMETERSAPI_PARAMETERSAPI_PARAMETER_H_ */