+// 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"
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();
- QString aName = GetObjPyName();
- aResList << QString( "" );
- aResList << QString( "%1.Update();" ).arg( aName );
- aResList << QString( "" );
-
- return aResList;
+ return false;
}
-bool HYDROData_Zone::CanBeUpdated() const
+bool HYDROData_Zone::IsHas2dPrs() const
{
- return false;
+ return true;
}
bool HYDROData_Zone::CanRemove()
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