Salome HOME
NRI : First integration.
[modules/superv.git] / src / GraphEditor / DataFlowEditor_DataFlow.cxx
1 using namespace std;
2
3 #include "DataFlowEditor_DataFlow.hxx"
4
5 // Implementation de la classe GraphEditor::Graph
6
7 GraphEditor::DataFlow::DataFlow() :
8   OutNode() {
9   cdebug_in << "GraphEditor::DataFlow::DataFlowEditor()" << endl;
10
11   _theNamingService = NULL ;
12   _DataFlowExecutor = NULL ;
13   _ReadOnly  = false ;
14   _Executing = false ;
15
16   cdebug_out << "GraphEditor::DataFlow::DataFlowEditor()" << endl;
17 }
18
19 GraphEditor::DataFlow::DataFlow( CORBA::ORB_ptr ORB,
20                                  SALOME_NamingService* ptrNamingService ,
21                                  const char *DataFlowName ,
22                                  const char * DebugFileName ) :
23   OutNode( ORB, ptrNamingService , DataFlowName , DebugFileName ) {
24   cdebug_in << "GraphEditor::DataFlow::DataFlow(" ;
25   if ( DataFlowName ) {
26     cdebug << DataFlowName ;
27   }
28   cdebug << ")" << endl;
29
30   _theNamingService = ptrNamingService ;
31   _DataFlowExecutor = NULL ;
32   _ReadOnly  = false ;
33   _Executing = false ;
34
35   cdebug_out << "GraphEditor::DataFlow::DataFlow" << endl;
36 }
37
38 GraphEditor::DataFlow::DataFlow(
39                      CORBA::ORB_ptr ORB,
40                      SALOME_NamingService* ptrNamingService ,
41                      const SALOME_ModuleCatalog::Service& DataFlowService ,
42                      const char *DataFlowComponentName ,
43                      const char *DataFlowInterfaceName ,
44                      const char *DataFlowName ,
45                      const SUPERV::KindOfNode DataFlowkind ,
46                      const SUPERV::SDate DataFlowFirstCreation ,
47                      const SUPERV::SDate DataFlowLastModification ,
48                      const char * DataFlowEditorRelease ,
49                      const char * DataFlowAuthor ,
50                      const char * DataFlowComputer ,
51                      const char * DataFlowComment ,
52                      const char * DebugFileName ) :
53      OutNode( ORB, ptrNamingService , DataFlowService , DataFlowComponentName ,
54               DataFlowInterfaceName , DataFlowName , DataFlowkind ,
55               DataFlowFirstCreation , DataFlowLastModification  ,
56               DataFlowEditorRelease , DataFlowAuthor ,
57               DataFlowComputer , DataFlowComment , DebugFileName ) {
58   cdebug_in << "GraphEditor::DataFlow::DataFlow(" << DataFlowName << ")" << endl;
59
60   _theNamingService = ptrNamingService ;
61   _DataFlowExecutor = NULL ;
62   _ReadOnly  = false ;
63   _Executing = false ;
64
65   cdebug_out << "GraphEditor::DataFlow::DataFlow" << endl;
66 } ;
67
68 GraphEditor::DataFlow::~DataFlow() {
69 //  delete _DataFlowNode ;
70 //  delete _DataFlowDatas ;
71 //  delete _GT ;
72 }
73
74 #if 0
75 GraphExecutor::DataFlow * GraphEditor::DataFlow::Run() {
76   cdebug_in << "GraphEditor::DataFlow::Run" << endl;
77   SUPERV::SGraph * theDataFlow ;
78   GraphExecutor::DataFlow * aDataFlowExecutor ;
79   theDataFlow = GetDataFlow() ;
80   aDataFlowExecutor = new GraphExecutor::DataFlow( NamingService() ,
81                                                    theDataFlow->Info.theName ) ;
82   if ( aDataFlowExecutor->LoadDataFlow( *theDataFlow ) ) {
83     aDataFlowExecutor->Run() ;
84   }
85   else {
86     MESSAGE( "GraphEditor::DataFlow::Run error while loading DataFlowExecutor")
87     delete aDataFlowExecutor ;
88   }
89   cdebug_out << "GraphEditor::DataFlow::Run" << endl;
90   return aDataFlowExecutor ;
91 }
92 #endif
93