Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / GeomDataAPI / GeomDataAPI_Point2D.h
1 // File:        GeomDataAPI_Point2D.h
2 // Created:     24 Apr 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef GeomDataAPI_Point2D_HeaderFile
6 #define GeomDataAPI_Point2D_HeaderFile
7
8 #include "GeomDataAPI.h"
9 #include <ModelAPI_Attribute.h>
10
11 /**\class GeomDataAPI_Point2D
12  * \ingroup DataModel
13  * \brief Attribute that contains 2D point coordinates.
14  */
15
16 class GeomDataAPI_Point2D : public ModelAPI_Attribute
17 {
18 public:
19   /// Defines the double value
20   virtual void setValue(const double theX, const double theY) = 0;
21
22   /// Returns the X double value
23   virtual double x() const = 0;
24   /// Returns the Y double value
25   virtual double y() const = 0;
26
27   /// Returns the type of this class of attributes
28   static inline std::string type() {return std::string("Point2D");}
29
30   /// Returns the type of this class of attributes, not static method
31   virtual std::string attributeType() {return type();}
32
33 protected:
34   /// Objects are created for features automatically
35   GeomDataAPI_Point2D()
36   {}
37 };
38
39 #endif