1 //=============================================================================
2 // File : DataFlowBase_DataNode.hxx
4 // Author : Jean Rahuel, CEA
7 //=============================================================================
9 #ifndef _DATAFLOWBASE_DATANODE_HXX
10 #define _DATAFLOWBASE_DATANODE_HXX
12 #include "DataFlowBase_InLineNode.hxx"
16 class DataNode : public InLineNode {
20 GraphBase::PortsOfNode * _DataFlowDataPorts ;
26 DataNode( CORBA::ORB_ptr ORB ,
27 SALOME_NamingService* ptrNamingService ,
28 const char *DataFlowName ) ;
29 DataNode( CORBA::ORB_ptr ORB ,
30 SALOME_NamingService* ptrNamingService ,
31 const SALOME_ModuleCatalog::Service& DataFlowService ,
32 const char *DataFlowName ,
33 const SUPERV::KindOfNode DataFlowkind ,
34 const SUPERV::SDate DataFlowFirstCreation ,
35 const SUPERV::SDate DataFlowLastModification ,
36 const char * DataFlowEditorRelease ,
37 const char * DataFlowAuthor ,
38 const char * DataFlowComment ) ;
41 void DataService( CORBA::ORB_ptr ORB ,
42 const SALOME_ModuleCatalog::Service aService ,
43 int * Graph_prof_debug ,
44 ostream * Graph_fdebug ) ;
46 int CheckDataServerNodes() const ;
48 // Mirrored methods of _DataFlowDataPorts of DataNode :
49 // GetIn... gives the Out which is the input of InPort of the DataFlow
50 // GetOut... gives the In which gets the output of OutPort of the DataFlow
51 const int GetNodeInDataNodePortsSize() const {
52 return _DataFlowDataPorts->GetNodeOutPortsSize() ; } ;
53 const OutPort *GetNodeInDataNodePort(int i) const {
54 return _DataFlowDataPorts->GetNodeOutPort( i ) ; } ;
55 OutPort *GetChangeNodeInDataNodePort(int i) const {
56 return _DataFlowDataPorts->GetChangeNodeOutPort( i ) ; } ;
57 const int GetNodeOutDataNodePortsSize() const {
58 return _DataFlowDataPorts->GetNodeInPortsSize() ; } ;
59 const InPort *GetNodeOutDataNodePort(int i) const {
60 return _DataFlowDataPorts->GetNodeInPort( i ) ; } ;
61 InPort *GetChangeNodeOutDataNodePort(int i) const {
62 return _DataFlowDataPorts->GetChangeNodeInPort( i ) ; } ;
64 OutPort * GetChangeInDataNodePort( const char * DataFlowInPortName ) {
65 return _DataFlowDataPorts->GetChangeOutPort( DataFlowInPortName ) ; } ;
66 InPort * GetChangeOutDataNodePort( const char * DataFlowOutPortName ) {
67 return _DataFlowDataPorts->GetChangeInPort( DataFlowOutPortName ) ; } ;
69 void DataNodeInfo(ostrstream & s ) const ;
71 void ListDatas(ostrstream & f) const ;
73 // bool SaveXML( ostream &f , char *Tabs ,
74 bool SaveXML( QDomDocument & Graph , QDomElement & info ,
75 int X , int Y ) const {
76 GraphBase::ListOfFuncName aFuncNames ;
77 aFuncNames.resize( 0 ) ;
78 GraphBase::ListOfPythonFunctions aVoidList ;
79 // return GraphBase::ComputingNode::SaveXML( f , Tabs , "" , "" , "" , "" ,
80 return GraphBase::ComputingNode::SaveXML( Graph , info , "" , "" , "" , "" ,
81 aFuncNames , aVoidList , X , Y ) ; } ;
83 bool SavePY( ostream &f , const char * aGraphName ,
84 int X , int Y ) const {
85 GraphBase::ListOfFuncName aFuncNames ;
86 aFuncNames.resize( 0 ) ;
87 GraphBase::ListOfPythonFunctions aVoidList ;
88 return GraphBase::ComputingNode::SavePY( f , aGraphName , "" , "" , "" , NULL ,
89 aFuncNames , aVoidList , X , Y ) ; } ;