Salome HOME
Allow dumper to set empty user-defined name for features
[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 class ModelAPI_AttributeInteger;
17 //--------------------------------------------------------------------------------------
18 /**\class ModelHighAPI_Integer
19  * \ingroup CPPHighAPI
20  * \brief Class for filling ModelAPI_AttributeInteger
21  */
22 class ModelHighAPI_Integer
23 {
24 public:
25   /// Constructor for int
26   MODELHIGHAPI_EXPORT
27   ModelHighAPI_Integer(int theValue = 0.);
28   /// Constructor for std::string
29   MODELHIGHAPI_EXPORT
30   ModelHighAPI_Integer(const std::string & theValue);
31   /// Constructor for char *
32   MODELHIGHAPI_EXPORT
33   ModelHighAPI_Integer(const char * theValue);
34   /// Destructor
35   MODELHIGHAPI_EXPORT
36   virtual ~ModelHighAPI_Integer();
37
38   /// Fill attribute values
39   MODELHIGHAPI_EXPORT
40   virtual void fillAttribute(const std::shared_ptr<ModelAPI_AttributeInteger> & theAttribute) const;
41
42 private:
43   enum VariantType { VT_INT, VT_STRING } myVariantType;
44   int myInt;
45   std::string myString;
46 };
47
48 //--------------------------------------------------------------------------------------
49 //--------------------------------------------------------------------------------------
50 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_INTEGER_H_ */