Salome HOME
Bug #487: dump/load script - problem with obstacle.
[modules/hydro.git] / src / HYDROData / HYDROData_Zone.cxx
index f90f02873d021154215d5a7f5f194dbea5b8a0df..2df7c740f396f90872503c1d23684646412405de 100644 (file)
@@ -22,35 +22,21 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Entity)
 HYDROData_Zone::HYDROData_Zone()
 : HYDROData_Entity()
 {
+  myInterpolator = NULL;
 }
 
 HYDROData_Zone::~HYDROData_Zone()
 {
 }
 
-QStringList HYDROData_Zone::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
+bool HYDROData_Zone::CanBeUpdated() const
 {
-  QStringList aResList = dumpObjectCreation( theTreatedObjects );
-
-  HYDROData_SequenceOfObjects aGeomObjects = GetGeometryObjects();
-  HYDROData_SequenceOfObjects::Iterator aGeomObjsIter( aGeomObjects );
-  for ( ; aGeomObjsIter.More(); aGeomObjsIter.Next() )
-  {
-    Handle(HYDROData_Object) aRefGeomObj =
-      Handle(HYDROData_Object)::DownCast( aGeomObjsIter.Value() );
-    if ( !aRefGeomObj.IsNull() )
-      setPythonReferenceObject( theTreatedObjects, aResList, aRefGeomObj, "AddGeometryObject" );
-  }
-
-  // How can we get the shape? Mb Update() method to intersect the shapes of reference objects?
-  // TODO:  TopoDS_Shape aRefShape = GetShape();
-
-  return aResList;
+  return false;
 }
 
-bool HYDROData_Zone::CanBeUpdated() const
+bool HYDROData_Zone::IsHas2dPrs() const
 {
-  return false;
+  return true;
 }
 
 bool HYDROData_Zone::CanRemove()
@@ -117,17 +103,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