Salome HOME
refs #80 - Sketch base GUI: create/draw point, circle and arc
[modules/shaper.git] / src / ModelAPI / ModelAPI_AttributeDouble.h
1 // File:        ModelAPI_AttributeDouble.h
2 // Created:     2 Apr 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef ModelAPI_AttributeDouble_HeaderFile
6 #define ModelAPI_AttributeDouble_HeaderFile
7
8 #include "ModelAPI_Attribute.h"
9
10 /**\class ModelAPI_AttributeDouble
11  * \ingroup DataModel
12  * \brief Attribute that contains real value with double precision.
13  */
14
15 class ModelAPI_AttributeDouble : public ModelAPI_Attribute
16 {
17 public:
18   /// Defines the double value
19   MODELAPI_EXPORT virtual void setValue(const double theValue) = 0;
20
21   /// Returns the double value
22   MODELAPI_EXPORT virtual double value() = 0;
23
24   /// Returns the type of this class of attributes
25   MODELAPI_EXPORT static std::string type() {return "Double";}
26
27   /// Returns the type of this class of attributes, not static method
28   MODELAPI_EXPORT virtual std::string attributeType() {return type();}
29
30   /// To virtually destroy the fields of successors
31   MODELAPI_EXPORT virtual ~ModelAPI_AttributeDouble() {}
32
33 protected:
34   /// Objects are created for features automatically
35   MODELAPI_EXPORT ModelAPI_AttributeDouble()
36   {}
37 };
38
39 //! Pointer on double attribute
40 typedef boost::shared_ptr<ModelAPI_AttributeDouble> AttributeDoublePtr;
41
42 #endif