]> SALOME platform Git repositories - modules/superv.git/blob - src/GraphEditor/DataFlowEditor_DataFlow.cxx
Salome HOME
NRI : Merge from 1.2c.
[modules/superv.git] / src / GraphEditor / DataFlowEditor_DataFlow.cxx
1 //  SUPERV GraphEditor : contains classes that permit edition of graphs
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : DataFlowEditor_DataFlow.cxx
25 //  Module : SUPERV
26
27 using namespace std;
28 #include "DataFlowEditor_DataFlow.hxx"
29
30 // Implementation de la classe GraphEditor::Graph
31
32 GraphEditor::DataFlow::DataFlow() :
33   OutNode() {
34   cdebug_in << "GraphEditor::DataFlow::DataFlowEditor()" << endl;
35
36   _theNamingService = NULL ;
37   _DataFlowExecutor = NULL ;
38   _ReadOnly  = false ;
39   _Executing = false ;
40
41   cdebug_out << "GraphEditor::DataFlow::DataFlowEditor()" << endl;
42 }
43
44 //extern ostream * fdebug ;
45
46 GraphEditor::DataFlow::DataFlow( CORBA::ORB_ptr ORB,
47                                  SALOME_NamingService* ptrNamingService ,
48                                  const char *DataFlowName ,
49                                  const char * DebugFileName ) :
50   OutNode( ORB, ptrNamingService , DataFlowName , DebugFileName ) {
51 //  cout << "GraphEditor::DataFlow::DataFlow(" ;
52   cdebug_in << "GraphEditor::DataFlow::DataFlow(" ;
53   if ( DataFlowName ) {
54 //    cout << DataFlowName << " , " << DebugFileName ;
55     cdebug << DataFlowName << " , " << DebugFileName;
56   }
57 //  cout << ")" << endl;
58   cdebug << ")" << endl;
59
60   _theNamingService = ptrNamingService ;
61   _DataFlowExecutor = NULL ;
62   _ReadOnly  = false ;
63   _Executing = false ;
64
65   cdebug_out << "GraphEditor::DataFlow::DataFlow" << endl;
66 //  fdebug = new ofstream( DebugFileName ); // GraphBase::Base::_fdebug ;
67 }
68
69 GraphEditor::DataFlow::DataFlow(
70                      CORBA::ORB_ptr ORB,
71                      SALOME_NamingService* ptrNamingService ,
72                      const SALOME_ModuleCatalog::Service& DataFlowService ,
73                      const char *DataFlowComponentName ,
74                      const char *DataFlowInterfaceName ,
75                      const char *DataFlowName ,
76                      const SUPERV::KindOfNode DataFlowkind ,
77                      const SUPERV::SDate DataFlowFirstCreation ,
78                      const SUPERV::SDate DataFlowLastModification ,
79                      const char * DataFlowEditorRelease ,
80                      const char * DataFlowAuthor ,
81                      const char * DataFlowComputer ,
82                      const char * DataFlowComment ,
83                      const char * DebugFileName ) :
84      OutNode( ORB, ptrNamingService , DataFlowService , DataFlowComponentName ,
85               DataFlowInterfaceName , DataFlowName , DataFlowkind ,
86               DataFlowFirstCreation , DataFlowLastModification  ,
87               DataFlowEditorRelease , DataFlowAuthor ,
88               DataFlowComputer , DataFlowComment , DebugFileName ) {
89   cdebug_in << "GraphEditor::DataFlow::DataFlow(" << DataFlowName << ")" << endl;
90
91   _theNamingService = ptrNamingService ;
92   _DataFlowExecutor = NULL ;
93   _ReadOnly  = false ;
94   _Executing = false ;
95
96   cdebug_out << "GraphEditor::DataFlow::DataFlow" << endl;
97 } ;
98
99 GraphEditor::DataFlow::~DataFlow() {
100 //  delete _DataFlowNode ;
101 //  delete _DataFlowDatas ;
102 //  delete _GT ;
103 }
104
105 #if 0
106 GraphExecutor::DataFlow * GraphEditor::DataFlow::Run() {
107   cdebug_in << "GraphEditor::DataFlow::Run" << endl;
108   SUPERV::SGraph * theDataFlow ;
109   GraphExecutor::DataFlow * aDataFlowExecutor ;
110   theDataFlow = GetDataFlow() ;
111   aDataFlowExecutor = new GraphExecutor::DataFlow( NamingService() ,
112                                                    theDataFlow->Info.theName ) ;
113   if ( aDataFlowExecutor->LoadDataFlow( *theDataFlow ) ) {
114     aDataFlowExecutor->Run() ;
115   }
116   else {
117     MESSAGE( "GraphEditor::DataFlow::Run error while loading DataFlowExecutor")
118     delete aDataFlowExecutor ;
119   }
120   cdebug_out << "GraphEditor::DataFlow::Run" << endl;
121   return aDataFlowExecutor ;
122 }
123 #endif
124