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
32 //#include <strstream>
46 #include <SALOMEconfig.h>
47 #include CORBA_CLIENT_HEADER(SUPERV)
49 #include "utilities.h"
52 extern char *SuperVision_Version ;
54 extern char *NULLSTRING ;
56 extern char *FACTORYSERVER ;
58 inline char * my_strdup( const char * s ) {
59 if (s == NULL) return NULL;
61 size_t l = strlen(s) + 1;
62 char * t = new char[l];
67 enum StatusOfPort { NotConnected , PortConnected , PortAndDataConnected ,
77 typedef vector<SCoord> ListOfCoords;
79 typedef string FuncName ;
81 typedef vector< FuncName > ListOfFuncName ;
83 typedef vector<const SUPERV::ListOfStrings *> ListOfPythonFunctions ;
85 struct NodeParameter {
86 SALOME_ModuleCatalog::ServicesParameter theInParameter ;
87 SALOME_ModuleCatalog::ServicesParameter theOutParameter ;
90 typedef vector<NodeParameter> ListOfParameters;
93 string theComponentName ;
94 string theInterfaceName ;
96 SUPERV::KindOfNode theKind ;
97 string theCoupledNode ;
98 SALOME_ModuleCatalog::Service theService ;
99 ListOfParameters theListOfParameters ;
100 ListOfFuncName theListOfFuncName ;
101 ListOfPythonFunctions theListOfPythonFunctions ;
102 SUPERV::SDate theFirstCreation ;
103 SUPERV::SDate theLastModification ;
104 string theEditorRelease ;
111 typedef vector<SNode> ListOfNodes;
113 struct ServicesData {
114 SALOME_ModuleCatalog::ServicesParameter aDataParameter ;
115 CORBA::Any aDataValue;
118 typedef vector<ServicesData> ListOfServicesData;
121 string FromNodeName ;
122 string FromServiceParameterName ;
124 string ToServiceParameterName ;
125 CORBA::Any aLinkValue;
126 ListOfCoords aListOfCoords ;
129 typedef vector<SLink> ListOfLinks;
138 typedef vector<SGraph> ListOfGraphs;
144 CORBA::ORB_ptr _Orb ;
154 void SetDebug( CORBA::ORB_ptr ORB ,
155 int * prof_debug , ofstream * fdebug ) ;
157 char * ObjectToString( CORBA::Object_ptr obj ) const ;
158 CORBA::Object_ptr StringToObject(char * obj ) const ;
163 // *GraphBase::Base::_fdebug << " " /*<< setw(3*(*GraphBase::Base::_prof_debug)) */<< " "
165 # define cdebug if ( GraphBase::Base::_fdebug ) *GraphBase::Base::_fdebug << " " << " "
167 # define cdebug_in if ( GraphBase::Base::_fdebug ) *GraphBase::Base::_fdebug << endl << "-->" << " "
169 # define cdebug_out if ( GraphBase::Base::_fdebug ) *GraphBase::Base::_fdebug << endl << "<--" << " "
173 # define cdebug while (false) std::cerr
174 # define cdebug_in cdebug
175 # define cdebug_out cdebug
176 # define debugFile(x)