]> SALOME platform Git repositories - modules/hydro.git/blob - src/HYDROData/HYDROData_Calculation.cxx
Salome HOME
Calculation object first implementation (Feature #10).
[modules/hydro.git] / src / HYDROData / HYDROData_Calculation.cxx
1
2 #include "HYDROData_Calculation.h"
3
4 #include "HYDROData_Document.h"
5
6 #include <QStringList>
7
8 #define PYTHON_BATHYMETRY_ID "KIND_CALCULATION"
9
10 IMPLEMENT_STANDARD_HANDLE(HYDROData_Calculation, HYDROData_Object)
11 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Calculation, HYDROData_Object)
12
13 HYDROData_Calculation::HYDROData_Calculation()
14 {
15 }
16
17 HYDROData_Calculation::~HYDROData_Calculation()
18 {
19 }
20
21 QStringList HYDROData_Calculation::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
22 {
23   QStringList aResList;
24
25   Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this );
26   if ( aDocument.IsNull() )
27     return aResList;
28                              
29   QString aDocName = aDocument->GetDocPyName();
30   QString aCalculName = GetName();
31
32   aResList << QString( "%1 = %2.CreateObject( %3 );" )
33               .arg( aCalculName ).arg( aDocName ).arg( PYTHON_BATHYMETRY_ID );
34   aResList << QString( "%1.SetName( \"%2\" );" )
35               .arg( aCalculName ).arg( aCalculName );
36
37   // TO_IMPLEMENT
38
39   return aResList;
40 }