#include <HYDROData_PriorityQueue.h>
#include <HYDROData_CalculationCase.h>
#include <HYDROData_Iterator.h>
-#include <HYDROData_LandCover.h>
#include <TDataStd_ReferenceList.hxx>
#include <TDataStd_Integer.hxx>
#include <TDF_ChildIterator.hxx>
HYDROData_PriorityQueue::HYDROData_PriorityQueue( HYDROData_CalculationCase* theCalcCase,
Standard_Integer aTag )
{
- myGeomObjects = theCalcCase->GetGeometryObjects();
- for( int i=myGeomObjects.Lower(), n=myGeomObjects.Upper(); i<=n; i++ )
+ myObjects = theCalcCase->GetGeometryObjects();
+ for( int i=myObjects.Lower(), n=myObjects.Upper(); i<=n; i++ )
{
- Handle(HYDROData_Entity) anObj = myGeomObjects.Value( i );
+ Handle(HYDROData_Entity) anObj = myObjects.Value( i );
if( !anObj.IsNull() )
{
QString anObjName = anObj->GetName();
HYDROData_Zone::MergeType& theMergeType ) const
{
QStringList aSortedZoneObjects;
- for( int i=myGeomObjects.Lower(), n=myGeomObjects.Upper(); i<=n; i++ )
+ for( int i=myObjects.Lower(), n=myObjects.Upper(); i<=n; i++ )
{
- QString aName = myGeomObjects.Value( i )->GetName();
+ QString aName = myObjects.Value( i )->GetName();
if( theZoneObjects.contains( aName ) )
aSortedZoneObjects.append( aName );
}
}
// 2. If no custom rule found, the standard ordering list is applied
- for( int i=myGeomObjects.Lower(), n=myGeomObjects.Upper(); i<=n; i++ )
+ for( int i=myObjects.Lower(), n=myObjects.Upper(); i<=n; i++ )
{
- if( myGeomObjects.Value( i )->Label() == theObj1->Label() )
+ if( myObjects.Value( i )->Label() == theObj1->Label() )
{
theMergeType = HYDROData_Zone::Merge_Object;
return true;
}
- if( myGeomObjects.Value( i )->Label() == theObj2->Label() )
+ if( myObjects.Value( i )->Label() == theObj2->Label() )
{
theMergeType = HYDROData_Zone::Merge_Object;
return false;
QString HYDROData_PriorityQueue::DumpRules( const TDF_Label& theRulesLab )
{
QString aDump = "Rules:\n";
+
HYDROData_ListOfRules aRules = GetRules( theRulesLab );
HYDROData_ListOfRules::const_iterator anIt = aRules.begin(), aLast = aRules.end();
for( ; anIt!=aLast; anIt++ )
QString aMergeType;
HYDROData_CalculationCase::DataTag aDataTag = HYDROData_CalculationCase::DataTag_CustomRules;
- Handle(HYDROData_LandCover) aLandCover1 = Handle(HYDROData_LandCover)::DownCast( anIt->Object1 );
- Handle(HYDROData_LandCover) aLandCover2 = Handle(HYDROData_LandCover)::DownCast( anIt->Object2 );
- if ( !aLandCover1.IsNull() && !aLandCover2.IsNull() )
- aDataTag = HYDROData_CalculationCase::DataTag_CustomLandCoverRules;
switch( anIt->MergeType )
{