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;
}
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;
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 );
#include "HYDROData_IAltitudeObject.h"
#include "HYDROData_Document.h"
#include "HYDROData_NaturalObject.h"
-
- #include <TNaming_Builder.hxx>
- #include <TNaming_NamedShape.hxx>
-
- #include <TopoDS_Shape.hxx>
-
-#include "HYDROData_LandCover.h"
#include <QStringList>
-
#include <TDataStd_Integer.hxx>
+ #include <TopoDS_Shape.hxx>
IMPLEMENT_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Entity)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Entity)