1 // SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : DataFlowBase_FactoryNode.hxx
23 // Author : Jean Rahuel, CEA
26 #ifndef _DATAFLOWBASE_FACTORYNODE_HXX
27 #define _DATAFLOWBASE_FACTORYNODE_HXX
29 #include "DataFlowBase_ComputingNode.hxx"
33 class FactoryNode : public ComputingNode {
37 Engines::Container_var _Container ;
38 Engines::Component_var _ObjComponent ;
40 char * _ComponentName ;
41 char * _InterfaceName ;
48 FactoryNode( CORBA::ORB_ptr ORB ,
49 SALOME_NamingService* ptrNamingService ,
50 const char * DataFlowName ,
51 const SUPERV::KindOfNode DataFlowkind ,
52 int * Graph_prof_debug = NULL ,
53 ofstream * Graph_fdebug = NULL ) ;
54 FactoryNode( CORBA::ORB_ptr ORB ,
55 SALOME_NamingService* ptrNamingService ,
56 const SALOME_ModuleCatalog::Service& NodeService ,
57 const char *NodeComponentName ,
58 const char* NodeInterfaceName ,
59 const char *NodeName ,
60 const SUPERV::KindOfNode akind ,
61 const SUPERV::SDate NodeFirstCreation ,
62 const SUPERV::SDate NodeLastModification ,
63 const char * NodeEditorRelease ,
64 const char * NodeAuthor ,
65 const char * NodeComputer ,
66 const char * NodeComment ,
67 const bool GeneratedName ,
70 int * Graph_prof_debug = NULL ,
71 ofstream * Graph_fdebug = NULL ) ;
72 virtual ~FactoryNode() ;
74 Engines::Container_var Container() const { return _Container ; } ;
75 void SetContainer(Engines::Container_var aContainer) {
76 _Container = aContainer ; } ;
77 Engines::Component_var Component() const { return _ObjComponent ; } ;
78 void SetComponent(Engines::Component_var anObjComponent) {
79 _ObjComponent = anObjComponent ; } ;
80 //JR 17.02.2005 Memory Leak char * ComponentName() const { return my_strdup( _ComponentName ) ; } ;
81 char * ComponentName() const { return _ComponentName ; } ;
82 //JR 17.02.2005 Memory Leak char * InterfaceName() const { return my_strdup( _InterfaceName ) ; } ;
83 char * InterfaceName() const { return _InterfaceName ; } ;
84 char * Computer() const {
85 // cdebug_in << "GraphBase::FactoryNode::Computer returns '" << _Computer << "'"
87 //JR 17.02.2005 Memory Leak return my_strdup( _Computer ) ; } ;
88 return _Computer ; } ;
90 bool ComponentName( const char * aComponentName ) ;
91 bool InterfaceName( const char * anInterfaceName ) ;
92 bool Computer( const char *c ) ;
94 // bool SaveXML( ostream &f , char *Tabs ,
95 bool SaveXML( QDomDocument & Graph , QDomElement & info ,
96 int XCoordinate , int YCoordinate ) const ;
97 bool SavePY( ostream &f , const char * aGraphName ,
98 int XCoordinate , int YCoordinate ) const ;