myIterator = 0;
else
myIterator = new TopoDS_Iterator( aShape );
- myIndex = 0;
+
theMap.myLab.FindChild( DataTag_Types ).FindAttribute( TDataStd_ExtStringArray::GetID(), myArray );
+ myIndex = myArray->Lower();
}
/**
delete myIterator;
}
+/**
+ Return the current 0-based index of the iterator
+ @return the current index
+*/
+int HYDROData_LandCoverMap::Iterator::Index() const
+{
+ if( myArray.IsNull() )
+ return -1;
+ else
+ return myIndex - myArray->Lower();
+}
+
/**
Return if the iterator has more elements
@return if the iterator has more elements
return HYDROData_Tool::toQString( myArray->Value( myIndex ) );
}
+/**
+ Set the Strickler type for the current land cover
+ @param theType the Strickler type
+*/
+void HYDROData_LandCoverMap::Iterator::SetStricklerType( const QString& theType )
+{
+ if( myArray.IsNull() || myIndex < myArray->Lower() || myIndex > myArray->Upper() )
+ return;
+ else
+ myArray->SetValue( myIndex, HYDROData_Tool::toExtString( theType ) );
+}
+
/**
Constructor
*/
bool More() const;
void Next();
+ int Index() const;
TopoDS_Face Face() const;
QString StricklerType() const;
+ void SetStricklerType( const QString& );
private:
TopoDS_Iterator* myIterator;