#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 regions for calculation case.
- */
- int NbRegions() const;
-
- /**
- * Add new one region for calculation case.
+ * Add new one reference region for calculation case.
*/
void AddRegion( HYDROData_Region theRegion ) [void (const Handle_HYDROData_Region&)];
%MethodCode
%End
/**
- * Replace the region for calculation case.
+ * Returns all reference regions of calculation case.
+ */
+ //void HYDROData_SequenceOfObjects GetRegions() const;
+
+ /**
+ * Removes reference region from calculation case.
*/
- void SetRegion( const int theIndex,
- HYDROData_Region theRegion ) [void (const int, const Handle_HYDROData_Region&)];
+ void RemoveRegion( HYDROData_Region theRegion ) [void (const Handle_HYDROData_Region&)];
%MethodCode
Handle(HYDROData_Region) aRegion =
- Handle(HYDROData_Region)::DownCast( createHandle( a1 ) );
+ Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
if ( !aRegion.IsNull() )
{
Py_BEGIN_ALLOW_THREADS
- sipSelfWasArg ? sipCpp->HYDROData_Calculation::SetRegion( a0, aRegion ) :
- sipCpp->SetRegion( a0, aRegion );
+ sipSelfWasArg ? sipCpp->HYDROData_Calculation::RemoveRegion( aRegion ) :
+ sipCpp->RemoveRegion( aRegion );
Py_END_ALLOW_THREADS
}
%End
/**
- * Sets the refrence region for calculation case.
- */
- //void SetRegions( const HYDROData_SequenceOfObjects& theRegions );
-
- /**
- * Returns region of calculation case by index.
- */
- HYDROData_Region GetRegion( const int theIndex ) const [Handle_HYDROData_Region (const int)];
- %MethodCode
-
- Handle(HYDROData_Region) aRegion;
-
- Py_BEGIN_ALLOW_THREADS
- aRegion = sipSelfWasArg ? sipCpp->HYDROData_Calculation::GetRegion( a0 ) :
- sipCpp->GetRegion( a0 );
- Py_END_ALLOW_THREADS
-
- sipRes = (HYDROData_Region*)createPointer( aRegion );
-
- %End
-
- /**
- * Returns all regions of calculation case.
- */
- //HYDROData_SequenceOfObjects GetRegions() const;
-
- /**
- * Removes all regions of calculation case.
+ * Removes all reference regions from calculation case.
*/
void RemoveRegions();