#include <HYDROData_Zone.h>
%End
-class HYDROData_Zone : HYDROData_Domain
+class HYDROData_Zone : HYDROData_Entity
{
-%TypeHeaderCode
-#include <HYDROData_Zone.h>
+%ConvertToSubClassCode
+ switch ( sipCpp->GetKind() )
+ {
+ case KIND_ZONE:
+ sipClass = sipClass_HYDROData_Zone;
+ break;
+
+ default:
+ // We don't recognise the type.
+ sipClass = NULL;
+ }
%End
-%ConvertToSubClassCode
- if ( !Handle(HYDROData_Zone)::DownCast( sipCpp ).IsNull() )
- sipClass = sipClass_HYDROData_Zone;
- else
- sipClass = NULL;
+%TypeHeaderCode
+#include <HYDROData_Zone.h>
%End
public:
- const ObjectKind GetKind() const;
+ // Enumeration of mergin types for conflict altitudes
+ enum MergeAltitudesType
+ {
+ Merge_ZMIN, // The minimum values
+ Merge_ZMAX, // The maximum values
+ Merge_Object // Only one altitude will be taken into account
+ };
public:
/**
- * Sets reference polyline object for zone.
+ * Sets the merging type for conflict altitudes.
+ * By default it is set to Merge_ZMIN.
+ */
+ void SetMergeType( const MergeAltitudesType& theType );
+
+ /**
+ * Returns the merging type for conflict altitudes.
+ */
+ MergeAltitudesType GetMergeType() const;
+
+
+ /**
+ * Sets the reference altitude to resolve the conflict.
+ * This object is used only in case of "Merge_Object" merge type.
*/
- void SetPolyline( HYDROData_Polyline thePolyline ) [void (const Handle_HYDROData_Polyline&)];
+ void SetMergeAltitude( HYDROData_IAltitudeObject theAltitude ) [void (const Handle_HYDROData_IAltitudeObject&)];
%MethodCode
- Handle(HYDROData_Polyline) aRefPolyline =
- Handle(HYDROData_Polyline)::DownCast( createHandle( a0 ) );
- if ( !aRefPolyline.IsNull() )
+ Handle(HYDROData_IAltitudeObject) aRefAltitude =
+ Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
+ if ( !aRefAltitude.IsNull() )
{
Py_BEGIN_ALLOW_THREADS
- sipSelfWasArg ? sipCpp->HYDROData_Zone::SetPolyline( aRefPolyline ) :
- sipCpp->SetPolyline( aRefPolyline );
+ sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeAltitude( aRefAltitude ) :
+ sipCpp->SetMergeAltitude( aRefAltitude );
Py_END_ALLOW_THREADS
}
%End
/**
- * Returns reference polyline object of zone.
+ * Returns the reference altitude to resolve the conflict.
*/
- HYDROData_Polyline GetPolyline() const [Handle_HYDROData_Polyline ()];
+ HYDROData_IAltitudeObject GetMergeAltitude() const [Handle_HYDROData_IAltitudeObject ()];
%MethodCode
- Handle(HYDROData_Polyline) aRefPolyline;
+ Handle(HYDROData_IAltitudeObject) aRefAltitude;
Py_BEGIN_ALLOW_THREADS
- aRefPolyline = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetPolyline() :
- sipCpp->GetPolyline();
+ aRefAltitude = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeAltitude() :
+ sipCpp->GetMergeAltitude();
Py_END_ALLOW_THREADS
- sipRes = (HYDROData_Polyline*)createPointer( aRefPolyline );
+ sipRes = (HYDROData_IAltitudeObject*)createPointer( aRefAltitude );
%End
/**
- * Remove reference polyline object of zone.
+ * Removes the reference altitude for resolving the conflict.
+ */
+ void RemoveMergeAltitude();
+
+
+ /**
+ * dd new one geometry object for zone.
+ */
+ void AddGeometryObject( HYDROData_Object theRegion ) [void (const Handle_HYDROData_Object&)];
+ %MethodCode
+
+ Handle(HYDROData_Object) aGeomObj =
+ Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
+ if ( !aGeomObj.IsNull() )
+ {
+ Py_BEGIN_ALLOW_THREADS
+ sipSelfWasArg ? sipCpp->HYDROData_Zone::AddGeometryObject( aGeomObj ) :
+ sipCpp->AddGeometryObject( aGeomObj );
+ Py_END_ALLOW_THREADS
+ }
+
+ %End
+
+ /**
+ * Returns all geometry objects of zone.
*/
- void RemovePolyline();
+ HYDROData_SequenceOfObjects GetGeometryObjects() const;
/**
- * Returns the painter path. The painter path is construct by polyline
+ * Removes all geometry objects from zone.
*/
- QPainterPath GetPainterPath() const;
+ void RemoveGeometryObjects();
protected: