src/GraphBase/DataFlowBase_FactoryNode.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_FactoryNode.hxx
00023 //  Author : Jean Rahuel, CEA
00024 //  Module : SUPERV
00025 
00026 #ifndef _DATAFLOWBASE_FACTORYNODE_HXX
00027 #define _DATAFLOWBASE_FACTORYNODE_HXX
00028 
00029 #include "DataFlowBase_ComputingNode.hxx"
00030 
00031 namespace GraphBase {
00032 
00033   class FactoryNode : public ComputingNode {
00034 
00035     private:
00036     
00037       Engines::Container_var _Container ;
00038       Engines::Component_var _ObjComponent ;
00039 
00040       char *                 _ComponentName ;
00041       char *                 _InterfaceName ;
00042 
00043       char *                 _Computer ;
00044 
00045     public:
00046 
00047       FactoryNode() ;
00048       FactoryNode( CORBA::ORB_ptr ORB ,
00049             SALOME_NamingService* ptrNamingService ,
00050             const char * DataFlowName ,
00051             const SUPERV::KindOfNode DataFlowkind ,
00052             int * Graph_prof_debug = NULL ,
00053             ofstream * Graph_fdebug = NULL ) ;
00054       FactoryNode( CORBA::ORB_ptr ORB ,
00055             SALOME_NamingService* ptrNamingService ,
00056             const SALOME_ModuleCatalog::Service& NodeService ,
00057             const char *NodeComponentName ,
00058             const char* NodeInterfaceName ,
00059             const char *NodeName ,
00060             const SUPERV::KindOfNode akind ,
00061             const SUPERV::SDate NodeFirstCreation ,
00062             const SUPERV::SDate NodeLastModification ,
00063             const char * NodeEditorRelease ,
00064             const char * NodeAuthor ,
00065             const char * NodeComputer ,
00066             const char * NodeComment ,
00067             const bool   GeneratedName ,
00068             const long   X ,
00069             const long   Y ,
00070             int * Graph_prof_debug = NULL ,
00071             ofstream * Graph_fdebug = NULL ) ;
00072       virtual ~FactoryNode() ;
00073 
00074       Engines::Container_var Container() const { return _Container ; } ;
00075       void SetContainer(Engines::Container_var aContainer) {
00076                         _Container = aContainer ; } ;
00077       Engines::Component_var Component() const { return _ObjComponent ; } ;
00078       void SetComponent(Engines::Component_var anObjComponent) {
00079                         _ObjComponent = anObjComponent ; } ;
00080 //JR 17.02.2005 Memory Leak      char * ComponentName() const { return my_strdup( _ComponentName ) ; } ;
00081       char * ComponentName() const { return _ComponentName ; } ;
00082 //JR 17.02.2005 Memory Leak      char * InterfaceName() const { return my_strdup( _InterfaceName ) ; } ;
00083       char * InterfaceName() const { return _InterfaceName ; } ;
00084       char * Computer() const {
00085 //             cdebug_in << "GraphBase::FactoryNode::Computer returns '" << _Computer << "'"
00086 //                       << endl;
00087 //JR 17.02.2005 Memory Leak             return my_strdup( _Computer ) ; } ;
00088              return _Computer ; } ;
00089 
00090       bool ComponentName( const char * aComponentName ) ;
00091       bool InterfaceName( const char * anInterfaceName ) ;
00092       bool Computer( const char *c ) ;
00093 
00094 //      bool SaveXML( ostream &f , char *Tabs ,
00095       bool SaveXML( QDomDocument & Graph , QDomElement & info ,
00096                     int XCoordinate , int YCoordinate ) const ;
00097       bool SavePY( ostream &f , const char * aGraphName ,
00098                    int XCoordinate , int YCoordinate ) const ;
00099 
00100   };
00101   
00102 };
00103 
00104 #endif