Salome HOME
Issue #273: Add copyright string
[modules/shaper.git] / src / GeomData / GeomData_Dir.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomData_Dir.h
4 // Created:     24 Apr 2014
5 // Author:      Mikhail PONIKAROV
6
7 #ifndef GeomData_Dir_H_
8 #define GeomData_Dir_H_
9
10 #include "GeomData.h"
11 #include "GeomDataAPI_Dir.h"
12 #include <TDataStd_RealArray.hxx>
13 #include <TDF_Label.hxx>
14 #include <memory>
15
16 class GeomAPI_Dir;
17
18 /**\class GeomData_Dir
19  * \ingroup DataModel
20  * \brief Attribute that contains direction.
21  */
22 class GeomData_Dir : public GeomDataAPI_Dir
23 {
24   Handle_TDataStd_RealArray myCoords;  ///< X, Y and Z doubles as real array attribute [0; 2]
25  public:
26   /// Defines the double value
27   GEOMDATA_EXPORT virtual void setValue(const double theX, const double theY, const double theZ);
28   /// Defines the direction
29   GEOMDATA_EXPORT virtual void setValue(const std::shared_ptr<GeomAPI_Dir>& theDir);
30
31   /// Returns the X double value
32   GEOMDATA_EXPORT virtual double x() const;
33   /// Returns the Y double value
34   GEOMDATA_EXPORT virtual double y() const;
35   /// Returns the Z double value
36   GEOMDATA_EXPORT virtual double z() const;
37   /// Returns the direction of this attribute
38   GEOMDATA_EXPORT virtual std::shared_ptr<GeomAPI_Dir> dir();
39
40  protected:
41   /// Initializes attributes
42   GEOMDATA_EXPORT GeomData_Dir(TDF_Label& theLabel);
43
44   friend class Model_Data;
45 };
46
47 #endif