Salome HOME
Define guards are corrected according to the code style
[modules/shaper.git] / src / GeomDataAPI / GeomDataAPI_Point.h
1 // File:        GeomDataAPI_Point.h
2 // Created:     24 Apr 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef GeomDataAPI_Point_H_
6 #define GeomDataAPI_Point_H_
7
8 #include "GeomDataAPI.h"
9 #include <ModelAPI_Attribute.h>
10
11 class GeomAPI_Pnt;
12
13 /**\class GeomDataAPI_Point
14  * \ingroup DataModel
15  * \brief Attribute that contains 3D point coordinates. 
16  */
17
18 class GeomDataAPI_Point : public ModelAPI_Attribute
19 {
20 public:
21   /// Defines the double value
22   virtual void setValue(const double theX, const double theY, const double theZ) = 0;
23   /// Defines the point
24   virtual void setValue(const boost::shared_ptr<GeomAPI_Pnt>& thePoint) = 0;
25
26   /// Returns the X double value
27   virtual double x() const = 0;
28   /// Returns the Y double value
29   virtual double y() const = 0;
30   /// Returns the Z double value
31   virtual double z() const = 0;
32   /// Returns the 3D point
33   virtual boost::shared_ptr<GeomAPI_Pnt> pnt() = 0;
34
35   /// Returns the type of this class of attributes
36   static inline std::string type() {return std::string("Point");}
37
38   /// Returns the type of this class of attributes, not static method
39   virtual std::string attributeType() {return type();}
40
41 protected:
42   /// Objects are created for features automatically
43   GeomDataAPI_Point()
44   {}
45 };
46
47 #endif