Salome HOME
Meet the coding style (line length <= 100)
[modules/shaper.git] / src / GeomData / GeomData_Dir.h
index b4dea091ac3574f3c34f8fbd7f9d1ca2143730ea..846dcd343f32d4089a64dd0a289d6941de701cf2 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        GeomData_Dir.h
 // Created:     24 Apr 2014
 // Author:      Mikhail PONIKAROV
@@ -9,9 +11,10 @@
 #include "GeomDataAPI_Dir.h"
 #include <TDataStd_RealArray.hxx>
 #include <TDF_Label.hxx>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_Dir;
+class GeomAPI_XYZ;
 
 /**\class GeomData_Dir
  * \ingroup DataModel
@@ -19,12 +22,13 @@ class GeomAPI_Dir;
  */
 class GeomData_Dir : public GeomDataAPI_Dir
 {
+  TDF_Label myLab; ///< the main label of the attribute
   Handle_TDataStd_RealArray myCoords;  ///< X, Y and Z doubles as real array attribute [0; 2]
  public:
   /// Defines the double value
   GEOMDATA_EXPORT virtual void setValue(const double theX, const double theY, const double theZ);
   /// Defines the direction
-  GEOMDATA_EXPORT virtual void setValue(const boost::shared_ptr<GeomAPI_Dir>& theDir);
+  GEOMDATA_EXPORT virtual void setValue(const std::shared_ptr<GeomAPI_Dir>& theDir);
 
   /// Returns the X double value
   GEOMDATA_EXPORT virtual double x() const;
@@ -33,11 +37,15 @@ class GeomData_Dir : public GeomDataAPI_Dir
   /// Returns the Z double value
   GEOMDATA_EXPORT virtual double z() const;
   /// Returns the direction of this attribute
-  GEOMDATA_EXPORT virtual boost::shared_ptr<GeomAPI_Dir> dir();
+  GEOMDATA_EXPORT virtual std::shared_ptr<GeomAPI_Dir> dir();
+  /// Returns the coordinates of this attribute
+  GEOMDATA_EXPORT virtual std::shared_ptr<GeomAPI_XYZ> xyz();
 
  protected:
   /// Initializes attributes
   GEOMDATA_EXPORT GeomData_Dir(TDF_Label& theLabel);
+  /// Reinitializes the internal state of the attribute (may be needed on undo/redo, abort, etc)
+  virtual void reinit();
 
   friend class Model_Data;
 };