#include <HYDROData_Calculation.h>
%End
-class HYDROData_Calculation : HYDROData_Object
+class HYDROData_Calculation : HYDROData_Entity
{
%TypeHeaderCode
%End
%ConvertToSubClassCode
- if ( !Handle(HYDROData_Calculation)::DownCast( sipCpp ).IsNull() )
- sipClass = sipClass_HYDROData_Calculation;
- else
- sipClass = NULL;
-%End
-
-public:
-
- const ObjectKind GetKind() const;
-
-public:
-
- /**
- * Sets boundary polyline for calculation case.
- */
- void SetBoundaryPolyline( HYDROData_Polyline thePolyline ) [void (const Handle_HYDROData_Polyline&)];
- %MethodCode
-
- Handle(HYDROData_Polyline) aRefPolyline =
- Handle(HYDROData_Polyline)::DownCast( createHandle( a0 ) );
- if ( !aRefPolyline.IsNull() )
+ switch ( sipCpp->GetKind() )
{
- Py_BEGIN_ALLOW_THREADS
- sipSelfWasArg ? sipCpp->HYDROData_Calculation::SetBoundaryPolyline( aRefPolyline ) :
- sipCpp->SetBoundaryPolyline( aRefPolyline );
- Py_END_ALLOW_THREADS
- }
+ case KIND_CALCULATION:
+ sipClass = sipClass_HYDROData_Calculation;
+ break;
- %End
-
- /**
- * Returns boundary polyline of calculation case.
- */
- HYDROData_Polyline GetBoundaryPolyline() const [Handle_HYDROData_Polyline ()];
- %MethodCode
+ default:
+ // We don't recognise the type.
+ sipClass = NULL;
+ }
+%End
- Handle(HYDROData_Polyline) aRefPolyline;
-
- Py_BEGIN_ALLOW_THREADS
- aRefPolyline = sipSelfWasArg ? sipCpp->HYDROData_Calculation::GetBoundaryPolyline() :
- sipCpp->GetBoundaryPolyline();
- Py_END_ALLOW_THREADS
-
- sipRes = (HYDROData_Polyline*)createPointer( aRefPolyline );
-
- %End
+public:
/**
- * Removes boundary polyline of calculation case.
+ * Split reference geometry objects to non-intersected regions.
*/
- void RemoveBoundaryPolyline();
-
-
+ void SplitGeometryObjects();
/**
- * Returns number of refrence zones for calculation case.
+ * Returns number of geometry objects for calculation case.
*/
- int NbZones() const;
+ int NbGeometryObjects() const;
/**
- * Add new one refrence zone for calculation case.
+ * dd new one geometry object for calculation case.
*/
- void AddZone( HYDROData_Zone theZone ) [void (const Handle_HYDROData_Zone&)];
+ void AddGeometryObject( HYDROData_Object theRegion ) [void (const Handle_HYDROData_Object&)];
%MethodCode
- Handle(HYDROData_Zone) aRefZone =
- Handle(HYDROData_Zone)::DownCast( createHandle( a0 ) );
- if ( !aRefZone.IsNull() )
+ Handle(HYDROData_Object) aGeomObj =
+ Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
+ if ( !aGeomObj.IsNull() )
{
Py_BEGIN_ALLOW_THREADS
- sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddZone( aRefZone ) :
- sipCpp->AddZone( aRefZone );
+ sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddGeometryObject( aGeomObj ) :
+ sipCpp->AddGeometryObject( aGeomObj );
Py_END_ALLOW_THREADS
}
%End
/**
- * Replace the refrence zone for calculation case.
+ * Returns all geometry objects of calculation case.
*/
- void SetZone( const int theIndex,
- HYDROData_Zone theZone ) [void (const int, const Handle_HYDROData_Zone&)];
- %MethodCode
-
- Handle(HYDROData_Zone) aRefZone =
- Handle(HYDROData_Zone)::DownCast( createHandle( a1 ) );
- if ( !aRefZone.IsNull() )
- {
- Py_BEGIN_ALLOW_THREADS
- sipSelfWasArg ? sipCpp->HYDROData_Calculation::SetZone( a0, aRefZone ) :
- sipCpp->SetZone( a0, aRefZone );
- Py_END_ALLOW_THREADS
- }
-
- %End
+ //HYDROData_SequenceOfObjects GetGeometryObjects() const;
/**
- * Sets the refrence zones for calculation case.
+ * Removes all geometry objects from calculation case.
*/
- //void SetZones( const HYDROData_SequenceOfObjects& theZones );
+ void RemoveGeometryObjects();
+
/**
- * Returns refrence zone of calculation case by index.
+ * Add new one region for calculation case.
+ * The new region is added into the list of reference regions.
*/
- HYDROData_Zone GetZone( const int theIndex ) const [Handle_HYDROData_Zone (const int)];
+ HYDROData_Region AddNewRegion() [Handle_HYDROData_Region ()];
%MethodCode
- Handle(HYDROData_Zone) aRefZone;
+ Handle(HYDROData_Region) aNewRegion;
Py_BEGIN_ALLOW_THREADS
- aRefZone = sipSelfWasArg ? sipCpp->HYDROData_Calculation::GetZone( a0 ) :
- sipCpp->GetZone( a0 );
+ aNewRegion = sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddNewRegion() :
+ sipCpp->AddNewRegion();
Py_END_ALLOW_THREADS
- sipRes = (HYDROData_Zone*)createPointer( aRefZone );
-
- %End
-
- /**
- * Returns all refrence zone of calculation case.
- */
- //HYDROData_SequenceOfObjects GetZones() const;
-
- /**
- * Removes all refrence zone of calculation case.
- */
- void RemoveZones();
-
+ sipRes = (HYDROData_Region*)createPointer( aNewRegion );
+ %End
- /**
- * Returns number of splitted zones for calculation case.
- */
- int NbSplittedZones() const;
/**
- * Add new one splitted zone for calculation case.
+ * Add new one reference region for calculation case.
*/
- void AddSplittedZone( HYDROData_Zone theZone ) [void (const Handle_HYDROData_Zone&)];
+ void AddRegion( HYDROData_Region theRegion ) [void (const Handle_HYDROData_Region&)];
%MethodCode
- Handle(HYDROData_Zone) aRefZone =
- Handle(HYDROData_Zone)::DownCast( createHandle( a0 ) );
- if ( !aRefZone.IsNull() )
+ Handle(HYDROData_Region) aRegion =
+ Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
+ if ( !aRegion.IsNull() )
{
Py_BEGIN_ALLOW_THREADS
- sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddSplittedZone( aRefZone ) :
- sipCpp->AddSplittedZone( aRefZone );
+ sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddRegion( aRegion ) :
+ sipCpp->AddRegion( aRegion );
Py_END_ALLOW_THREADS
}
%End
/**
- * Replace the splitted zone for calculation case.
+ * Returns all reference regions of calculation case.
+ */
+ //void HYDROData_SequenceOfObjects GetRegions() const;
+
+ /**
+ * Removes reference region from calculation case.
*/
- void SetSplittedZone( const int theIndex,
- HYDROData_Zone theZone ) [void (const int, const Handle_HYDROData_Zone&)];
+ void RemoveRegion( HYDROData_Region theRegion ) [void (const Handle_HYDROData_Region&)];
%MethodCode
- Handle(HYDROData_Zone) aRefZone =
- Handle(HYDROData_Zone)::DownCast( createHandle( a1 ) );
- if ( !aRefZone.IsNull() )
+ Handle(HYDROData_Region) aRegion =
+ Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
+ if ( !aRegion.IsNull() )
{
Py_BEGIN_ALLOW_THREADS
- sipSelfWasArg ? sipCpp->HYDROData_Calculation::SetSplittedZone( a0, aRefZone ) :
- sipCpp->SetSplittedZone( a0, aRefZone );
+ sipSelfWasArg ? sipCpp->HYDROData_Calculation::RemoveRegion( aRegion ) :
+ sipCpp->RemoveRegion( aRegion );
Py_END_ALLOW_THREADS
}
%End
/**
- * Sets the refrence zones for calculation case.
- */
- //void SetSplittedZones( const HYDROData_SequenceOfObjects& theZones );
-
- /**
- * Returns splitted zone of calculation case by index.
- */
- HYDROData_Zone GetSplittedZone( const int theIndex ) const [Handle_HYDROData_Zone (const int)];
- %MethodCode
-
- Handle(HYDROData_Zone) aRefZone;
-
- Py_BEGIN_ALLOW_THREADS
- aRefZone = sipSelfWasArg ? sipCpp->HYDROData_Calculation::GetSplittedZone( a0 ) :
- sipCpp->GetSplittedZone( a0 );
- Py_END_ALLOW_THREADS
-
- sipRes = (HYDROData_Zone*)createPointer( aRefZone );
-
- %End
-
- /**
- * Returns all splitted zones of calculation case.
- */
- //HYDROData_SequenceOfObjects GetSplittedZones() const;
-
- /**
- * Removes all splitted refrence zone of calculation case.
+ * Removes all reference regions from calculation case.
*/
- void RemoveSplittedZones();
+ void RemoveRegions();
protected: