+}
+
+void HYDROData_CalculationCase::ClearRules( const bool theIsSetToUpdate )
+{
+ TDF_Label aRulesLab = myLab.FindChild( DataTag_CustomRules );
+ HYDROData_PriorityQueue::ClearRules( aRulesLab );
+
+ // Indicate model of the need to update splitting
+ if ( theIsSetToUpdate ) {
+ SetToUpdate( true );
+ }
+}
+
+void HYDROData_CalculationCase::AddRule( const Handle(HYDROData_Object)& theObject1,
+ HYDROData_PriorityType thePriority,
+ const Handle(HYDROData_Object)& theObject2,
+ HYDROData_Zone::MergeAltitudesType theMergeType )
+{
+ TDF_Label aRulesLab = myLab.FindChild( DataTag_CustomRules );
+ HYDROData_PriorityQueue::AddRule( aRulesLab, theObject1, thePriority, theObject2, theMergeType );
+
+ // Indicate model of the need to update splitting
+ SetToUpdate( true );
+}
+
+QString HYDROData_CalculationCase::DumpRules() const
+{
+ TDF_Label aRulesLab = myLab.FindChild( DataTag_CustomRules );
+ return HYDROData_PriorityQueue::DumpRules( aRulesLab );
+}
+
+void HYDROData_CalculationCase::SetAssignmentMode( AssignmentMode theMode )
+{
+ TDF_Label aModeLab = myLab.FindChild( DataTag_AssignmentMode );
+ TDataStd_Integer::Set( aModeLab, ( int ) theMode );
+
+ // Indicate model of the need to update splitting
+ SetToUpdate( true );
+}
+
+HYDROData_CalculationCase::AssignmentMode HYDROData_CalculationCase::GetAssignmentMode() const
+{
+ Handle(TDataStd_Integer) aModeAttr;
+ bool isOK = myLab.FindChild( DataTag_AssignmentMode ).FindAttribute( TDataStd_Integer::GetID(), aModeAttr );
+ if( isOK )
+ return ( AssignmentMode ) aModeAttr->Get();
+ else
+ return MANUAL;
+}
+
+void HYDROData_CalculationCase::DumpRulesToPython( const QString& theCalcCaseName,
+ QStringList& theScript ) const
+{
+ TDF_Label aRulesLab = myLab.FindChild( DataTag_CustomRules );
+ HYDROData_PriorityQueue::DumpRulesToPython( aRulesLab, theCalcCaseName, theScript );
+}
+
+HYDROData_Warning HYDROData_CalculationCase::GetLastWarning() const
+{
+ return myLastWarning;
+}
+
+void HYDROData_CalculationCase::SetWarning( HYDROData_WarningType theType, const QString& theData )
+{
+ myLastWarning.Type = theType;
+ myLastWarning.Data = theData;
+}
+
+bool HYDROData_CalculationCase::GetRule( int theIndex,
+ Handle(HYDROData_Object)& theObject1,
+ HYDROData_PriorityType& thePriority,
+ Handle(HYDROData_Object)& theObject2,
+ HYDROData_Zone::MergeAltitudesType& theMergeType ) const
+{
+ TDF_Label aRulesLab = myLab.FindChild( DataTag_CustomRules );
+ return HYDROData_PriorityQueue::GetRule( aRulesLab, theIndex,
+ theObject1, thePriority, theObject2, theMergeType );
+}