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