src/GraphBase/DataFlowBase_InLineNode.hxx

Go to the documentation of this file.
00001 //  SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
00002 //
00003 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
00005 // 
00006 //  This library is free software; you can redistribute it and/or 
00007 //  modify it under the terms of the GNU Lesser General Public 
00008 //  License as published by the Free Software Foundation; either 
00009 //  version 2.1 of the License. 
00010 // 
00011 //  This library is distributed in the hope that it will be useful, 
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00014 //  Lesser General Public License for more details. 
00015 // 
00016 //  You should have received a copy of the GNU Lesser General Public 
00017 //  License along with this library; if not, write to the Free Software 
00018 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
00019 // 
00020 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 //  File   : DataFlowBase_InLineNode.hxx
00023 //  Author : Jean Rahuel, CEA
00024 //  Module : SUPERV
00025 
00026 #ifndef _DATAFLOWBASE_INLINENODE_HXX
00027 #define _DATAFLOWBASE_INLINENODE_HXX
00028 
00029 #include "Python.h"
00030 
00031 #include "DataFlowBase_ComputingNode.hxx"
00032 
00033 namespace GraphBase {
00034 
00035   class InLineNode : public ComputingNode {
00036 
00037     private:
00038     
00039       char                  * _FuncName ;
00040       SUPERV::ListOfStrings   _PythonFunction ;
00041       PyObject              * _MyPyRunMethod ;
00042 
00043     public:
00044 
00045       InLineNode() ;
00046       InLineNode( CORBA::ORB_ptr ORB ,
00047                   SALOME_NamingService* ptrNamingService ,
00048                   const char * DataFlowName ,
00049                   const SUPERV::KindOfNode DataFlowkind ,
00050                   int * Graph_prof_debug ,
00051                   ofstream * Graph_fdebug ) ;
00052       InLineNode( CORBA::ORB_ptr ORB ,
00053                   SALOME_NamingService* ptrNamingService ,
00054                   const SALOME_ModuleCatalog::Service& NodeService ,
00055                   const char *NodeName ,
00056                   const SUPERV::KindOfNode akind ,
00057                   const SUPERV::SDate NodeFirstCreation ,
00058                   const SUPERV::SDate NodeLastModification ,
00059                   const char * NodeEditorRelease ,
00060                   const char * NodeAuthor ,
00061                   const char * NodeComment ,
00062                   const bool   GeneratedName ,
00063                   const long   X ,
00064                   const long   Y ,
00065                   int * Graph_prof_debug = NULL ,
00066                   ofstream * Graph_fdebug = NULL ) ;
00067       InLineNode( CORBA::ORB_ptr ORB ,
00068                   SALOME_NamingService* ptrNamingService ,
00069                   const char * FuncName ,
00070                   const SUPERV::ListOfStrings & aPythonFunction ,
00071                   const char *NodeName ,
00072                   const SUPERV::KindOfNode akind ,
00073                   const SUPERV::SDate NodeFirstCreation ,
00074                   const SUPERV::SDate NodeLastModification ,
00075                   const char * NodeEditorRelease ,
00076                   const char * NodeAuthor ,
00077                   const char * NodeComment ,
00078                   const bool   GeneratedName ,
00079                   const long   X ,
00080                   const long   Y ,
00081                   int * Graph_prof_debug = NULL ,
00082                   ofstream * Graph_fdebug = NULL ) ;
00083       virtual ~InLineNode() ;
00084 
00085       void SetPythonFunction( const char * FuncName ,
00086                               const SUPERV::ListOfStrings & aPythonFunction ) ;
00087       const SUPERV::ListOfStrings * PythonFunction() const {
00088                     return &_PythonFunction ; } ;
00089       char * PyFuncName() const {
00090 //JR 17.02.2005 Memory Leak             return my_strdup( _FuncName ) ; } ;
00091              return _FuncName ; } ;
00092       void PyRunMethod( PyObject * MyPyRunMethod ) {
00093            _MyPyRunMethod = MyPyRunMethod ; } ;
00094       PyObject * PyRunMethod() {
00095         return _MyPyRunMethod ; } ;
00096 
00097 
00098 //      bool SaveXML( ostream &f , char *Tabs ,
00099       bool SaveXML( QDomDocument & Graph , QDomElement & info ,
00100                     int XCoordinate , int YCoordinate ) const ;
00101       bool SavePY( ostream &f , const char * aGraphName ,
00102                    int XCoordinate , int YCoordinate ) const ;
00103 
00104   };
00105   
00106 };
00107 
00108 #endif