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_DataNode.hxx
25 // Author : Jean Rahuel, CEA
29 #ifndef _DATAFLOWBASE_DATANODE_HXX
30 #define _DATAFLOWBASE_DATANODE_HXX
32 #include "DataFlowBase_InLineNode.hxx"
36 class DataNode : public InLineNode {
44 GraphBase::PortsOfNode * _DataFlowDataPorts ;
49 DataNode( CORBA::ORB_ptr ORB ,
50 SALOME_NamingService* ptrNamingService ,
51 const char *DataFlowName ) ;
52 DataNode( CORBA::ORB_ptr ORB ,
53 SALOME_NamingService* ptrNamingService ,
54 const SALOME_ModuleCatalog::Service& DataFlowService ,
55 const char *DataFlowName ,
56 const SUPERV::KindOfNode DataFlowkind ,
57 const SUPERV::SDate DataFlowFirstCreation ,
58 const SUPERV::SDate DataFlowLastModification ,
59 const char * DataFlowEditorRelease ,
60 const char * DataFlowAuthor ,
61 const char * DataFlowComment ) ;
64 void DataService( CORBA::ORB_ptr ORB ,
65 const SALOME_ModuleCatalog::Service aService ,
66 int * Graph_prof_debug ,
67 ofstream * Graph_fdebug ) ;
69 int CheckDataServerNodes() const ;
71 // Mirrored methods of _DataFlowDataPorts of DataNode :
72 // GetIn... gives the Out which is the input of InPort of the DataFlow
73 // GetOut... gives the In which gets the output of OutPort of the DataFlow
74 const int GetNodeInDataNodePortsSize() const {
75 return _DataFlowDataPorts->GetNodeOutPortsSize() ; } ;
76 const OutPort *GetNodeInDataNodePort(int i) const {
77 return _DataFlowDataPorts->GetNodeOutPort( i ) ; } ;
78 OutPort *GetChangeNodeInDataNodePort(int i) const {
79 return _DataFlowDataPorts->GetChangeNodeOutPort( i ) ; } ;
80 const int GetNodeOutDataNodePortsSize() const {
81 return _DataFlowDataPorts->GetNodeInPortsSize() ; } ;
82 const InPort *GetNodeOutDataNodePort(int i) const {
83 return _DataFlowDataPorts->GetNodeInPort( i ) ; } ;
84 InPort *GetChangeNodeOutDataNodePort(int i) const {
85 return _DataFlowDataPorts->GetChangeNodeInPort( i ) ; } ;
87 OutPort * GetChangeInDataNodePort( const char * DataFlowInPortName ) {
88 return _DataFlowDataPorts->GetChangeOutPort( DataFlowInPortName ) ; } ;
89 InPort * GetChangeOutDataNodePort( const char * DataFlowOutPortName ) {
90 return _DataFlowDataPorts->GetChangeInPort( DataFlowOutPortName ) ; } ;
92 void DataNodeInfo(ostream & s ) const ;
94 void ListDatas(ostream & f) const ;
96 // bool SaveXML( ostream &f , char *Tabs ,
97 bool SaveXML( QDomDocument & Graph , QDomElement & info ,
98 int X , int Y ) const {
99 GraphBase::ListOfFuncName aFuncNames ;
100 aFuncNames.resize( 0 ) ;
101 GraphBase::ListOfPythonFunctions aVoidList ;
102 // return GraphBase::ComputingNode::SaveXML( f , Tabs , "" , "" , "" , "" ,
103 return GraphBase::ComputingNode::SaveXML( Graph , info , "" , "" , "" , "" ,
104 aFuncNames , aVoidList , X , Y ) ; } ;
106 bool SavePY( ostream &f , const char * aGraphName ,
107 int X , int Y ) const {
108 GraphBase::ListOfFuncName aFuncNames ;
109 aFuncNames.resize( 0 ) ;
110 GraphBase::ListOfPythonFunctions aVoidList ;
111 return GraphBase::ComputingNode::SavePY( f , aGraphName , "" , "" , "" , NULL ,
112 aFuncNames , aVoidList , X , Y ) ; } ;