#include <QStringList>
+#include <TDataStd_Integer.hxx>
+
#define PYTHON_REGION_ID "KIND_REGION"
IMPLEMENT_STANDARD_HANDLE(HYDROData_Region, HYDROData_Entity)
HYDROData_Region::HYDROData_Region()
+ : HYDROData_Entity()
{
+ SetMergeType( Merge_ZMIN );
}
HYDROData_Region::~HYDROData_Region()
myLab.FindChild( ChildTag_Zone ).ForgetAllAttributes( true );
}
+void HYDROData_Region::SetMergeType( const MergeBathymetriesType& theType )
+{
+ Handle(TDataStd_Integer) anInt;
+ if ( !myLab.FindChild( DataTag_MergeType ).FindAttribute( TDataStd_Integer::GetID(), anInt ) )
+ anInt = TDataStd_Integer::Set( myLab, 0 );
+ anInt->Set( (int)theType );
+}
+
+HYDROData_Region::MergeBathymetriesType HYDROData_Region::GetMergeType() const
+{
+ MergeBathymetriesType aMergeType = Merge_ZMIN;
+
+ Handle(TDataStd_Integer) anInt;
+ if ( myLab.FindChild( DataTag_MergeType ).FindAttribute( TDataStd_Integer::GetID(), anInt ) )
+ aMergeType = (MergeBathymetriesType)anInt->Get();
+
+ return aMergeType;
+}
+
int HYDROData_Region::NbZones() const
{
return NbReferenceObjects( DataTag_Zone );
class HYDROData_Region : public HYDROData_Entity
{
+public:
+
+ // Enumeration of mergin types for conflict bathymetries
+ enum MergeBathymetriesType
+ {
+ Merge_ZMIN,
+ Merge_ZMAX
+ };
+
protected:
/**
enum DataTag
{
DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
- DataTag_Zone ///< reference zones
+ DataTag_Zone, ///< reference zones
+ DataTag_MergeType, ///< mergin type of conflict bathymetries
};
/**
HYDRODATA_EXPORT virtual void RemoveChildZones();
+ /**
+ * Sets the merging type for conflict bathymetries.
+ * By default it is set to Merge_ZMIN.
+ */
+ HYDRODATA_EXPORT virtual void SetMergeType( const MergeBathymetriesType& theType );
+
+ /**
+ * Returns the merging type for conflict bathymetries.
+ */
+ HYDRODATA_EXPORT virtual MergeBathymetriesType GetMergeType() const;
+
+
+
/**
* Returns number of reference zones of region.
*/
}
%End
+public:
+
+ // Enumeration of mergin types for conflict bathymetries
+ enum MergeBathymetriesType
+ {
+ Merge_ZMIN,
+ Merge_ZMAX
+ };
+
public:
/**
void RemoveChildZones();
+ /**
+ * Sets the merging type for conflict bathymetries.
+ * By default it is set to Merge_ZMIN.
+ */
+ void SetMergeType( const MergeBathymetriesType& theType );
+
+ /**
+ * Returns the merging type for conflict bathymetries.
+ */
+ MergeBathymetriesType GetMergeType() const;
+
+
/**
* Returns number of reference zones of region.
*/