X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomData%2FGeomData_Dir.h;h=846dcd343f32d4089a64dd0a289d6941de701cf2;hb=93e768671284689f9b3aa593df14c4c4fa1dca0f;hp=56a8b9d2ac80db8fac7a821493c9332bc7ddd1e1;hpb=d4572a0253007ff9fc263253720e37bf896f8d0d;p=modules%2Fshaper.git diff --git a/src/GeomData/GeomData_Dir.h b/src/GeomData/GeomData_Dir.h index 56a8b9d2a..846dcd343 100644 --- a/src/GeomData/GeomData_Dir.h +++ b/src/GeomData/GeomData_Dir.h @@ -1,17 +1,20 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomData_Dir.h // Created: 24 Apr 2014 // Author: Mikhail PONIKAROV -#ifndef GeomData_Dir_HeaderFile -#define GeomData_Dir_HeaderFile +#ifndef GeomData_Dir_H_ +#define GeomData_Dir_H_ #include "GeomData.h" #include "GeomDataAPI_Dir.h" #include #include -#include +#include class GeomAPI_Dir; +class GeomAPI_XYZ; /**\class GeomData_Dir * \ingroup DataModel @@ -19,10 +22,13 @@ class GeomAPI_Dir; */ class GeomData_Dir : public GeomDataAPI_Dir { - Handle_TDataStd_RealArray myCoords; ///< X, Y and Z doubles as real array attribute [0; 2] -public: + 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 std::shared_ptr& theDir); /// Returns the X double value GEOMDATA_EXPORT virtual double x() const; @@ -31,11 +37,15 @@ public: /// Returns the Z double value GEOMDATA_EXPORT virtual double z() const; /// Returns the direction of this attribute - GEOMDATA_EXPORT boost::shared_ptr dir(); + GEOMDATA_EXPORT virtual std::shared_ptr dir(); + /// Returns the coordinates of this attribute + GEOMDATA_EXPORT virtual std::shared_ptr xyz(); -protected: + 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; };