Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom.git into Dev_1.1.0
[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 std::string typeId()
42   {
43     return std::string("Dir");
44   }
45
46   /// Returns the type of this class of attributes, not static method
47   GEOMDATAAPI_EXPORT virtual std::string attributeType();
48
49  protected:
50   /// Objects are created for features automatically
51   GEOMDATAAPI_EXPORT GeomDataAPI_Dir();
52   GEOMDATAAPI_EXPORT virtual ~GeomDataAPI_Dir();
53 };
54
55 #endif