]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelHighAPI/ModelHighAPI_Double.h
Salome HOME
Add test for HighModelAPI_Double
[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 <memory>
12 #include <string>
13
14 #include <boost/variant.hpp>
15 //--------------------------------------------------------------------------------------
16 class ModelAPI_AttributeDouble;
17 //--------------------------------------------------------------------------------------
18 /**\class ModelHighAPI_Double
19  * \ingroup CPPHighAPI
20  * \brief Class for filling ModelAPI_AttributeDouble
21  */
22 class ModelHighAPI_Double
23 {
24 public:
25   /// Constructor for double
26   ModelHighAPI_Double(double theValue = 0.);
27   /// Constructor for std::string
28   ModelHighAPI_Double(const std::string & theValue);
29   /// Constructor for char *
30   ModelHighAPI_Double(const char * theValue);
31   /// Destructor
32   virtual ~ModelHighAPI_Double();
33
34   /// Fill attribute values
35   virtual void fillAttribute(std::shared_ptr<ModelAPI_AttributeDouble> & theAttribute) const;
36
37 private:
38   boost::variant<double, std::string> myValue;
39 };
40
41 //--------------------------------------------------------------------------------------
42 //--------------------------------------------------------------------------------------
43 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_DOUBLE_H_ */