Salome HOME
SMH: 3.0.0 preparation = merged version (POLYWORK + RTVDEBUG01) + adopation for new GUI
[modules/superv.git] / src / GraphBase / DataFlowBase_FactoryNode.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_FactoryNode.hxx
8 //  Author : Jean Rahuel, CEA
9 //  Module : SUPERV
10 //  $Header:
11
12 #ifndef _DATAFLOWBASE_FACTORYNODE_HXX
13 #define _DATAFLOWBASE_FACTORYNODE_HXX
14
15 #include "DataFlowBase_ComputingNode.hxx"
16
17 namespace GraphBase {
18
19   class FactoryNode : public ComputingNode {
20
21     private:
22     
23       Engines::Container_var _Container ;
24       Engines::Component_var _ObjComponent ;
25
26       char *                 _ComponentName ;
27       char *                 _InterfaceName ;
28
29       char *                 _Computer ;
30
31     public:
32
33       FactoryNode() ;
34       FactoryNode( CORBA::ORB_ptr ORB ,
35             SALOME_NamingService* ptrNamingService ,
36             const char * DataFlowName ,
37             const SUPERV::KindOfNode DataFlowkind ,
38             int * Graph_prof_debug = NULL ,
39             ofstream * Graph_fdebug = NULL ) ;
40       FactoryNode( CORBA::ORB_ptr ORB ,
41             SALOME_NamingService* ptrNamingService ,
42             const SALOME_ModuleCatalog::Service& NodeService ,
43             const char *NodeComponentName ,
44             const char* NodeInterfaceName ,
45             const char *NodeName ,
46             const SUPERV::KindOfNode akind ,
47             const SUPERV::SDate NodeFirstCreation ,
48             const SUPERV::SDate NodeLastModification ,
49             const char * NodeEditorRelease ,
50             const char * NodeAuthor ,
51             const char * NodeComputer ,
52             const char * NodeComment ,
53             const bool   GeneratedName ,
54             const long   X ,
55             const long   Y ,
56             int * Graph_prof_debug = NULL ,
57             ofstream * Graph_fdebug = NULL ) ;
58       virtual ~FactoryNode() ;
59
60       Engines::Container_var Container() const { return _Container ; } ;
61       void SetContainer(Engines::Container_var aContainer) {
62                         _Container = aContainer ; } ;
63       Engines::Component_var Component() const { return _ObjComponent ; } ;
64       void SetComponent(Engines::Component_var anObjComponent) {
65                         _ObjComponent = anObjComponent ; } ;
66 //JR 17.02.2005 Memory Leak      char * ComponentName() const { return my_strdup( _ComponentName ) ; } ;
67       char * ComponentName() const { return _ComponentName ; } ;
68 //JR 17.02.2005 Memory Leak      char * InterfaceName() const { return my_strdup( _InterfaceName ) ; } ;
69       char * InterfaceName() const { return _InterfaceName ; } ;
70       char * Computer() const {
71 //             cdebug_in << "GraphBase::FactoryNode::Computer returns '" << _Computer << "'"
72 //                       << endl;
73 //JR 17.02.2005 Memory Leak             return my_strdup( _Computer ) ; } ;
74              return _Computer ; } ;
75
76       bool ComponentName( const char * aComponentName ) ;
77       bool InterfaceName( const char * anInterfaceName ) ;
78       bool Computer( const char *c ) ;
79
80 //      bool SaveXML( ostream &f , char *Tabs ,
81       bool SaveXML( QDomDocument & Graph , QDomElement & info ,
82                     int XCoordinate , int YCoordinate ) const ;
83       bool SavePY( ostream &f , const char * aGraphName ,
84                    int XCoordinate , int YCoordinate ) const ;
85
86   };
87   
88 };
89
90 #endif