X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Zone.cxx;h=edd4169040c90629a63026d2e6e8bf284bdbd97a;hb=f7c005b67e48ec7bac99c566fb4f34215ec1a4b1;hp=4d96a6493ecf801c2b4cc122f8f6a08cd109bfed;hpb=ba70cb7d5a35a6d311acc1b061fb450afe04d0f8;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Zone.cxx b/src/HYDROData/HYDROData_Zone.cxx index 4d96a649..edd41690 100644 --- a/src/HYDROData/HYDROData_Zone.cxx +++ b/src/HYDROData/HYDROData_Zone.cxx @@ -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,39 +43,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(); - QString aName = GetName(); - 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() @@ -121,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