Salome HOME
0e341765dbad95ccd52fd08905043779fffa0c59
[modules/superv.git] / src / GraphBase / DataFlowBase_InLineNode.hxx
1 //  SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
2 //
3 //  Copyright (C) 2003  CEA/DEN, EDF R&D
4 //
5 //
6 //
7 //  File   : DataFlowBase_InLineNode.hxx
8 //  Author : Jean Rahuel, CEA
9 //  Module : SUPERV
10 //  $Header:
11
12 #ifndef _DATAFLOWBASE_INLINENODE_HXX
13 #define _DATAFLOWBASE_INLINENODE_HXX
14
15 #include "Python.h"
16
17 #include "DataFlowBase_ComputingNode.hxx"
18
19 namespace GraphBase {
20
21   class InLineNode : public ComputingNode {
22
23     private:
24     
25       char                  * _FuncName ;
26       SUPERV::ListOfStrings   _PythonFunction ;
27       PyObject              * _MyPyRunMethod ;
28
29     public:
30
31       InLineNode() ;
32       InLineNode( CORBA::ORB_ptr ORB ,
33                   SALOME_NamingService* ptrNamingService ,
34                   const char * DataFlowName ,
35                   int * Graph_prof_debug = NULL ,
36                   ofstream * Graph_fdebug = NULL ) ;
37       InLineNode( CORBA::ORB_ptr ORB ,
38                   SALOME_NamingService* ptrNamingService ,
39                   const SALOME_ModuleCatalog::Service& NodeService ,
40                   const char *NodeName ,
41                   const SUPERV::KindOfNode akind ,
42                   const SUPERV::SDate NodeFirstCreation ,
43                   const SUPERV::SDate NodeLastModification ,
44                   const char * NodeEditorRelease ,
45                   const char * NodeAuthor ,
46                   const char * NodeComment ,
47                   const bool   GeneratedName ,
48                   const long   X ,
49                   const long   Y ,
50                   int * Graph_prof_debug = NULL ,
51                   ofstream * Graph_fdebug = NULL ) ;
52       InLineNode( CORBA::ORB_ptr ORB ,
53                   SALOME_NamingService* ptrNamingService ,
54                   const char * FuncName ,
55                   const SUPERV::ListOfStrings & aPythonFunction ,
56                   const char *NodeName ,
57                   const SUPERV::KindOfNode akind ,
58                   const SUPERV::SDate NodeFirstCreation ,
59                   const SUPERV::SDate NodeLastModification ,
60                   const char * NodeEditorRelease ,
61                   const char * NodeAuthor ,
62                   const char * NodeComment ,
63                   const bool   GeneratedName ,
64                   const long   X ,
65                   const long   Y ,
66                   int * Graph_prof_debug = NULL ,
67                   ofstream * Graph_fdebug = NULL ) ;
68       virtual ~InLineNode() ;
69
70       void SetPythonFunction( const char * FuncName ,
71                               const SUPERV::ListOfStrings & aPythonFunction ) ;
72       const SUPERV::ListOfStrings * PythonFunction() const {
73                     return &_PythonFunction ; } ;
74       char * PyFuncName() const {
75              return my_strdup( _FuncName ) ; } ;
76       void PyRunMethod( PyObject * MyPyRunMethod ) {
77            _MyPyRunMethod = MyPyRunMethod ; } ;
78       PyObject * PyRunMethod() {
79         return _MyPyRunMethod ;
80       }
81
82
83 //      bool SaveXML( ostream &f , char *Tabs ,
84       bool SaveXML( QDomDocument & Graph , QDomElement & info ,
85                     int XCoordinate , int YCoordinate ) const ;
86       bool SavePY( ostream &f , const char * aGraphName ,
87                    int XCoordinate , int YCoordinate ) const ;
88
89   };
90   
91 };
92
93 #endif