Salome HOME
Fix linkage problem on Windows
[modules/gui.git] / src / SPlot2d / SPlot2d_Curve.cxx
index caca33aaf9014be8d27d9cc77c695e9409676c28..84057f650ee3a17c1eb53166b9ec847192499633 100644 (file)
@@ -1,27 +1,28 @@
-// Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-// 
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either 
-// version 2.1 of the License.
-// 
-// This library is distributed in the hope that it will be useful 
-// but WITHOUT ANY WARRANTY; without even the implied warranty of 
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // Lesser General Public License for more details.
 //
-// You should have received a copy of the GNU Lesser General Public  
-// License along with this library; if not, write to the Free Software 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //  File   : SPlot2d_Curve.cxx
-//  Author : Sergey RUIN
-//  Module : SUIT
+//  Author : Sergey RUIN, Open CASCADE S.A.S. (sergey.ruin@opencascade.com)
 
 #include "SPlot2d_Curve.h"
-using namespace std;
 
 /*!
   Constructor
@@ -42,19 +43,10 @@ SPlot2d_Curve::~SPlot2d_Curve()
   Copy constructor. Makes deep copy of data.
 */
 SPlot2d_Curve::SPlot2d_Curve( const SPlot2d_Curve& curve )
+: Plot2d_Curve( curve )
 {
-  myAutoAssign = curve.isAutoAssign();
-  myHorTitle   = curve.getHorTitle();
-  myVerTitle   = curve.getVerTitle();
-  myHorUnits   = curve.getHorUnits();
-  myVerUnits   = curve.getVerUnits();
-  myColor      = curve.getColor();
-  myMarker     = curve.getMarker();
-  myLine       = curve.getLine();
-  myLineWidth  = curve.getLineWidth();
-  myPoints     = curve.getPointList();
-  myIO         = curve.getIO();
-  myTableIO    = curve.getTableIO();
+  myIO      = curve.getIO();
+  myTableIO = curve.getTableIO();
 }
 
 /*!
@@ -62,16 +54,7 @@ SPlot2d_Curve::SPlot2d_Curve( const SPlot2d_Curve& curve )
 */
 SPlot2d_Curve& SPlot2d_Curve::operator=( const SPlot2d_Curve& curve )
 {
-  myAutoAssign = curve.isAutoAssign();
-  myHorTitle   = curve.getHorTitle();
-  myVerTitle   = curve.getVerTitle();
-  myHorUnits   = curve.getHorUnits();
-  myVerUnits   = curve.getVerUnits();
-  myColor      = curve.getColor();
-  myMarker     = curve.getMarker();
-  myLine       = curve.getLine();
-  myLineWidth  = curve.getLineWidth();
-  myPoints     = curve.getPointList();
+  Plot2d_Curve::operator=(curve);
   myIO         = curve.getIO();
   myTableIO    = curve.getTableIO();
   return *this;
@@ -137,3 +120,37 @@ QString SPlot2d_Curve::getTableTitle() const
     title = getTableIO()->getName();
   return title;
 }
+
+/*!
+  Add owner of the curve.
+  \param owner  - owner of the curve
+*/
+void SPlot2d_Curve::addOwner(const QString& owner) {
+  myOwners.insert(owner);
+}
+
+/*!
+  Remove owner of the curve.
+  \param owner  - owner of the curve
+*/
+void SPlot2d_Curve::removeOwner(const QString& owner) {
+  myOwners.insert(owner);
+}
+
+/*!
+  Get all owners of the curve.
+  \return owners of the curve.
+*/
+OwnerSet SPlot2d_Curve::getOwners() const {
+  return myOwners;
+}
+
+
+/*!
+  Add owners of the curve.
+  \param owners  - owners of the curve
+*/
+void SPlot2d_Curve::addOwners(OwnerSet& owners) {
+  myOwners = myOwners|=owners;
+}
+