Salome HOME
d3fdfa31bdf5451139025b30fe88987e5e2f2a1d
[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                   const SUPERV::KindOfNode DataFlowkind ,
36                   int * Graph_prof_debug ,
37                   ofstream * Graph_fdebug ) ;
38       InLineNode( CORBA::ORB_ptr ORB ,
39                   SALOME_NamingService* ptrNamingService ,
40                   const SALOME_ModuleCatalog::Service& NodeService ,
41                   const char *NodeName ,
42                   const SUPERV::KindOfNode akind ,
43                   const SUPERV::SDate NodeFirstCreation ,
44                   const SUPERV::SDate NodeLastModification ,
45                   const char * NodeEditorRelease ,
46                   const char * NodeAuthor ,
47                   const char * NodeComment ,
48                   const bool   GeneratedName ,
49                   const long   X ,
50                   const long   Y ,
51                   int * Graph_prof_debug = NULL ,
52                   ofstream * Graph_fdebug = NULL ) ;
53       InLineNode( CORBA::ORB_ptr ORB ,
54                   SALOME_NamingService* ptrNamingService ,
55                   const char * FuncName ,
56                   const SUPERV::ListOfStrings & aPythonFunction ,
57                   const char *NodeName ,
58                   const SUPERV::KindOfNode akind ,
59                   const SUPERV::SDate NodeFirstCreation ,
60                   const SUPERV::SDate NodeLastModification ,
61                   const char * NodeEditorRelease ,
62                   const char * NodeAuthor ,
63                   const char * NodeComment ,
64                   const bool   GeneratedName ,
65                   const long   X ,
66                   const long   Y ,
67                   int * Graph_prof_debug = NULL ,
68                   ofstream * Graph_fdebug = NULL ) ;
69       virtual ~InLineNode() ;
70
71       void SetPythonFunction( const char * FuncName ,
72                               const SUPERV::ListOfStrings & aPythonFunction ) ;
73       const SUPERV::ListOfStrings * PythonFunction() const {
74                     return &_PythonFunction ; } ;
75       char * PyFuncName() const {
76 //JR 17.02.2005 Memory Leak             return my_strdup( _FuncName ) ; } ;
77              return _FuncName ; } ;
78       void PyRunMethod( PyObject * MyPyRunMethod ) {
79            _MyPyRunMethod = MyPyRunMethod ; } ;
80       PyObject * PyRunMethod() {
81         return _MyPyRunMethod ; } ;
82
83
84 //      bool SaveXML( ostream &f , char *Tabs ,
85       bool SaveXML( QDomDocument & Graph , QDomElement & info ,
86                     int XCoordinate , int YCoordinate ) const ;
87       bool SavePY( ostream &f , const char * aGraphName ,
88                    int XCoordinate , int YCoordinate ) const ;
89
90   };
91   
92 };
93
94 #endif