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