Salome HOME
16e70ee663d4647cb51646501b15dacebe8fbd93
[modules/shaper.git] / src / ModelAPI / ModelAPI_AttributeInteger.h
1 // File:        ModelAPI_AttributeInteger.h
2 // Created:     2 Apr 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef MODELAPI_ATTRIBUTEINTEGER_H_
6 #define MODELAPI_ATTRIBUTEINTEGER_H_
7
8 #include <ModelAPI.h>
9 #include <ModelAPI_Attribute.h>
10
11 #include <string>
12
13
14 /**\class ModelAPI_AttributeInteger
15  * \ingroup DataModel
16  * \brief API for the attribute that contains integer (int).
17  */
18
19 class ModelAPI_AttributeInteger : public ModelAPI_Attribute
20 {
21  public:
22   /// Defines the integer value
23   MODELAPI_EXPORT virtual void setValue(const int theValue) = 0;
24
25   /// Returns the inhteger value
26   MODELAPI_EXPORT virtual int value() = 0;
27
28   /// Returns the type of this class of attributes
29   MODELAPI_EXPORT static std::string type()
30   {
31     return "Integer";
32   }
33
34   /// Returns the type of this class of attributes, not static method
35   MODELAPI_EXPORT virtual std::string attributeType()
36   {
37     return type();
38   }
39
40   /// To virtually destroy the fields of successors
41   MODELAPI_EXPORT virtual ~ModelAPI_AttributeInteger()
42   {
43   }
44
45  protected:
46   /// Objects are created for features automatically
47   MODELAPI_EXPORT ModelAPI_AttributeInteger()
48   {
49   }
50 };
51
52 //! Pointer on double attribute
53 typedef std::shared_ptr<ModelAPI_AttributeInteger> AttributeIntegerPtr;
54
55 #endif