Salome HOME
#refs 522 (very draft) //import only
[modules/hydro.git] / src / HYDROData / HYDROData_Zone.cxx
index 6b14079c24ade55c36dc56193c98eee807e70a13..edd4169040c90629a63026d2e6e8bf284bdbd97a 100644 (file)
@@ -1,3 +1,24 @@
+// Copyright (C) 2007-2015  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, 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
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #include "HYDROData_Zone.h"
 
@@ -22,6 +43,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Entity)
 HYDROData_Zone::HYDROData_Zone()
 : HYDROData_Entity()
 {
+  myInterpolator = NULL;
 }
 
 HYDROData_Zone::~HYDROData_Zone()
@@ -33,6 +55,11 @@ bool HYDROData_Zone::CanBeUpdated() const
   return false;
 }
 
+bool HYDROData_Zone::IsHas2dPrs() const
+{
+  return true;
+}
+
 bool HYDROData_Zone::CanRemove()
 {
   return false;
@@ -97,17 +124,19 @@ bool HYDROData_Zone::IsMergingNeed() const
   return false;
 }
 
+void HYDROData_Zone::SetInterpolator( HYDROData_IInterpolator* theInter )
+{
+  myInterpolator = theInter;
+}
+
+HYDROData_IInterpolator* HYDROData_Zone::GetInterpolator() const
+{
+  return myInterpolator;
+}
+
 void HYDROData_Zone::SetMergeType( const MergeAltitudesType& theType )
 {
-  Handle(TDataStd_Integer) anInt;
-  if ( myLab.FindChild( DataTag_MergeType ).FindAttribute( TDataStd_Integer::GetID(), anInt ) )
-  {
-    anInt->Set( (int)theType );
-  }
-  else
-  {
-    anInt = TDataStd_Integer::Set( myLab.FindChild( DataTag_MergeType ), (int)theType );
-  }
+  TDataStd_Integer::Set( myLab.FindChild( DataTag_MergeType ), (int)theType );
 }
 
 HYDROData_Zone::MergeAltitudesType HYDROData_Zone::GetMergeType() const