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