Salome HOME
Fix compilation on Windows
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Double.h
1 // Name   : ModelHighAPI_Double.h
2 // Purpose: 
3 //
4 // History:
5 // 29/03/16 - Sergey POKHODENKO - Creation of the file
6
7 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_DOUBLE_H_
8 #define SRC_MODELHIGHAPI_MODELHIGHAPI_DOUBLE_H_
9
10 //--------------------------------------------------------------------------------------
11 #include "ModelHighAPI.h"
12
13 #include <memory>
14 #include <string>
15
16 #include <boost/variant.hpp>
17 //--------------------------------------------------------------------------------------
18 class ModelAPI_AttributeDouble;
19 //--------------------------------------------------------------------------------------
20 /**\class ModelHighAPI_Double
21  * \ingroup CPPHighAPI
22  * \brief Class for filling ModelAPI_AttributeDouble
23  */
24 class ModelHighAPI_Double
25 {
26 public:
27   /// Constructor for double
28   MODELHIGHAPI_EXPORT ModelHighAPI_Double(double theValue = 0.);
29   /// Constructor for std::string
30   MODELHIGHAPI_EXPORT ModelHighAPI_Double(const std::string & theValue);
31   /// Constructor for char *
32   MODELHIGHAPI_EXPORT ModelHighAPI_Double(const char * theValue);
33   /// Destructor
34   MODELHIGHAPI_EXPORT virtual ~ModelHighAPI_Double();
35
36   /// Fill attribute values
37   MODELHIGHAPI_EXPORT virtual void fillAttribute(std::shared_ptr<ModelAPI_AttributeDouble> & theAttribute) const;
38
39 private:
40   boost::variant<double, std::string> myValue;
41 };
42
43 //--------------------------------------------------------------------------------------
44 //--------------------------------------------------------------------------------------
45 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_DOUBLE_H_ */