X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_CalculationCase.sip;h=7a2eeeafb60b8e821d1e2396c1c7ae10c532a19f;hb=27b1abdc88719c5bce7a8d2f49612cd155e80d21;hp=48a257f9c9a568a55d9a52c999fb98d4a72d4d75;hpb=ea116c29ba9e987172ad9befad3c607ef6bfe968;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_CalculationCase.sip b/src/HYDROPy/HYDROData_CalculationCase.sip index 48a257f9..7a2eeeaf 100644 --- a/src/HYDROPy/HYDROData_CalculationCase.sip +++ b/src/HYDROPy/HYDROData_CalculationCase.sip @@ -1,12 +1,8 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2014-2015 EDF-R&D // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,8 +18,15 @@ %ExportedHeaderCode #include +#include %End +enum HYDROData_PriorityType +{ + LESS, + GREATER, +}; + class HYDROData_CalculationCase : public HYDROData_Entity { @@ -53,6 +56,31 @@ public: POINT_ON ///< point is on the edge of zone face }; + enum AssignmentMode + { + MANUAL = 0, + AUTOMATIC, + }; + +public: + + enum DataTag + { + DataTag_First = 100, ///< first tag, to reserve + DataTag_GeometryObject, ///< reference geometry objects + DataTag_ChildRegion, ///< child regions + DataTag_Region, ///< reference regions + DataTag_Polyline, ///< reference boundary polyline + DataTag_GeometryGroup, ///< reference geometry groups + DataTag_SplittedGroups, ///< reference splitted groups + DataTag_CustomRules, ///< custom rules + DataTag_AssignmentMode, ///< assignment mode + DataTag_StricklerTable, ///< reference Strickler table + DataTag_LandCover, ///< reference land covers + DataTag_CustomLandCoverRules, ///< custom rules for land covers priority + DataTag_AssignmentLandCoverMode ///< assignment mode of land covers priority + }; + public: /** * Add new one reference geometry object for calculation case. @@ -280,6 +308,8 @@ public: */ //TODO: virtual bool Export( GEOM::GEOM_Gen_var theGeomEngine, // SALOMEDS::Study_ptr theStudy ); + + QString Export( int theStudyId ) const; public: // Public methods to work with Calculation services @@ -472,6 +502,32 @@ public: Py_END_ALLOW_THREADS %End + + void ClearRules( HYDROData_CalculationCase::DataTag theDataTag ); + + void AddRule( HYDROData_Entity theObject1, + HYDROData_PriorityType thePriority, + HYDROData_Entity theObject2, + HYDROData_Zone::MergeAltitudesType theMergeType, + HYDROData_CalculationCase::DataTag theDataTag ) + [void ( const Handle_HYDROData_Entity&, HYDROData_PriorityType, const Handle_HYDROData_Entity&, HYDROData_Zone::MergeAltitudesType, HYDROData_CalculationCase::DataTag )]; + %MethodCode + Handle(HYDROData_Entity) anObject1 = + Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) ); + Handle(HYDROData_Entity) anObject2 = + Handle(HYDROData_Entity)::DownCast( createHandle( a2 ) ); + + Py_BEGIN_ALLOW_THREADS + sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddRule( anObject1, a1, anObject2, a3, a4 ) : + sipCpp->AddRule( anObject1, a1, anObject2, a3, a4 ); + Py_END_ALLOW_THREADS + %End + + QString DumpRules(); + + void SetAssignmentMode( AssignmentMode theMode ); + AssignmentMode GetAssignmentMode() const; + protected: /**