1 // SUPERV GraphEditor : contains classes that permit edition of graphs
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : DataFlowEditor_DataFlow.cxx
28 #include "DataFlowEditor_DataFlow.hxx"
30 // Implementation de la classe GraphEditor::Graph
32 GraphEditor::DataFlow::DataFlow() :
34 cdebug_in << "GraphEditor::DataFlow::DataFlowEditor()" << endl;
36 _theNamingService = NULL ;
37 _DataFlowExecutor = NULL ;
41 cdebug_out << "GraphEditor::DataFlow::DataFlowEditor()" << endl;
44 GraphEditor::DataFlow::DataFlow( CORBA::ORB_ptr ORB,
45 SALOME_NamingService* ptrNamingService ,
46 const char *DataFlowName ,
47 const char * DebugFileName ) :
48 OutNode( ORB, ptrNamingService , DataFlowName , DebugFileName ) {
49 cdebug_in << "GraphEditor::DataFlow::DataFlow(" ;
51 cdebug << DataFlowName ;
53 cdebug << ")" << endl;
55 _theNamingService = ptrNamingService ;
56 _DataFlowExecutor = NULL ;
60 cdebug_out << "GraphEditor::DataFlow::DataFlow" << endl;
63 GraphEditor::DataFlow::DataFlow(
65 SALOME_NamingService* ptrNamingService ,
66 const SALOME_ModuleCatalog::Service& DataFlowService ,
67 const char *DataFlowComponentName ,
68 const char *DataFlowInterfaceName ,
69 const char *DataFlowName ,
70 const SUPERV::KindOfNode DataFlowkind ,
71 const SUPERV::SDate DataFlowFirstCreation ,
72 const SUPERV::SDate DataFlowLastModification ,
73 const char * DataFlowEditorRelease ,
74 const char * DataFlowAuthor ,
75 const char * DataFlowComputer ,
76 const char * DataFlowComment ,
77 const char * DebugFileName ) :
78 OutNode( ORB, ptrNamingService , DataFlowService , DataFlowComponentName ,
79 DataFlowInterfaceName , DataFlowName , DataFlowkind ,
80 DataFlowFirstCreation , DataFlowLastModification ,
81 DataFlowEditorRelease , DataFlowAuthor ,
82 DataFlowComputer , DataFlowComment , DebugFileName ) {
83 cdebug_in << "GraphEditor::DataFlow::DataFlow(" << DataFlowName << ")" << endl;
85 _theNamingService = ptrNamingService ;
86 _DataFlowExecutor = NULL ;
90 cdebug_out << "GraphEditor::DataFlow::DataFlow" << endl;
93 GraphEditor::DataFlow::~DataFlow() {
94 // delete _DataFlowNode ;
95 // delete _DataFlowDatas ;
100 GraphExecutor::DataFlow * GraphEditor::DataFlow::Run() {
101 cdebug_in << "GraphEditor::DataFlow::Run" << endl;
102 SUPERV::SGraph * theDataFlow ;
103 GraphExecutor::DataFlow * aDataFlowExecutor ;
104 theDataFlow = GetDataFlow() ;
105 aDataFlowExecutor = new GraphExecutor::DataFlow( NamingService() ,
106 theDataFlow->Info.theName ) ;
107 if ( aDataFlowExecutor->LoadDataFlow( *theDataFlow ) ) {
108 aDataFlowExecutor->Run() ;
111 MESSAGE( "GraphEditor::DataFlow::Run error while loading DataFlowExecutor")
112 delete aDataFlowExecutor ;
114 cdebug_out << "GraphEditor::DataFlow::Run" << endl;
115 return aDataFlowExecutor ;