]> SALOME platform Git repositories - modules/hydro.git/blob - src/HYDROData/HYDROData_Digue.cxx
Salome HOME
Create\Edit digue object implementation (Feature #192).
[modules/hydro.git] / src / HYDROData / HYDROData_Digue.cxx
1
2 #include "HYDROData_Digue.h"
3
4 #include "HYDROData_Document.h"
5
6 #include <TopoDS_Shape.hxx>
7
8 #include <QStringList>
9
10 #define PYTHON_DIGUE_ID "KIND_DIGUE"
11
12 IMPLEMENT_STANDARD_HANDLE(HYDROData_Digue,HYDROData_Channel)
13 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Digue,HYDROData_Channel)
14
15
16 HYDROData_Digue::HYDROData_Digue()
17 : HYDROData_Channel()
18 {
19 }
20
21 HYDROData_Digue::~HYDROData_Digue()
22 {
23 }
24
25 QStringList HYDROData_Digue::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
26 {
27   QStringList aResList;
28
29   Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
30   if ( aDocument.IsNull() )
31     return aResList;
32
33   QString aDocName = aDocument->GetDocPyName();
34   QString aDigueName = GetName();
35
36   aResList << QString( "%1 = %2.CreateObject( %3 );" )
37               .arg( aDigueName ).arg( aDocName ).arg( PYTHON_DIGUE_ID );
38   aResList << QString( "%1.SetName( \"%2\" );" )
39               .arg( aDigueName ).arg( aDigueName );
40   aResList << QString( "" );
41
42   // TODO
43
44   return aResList;
45 }
46
47
48