Salome HOME
Merge branch 'BR_PYTHON_PLUGIN' of newgeom:newgeom.git into Dev_0.6.1
[modules/shaper.git] / src / GeomDataAPI / GeomDataAPI_Dir.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomDataAPI_Dir.h
4 // Created:     24 Apr 2014
5 // Author:      Mikhail PONIKAROV
6
7 #ifndef GeomDataAPI_Dir_H_
8 #define GeomDataAPI_Dir_H_
9
10 #include "GeomDataAPI.h"
11 #include <ModelAPI_Attribute.h>
12
13 class GeomAPI_Dir;
14
15 /**\class GeomDataAPI_Dir
16  * \ingroup DataModel
17  * \brief Attribute that contains 3D direction coordinates. 
18  */
19
20 class GeomDataAPI_Dir : public ModelAPI_Attribute
21 {
22  public:
23   /// Defines the double value
24   virtual void setValue(const double theX, const double theY, const double theZ) = 0;
25   /// Defines the direction
26   virtual void setValue(const std::shared_ptr<GeomAPI_Dir>& theDir) = 0;
27
28   /// Returns the X double value
29   virtual double x() const = 0;
30   /// Returns the Y double value
31   virtual double y() const = 0;
32   /// Returns the Z double value
33   virtual double z() const = 0;
34   /// Returns the direction of this attribute
35   virtual std::shared_ptr<GeomAPI_Dir> dir() = 0;
36
37   /// Returns the type of this class of attributes
38   static inline std::string type()
39   {
40     return std::string("Dir");
41   }
42
43   /// Returns the type of this class of attributes, not static method
44   virtual std::string attributeType()
45   {
46     return type();
47   }
48
49  protected:
50   /// Objects are created for features automatically
51   GeomDataAPI_Dir()
52   {
53   }
54 };
55
56 #endif