Salome HOME
Union of validator and filter functionalities.
[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 class GeomAPI_XYZ;
15
16 /**\class GeomDataAPI_Dir
17  * \ingroup DataModel
18  * \brief Attribute that contains 3D direction coordinates. 
19  */
20
21 class GeomDataAPI_Dir : public ModelAPI_Attribute
22 {
23  public:
24   /// Defines the double value
25   virtual void setValue(const double theX, const double theY, const double theZ) = 0;
26   /// Defines the direction
27   virtual void setValue(const std::shared_ptr<GeomAPI_Dir>& theDir) = 0;
28
29   /// Returns the X double value
30   virtual double x() const = 0;
31   /// Returns the Y double value
32   virtual double y() const = 0;
33   /// Returns the Z double value
34   virtual double z() const = 0;
35   /// Returns the direction of this attribute
36   virtual std::shared_ptr<GeomAPI_Dir> dir() = 0;
37   /// Returns the coordinates of this attribute
38   virtual std::shared_ptr<GeomAPI_XYZ> xyz() = 0;
39
40   /// Returns the type of this class of attributes
41   static inline std::string type()
42   {
43     return std::string("Dir");
44   }
45
46   /// Returns the type of this class of attributes, not static method
47   virtual std::string attributeType()
48   {
49     return type();
50   }
51
52  protected:
53   /// Objects are created for features automatically
54   GeomDataAPI_Dir()
55   {
56   }
57 };
58
59 #endif