]> SALOME platform Git repositories - modules/superv.git/blob - src/GraphBase/DataFlowBase_DataNode.hxx
Salome HOME
10509ef6eaf771aee849c6cc6e199c44a10daa3f
[modules/superv.git] / src / GraphBase / DataFlowBase_DataNode.hxx
1 //=============================================================================
2 // File      : DataFlowBase_DataNode.hxx
3 // Created   : 2002
4 // Author    : Jean Rahuel, CEA
5 // Project   : SALOME
6 // $Header:
7 //=============================================================================
8
9 #ifndef _DATAFLOWBASE_DATANODE_HXX
10 #define _DATAFLOWBASE_DATANODE_HXX
11
12 #include "DataFlowBase_InLineNode.hxx"
13
14 namespace GraphBase {
15
16   class DataNode : public InLineNode {
17
18     private:
19
20       GraphBase::PortsOfNode * _DataFlowDataPorts ;
21       bool                     _Created ;
22
23     public:
24
25       DataNode() ;
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 ) ;
39       virtual ~DataNode() ;
40
41       void DataService( CORBA::ORB_ptr ORB ,
42                         const SALOME_ModuleCatalog::Service aService ,
43                         int * Graph_prof_debug ,
44                         ostream * Graph_fdebug ) ;
45
46       int CheckDataServerNodes() const ;
47
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 ) ; } ;
63
64       OutPort * GetChangeInDataNodePort( const char * DataFlowInPortName ) {
65                 return _DataFlowDataPorts->GetChangeOutPort( DataFlowInPortName ) ; } ;
66       InPort * GetChangeOutDataNodePort( const char * DataFlowOutPortName ) {
67                return _DataFlowDataPorts->GetChangeInPort( DataFlowOutPortName ) ; } ;
68
69       void DataNodeInfo(ostrstream & s ) const ;
70
71       void ListDatas(ostrstream & f) const ;
72
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 ) ; } ;
82
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 ) ; } ;
90   } ;
91
92 } ;
93
94 #endif