From: asl Date: Mon, 19 Oct 2015 08:08:41 +0000 (+0300) Subject: Merge remote-tracking branch 'origin/BR_LAND_COVER_MAP' into BR_LAND_COVER_REMOVING X-Git-Tag: v1.5~78^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=914d3c8044ea08613f24ce41a94ecf067e0e750f;p=modules%2Fhydro.git Merge remote-tracking branch 'origin/BR_LAND_COVER_MAP' into BR_LAND_COVER_REMOVING Conflicts: src/HYDROData/HYDROData_CalculationCase.cxx src/HYDROData/HYDROData_Iterator.cxx src/HYDROData/HYDROData_LandCover.cxx src/HYDROData/HYDROData_LandCover.h src/HYDROData/HYDROData_Zone.cxx --- 914d3c8044ea08613f24ce41a94ecf067e0e750f diff --cc src/HYDROData/HYDROData_CalculationCase.cxx index 6c423905,6d0facde..3de94ed0 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@@ -244,10 -261,17 +244,13 @@@ HYDROData_SequenceOfObjects HYDROData_C if ( !aBoundaryPolyline.IsNull() ) aResSeq.Append( aBoundaryPolyline ); + HYDROData_SequenceOfObjects aSeqOfGeomObjs = GetGeometryObjects(); + aResSeq.Append( aSeqOfGeomObjs ); + // Regions - HYDROData_SequenceOfObjects aSeqOfRegions = GetRegions( false ); + HYDROData_SequenceOfObjects aSeqOfRegions = GetRegions(); aResSeq.Append( aSeqOfRegions ); - // Land cover regions - HYDROData_SequenceOfObjects aSeqOfLandCoverRegions = GetRegions( true ); - aResSeq.Append( aSeqOfLandCoverRegions ); - return aResSeq; } @@@ -567,13 -625,51 +572,16 @@@ void HYDROData_CalculationCase::RemoveS ClearReferenceObjects( DataTag_StricklerTable ); // Indicate model of the need to update land covers partition - SetToUpdate( !aPrevStricklerTable.IsNull() || IsMustBeUpdated() ); + Changed( Geom_No ); } -bool HYDROData_CalculationCase::AddLandCover( const Handle(HYDROData_LandCover)& theLandCover ) +Handle(HYDROData_Region) HYDROData_CalculationCase::AddNewRegion( const Handle(HYDROData_Zone)& theZone ) { - if ( HasReference( theLandCover, DataTag_LandCover ) ) - return false; // Land cover is already in reference list - - AddReferenceObject( theLandCover, DataTag_LandCover ); - - // Indicate model of the need to update land covers partition + Changed( Geom_No ); - - return true; -} - -HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetLandCovers() const -{ - return GetReferenceObjects( DataTag_LandCover ); -} - -void HYDROData_CalculationCase::RemoveLandCover( const Handle(HYDROData_LandCover)& theLandCover ) -{ - if ( theLandCover.IsNull() ) - return; - - RemoveReferenceObject( theLandCover->Label(), DataTag_LandCover ); - - // Indicate model of the need to update land cover partition + Changed( Geom_No ); -} - -void HYDROData_CalculationCase::RemoveLandCovers() -{ - ClearReferenceObjects( DataTag_LandCover ); - - // Indicate model of the need to update land cover partition + Changed( Geom_No ); -} - -Handle(HYDROData_Region) HYDROData_CalculationCase::AddNewRegion( const Handle(HYDROData_Zone)& theZone, - const bool theLandCover ) -{ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); - Handle(HYDROData_Region) aNewRegion = addNewRegion( aDocument, CALCULATION_REGIONS_PREF, theLandCover ); + Handle(HYDROData_Region) aNewRegion = addNewRegion( aDocument, CALCULATION_REGIONS_PREF ); if ( aNewRegion.IsNull() ) return aNewRegion; @@@ -1292,3 -1437,22 +1300,5 @@@ bool HYDROData_CalculationCase::GetRule return HYDROData_PriorityQueue::GetRule( aRulesLab, theIndex, theObject1, thePriority, theObject2, theMergeType ); } + -void HYDROData_CalculationCase::SetAssignmentLandCoverMode( AssignmentMode theMode ) -{ - TDF_Label aModeLab = myLab.FindChild( DataTag_AssignmentLandCoverMode ); - TDataStd_Integer::Set( aModeLab, ( int ) theMode ); - - // Indicate model of the need to update land covers partition - Changed( Geom_No ); -} - -HYDROData_CalculationCase::AssignmentMode HYDROData_CalculationCase::GetAssignmentLandCoverMode() const -{ - Handle(TDataStd_Integer) aModeAttr; - bool isOK = myLab.FindChild( DataTag_AssignmentLandCoverMode ).FindAttribute( TDataStd_Integer::GetID(), aModeAttr ); - if( isOK ) - return ( AssignmentMode ) aModeAttr->Get(); - else - return MANUAL; -} ++ Changed( Geom_No ); diff --cc src/HYDROData/HYDROData_Zone.cxx index 33a7cd2f,4bceba9a..661e23c9 --- a/src/HYDROData/HYDROData_Zone.cxx +++ b/src/HYDROData/HYDROData_Zone.cxx @@@ -22,15 -22,10 +22,9 @@@ #include "HYDROData_IAltitudeObject.h" #include "HYDROData_Document.h" #include "HYDROData_NaturalObject.h" - - #include - #include - - #include - -#include "HYDROData_LandCover.h" #include - #include + #include IMPLEMENT_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Entity)