1 // SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
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 : DataFlowBase_Base.hxx
25 // Author : Jean Rahuel, CEA
29 #ifndef _DATAFLOW_BASE_HXX
30 #define _DATAFLOW_BASE_HXX
45 #include <SALOMEconfig.h>
46 #include CORBA_CLIENT_HEADER(SUPERV)
48 #include "utilities.h"
51 #include "SALOME_NamingService.hxx"
53 extern char *SuperVision_Version ;
55 extern char *NULLSTRING ;
57 extern char *FACTORYSERVER ;
59 inline char * my_strdup( const char * s ) {
60 if (s == NULL) return NULL;
62 size_t l = strlen(s) + 1;
63 char * t = new char[l];
68 enum StatusOfPort { NotConnected , PortConnected , PortAndDataConnected ,
78 typedef vector<SCoord> ListOfCoords;
80 typedef string FuncName ;
82 typedef vector< FuncName > ListOfFuncName ;
84 typedef vector<const SUPERV::ListOfStrings *> ListOfPythonFunctions ;
86 struct NodeParameter {
87 SALOME_ModuleCatalog::ServicesParameter theInParameter ;
88 SALOME_ModuleCatalog::ServicesParameter theOutParameter ;
91 typedef vector<NodeParameter> ListOfParameters;
94 string theComponentName ;
95 string theInterfaceName ;
97 SUPERV::KindOfNode theKind ;
98 string theCoupledNode ;
99 SALOME_ModuleCatalog::Service theService ;
100 ListOfParameters theListOfParameters ;
101 ListOfFuncName theListOfFuncName ;
102 ListOfPythonFunctions theListOfPythonFunctions ;
103 SUPERV::SDate theFirstCreation ;
104 SUPERV::SDate theLastModification ;
105 string theEditorRelease ;
112 typedef vector<SNode> ListOfNodes;
114 struct ServicesData {
115 SALOME_ModuleCatalog::ServicesParameter aDataParameter ;
116 CORBA::Any aDataValue;
119 typedef vector<ServicesData> ListOfServicesData;
122 string FromNodeName ;
123 string FromServiceParameterName ;
125 string ToServiceParameterName ;
126 CORBA::Any aLinkValue;
127 ListOfCoords aListOfCoords ;
130 typedef vector<SLink> ListOfLinks;
139 typedef vector<SGraph> ListOfGraphs;
145 CORBA::ORB_ptr _Orb ;
155 void SetDebug( CORBA::ORB_ptr ORB ,
156 int * prof_debug , ostream * fdebug ) ;
158 char * ObjectToString( CORBA::Object_ptr obj ) const ;
159 CORBA::Object_ptr StringToObject(char * obj ) const ;
165 if ( GraphBase::Base::_prof_debug ) \
166 *GraphBase::Base::_fdebug << " " /*<< setw(3*(*GraphBase::Base::_prof_debug)) */<< " "
169 if ( GraphBase::Base::_prof_debug ) \
170 *GraphBase::Base::_fdebug << endl << "-->" /*<< setw(3*((*GraphBase::Base::_prof_debug)++)) */<< " "
172 # define cdebug_out \
173 if ( GraphBase::Base::_prof_debug ) \
174 *GraphBase::Base::_fdebug << endl << "<--" /*<< setw(3*(--(*GraphBase::Base::_prof_debug)))*/ << " "
177 # define cdebug while (false) std::cerr
178 # define cdebug_in cdebug
179 # define cdebug_out cdebug
180 # define debugFile(x)