Salome HOME
Issue #1860: fix end lines with spaces
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Double.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name   : ModelHighAPI_Double.h
3 // Purpose:
4 //
5 // History:
6 // 29/03/16 - Sergey POKHODENKO - Creation of the file
7
8 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_DOUBLE_H_
9 #define SRC_MODELHIGHAPI_MODELHIGHAPI_DOUBLE_H_
10
11 //--------------------------------------------------------------------------------------
12 #include "ModelHighAPI.h"
13
14 #include <memory>
15 #include <string>
16 //--------------------------------------------------------------------------------------
17 class ModelAPI_AttributeDouble;
18 //--------------------------------------------------------------------------------------
19 /**\class ModelHighAPI_Double
20  * \ingroup CPPHighAPI
21  * \brief Class for filling ModelAPI_AttributeDouble
22  */
23 class ModelHighAPI_Double
24 {
25 public:
26   /// Constructor for double
27   MODELHIGHAPI_EXPORT
28   ModelHighAPI_Double(double theValue = 0.);
29   /// Constructor for std::string
30   MODELHIGHAPI_EXPORT
31   ModelHighAPI_Double(const std::string & theValue);
32   /// Constructor for char *
33   MODELHIGHAPI_EXPORT
34   ModelHighAPI_Double(const char * theValue);
35   /// Destructor
36   MODELHIGHAPI_EXPORT
37   virtual ~ModelHighAPI_Double();
38
39   /// Fill attribute values
40   MODELHIGHAPI_EXPORT
41   virtual void fillAttribute(const std::shared_ptr<ModelAPI_AttributeDouble> & theAttribute) const;
42
43 private:
44   enum VariantType { VT_DOUBLE, VT_STRING } myVariantType;
45   double myDouble;
46   std::string myString;
47 };
48
49 //--------------------------------------------------------------------------------------
50 //--------------------------------------------------------------------------------------
51 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_DOUBLE_H_ */