Salome HOME
sources v1.2
[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             int * Graph_prof_debug = NULL ,
38             ostream * Graph_fdebug = NULL ) ;
39       FactoryNode( CORBA::ORB_ptr ORB ,
40             SALOME_NamingService* ptrNamingService ,
41             const SALOME_ModuleCatalog::Service& NodeService ,
42             const char *NodeComponentName ,
43             const char* NodeInterfaceName ,
44             const char *NodeName ,
45             const SUPERV::KindOfNode akind ,
46             const SUPERV::SDate NodeFirstCreation ,
47             const SUPERV::SDate NodeLastModification ,
48             const char * NodeEditorRelease ,
49             const char * NodeAuthor ,
50             const char * NodeComputer ,
51             const char * NodeComment ,
52             const bool   GeneratedName ,
53             const long   X ,
54             const long   Y ,
55             int * Graph_prof_debug = NULL ,
56             ostream * Graph_fdebug = NULL ) ;
57       virtual ~FactoryNode() ;
58
59       Engines::Container_var Container() const { return _Container ; } ;
60       void SetContainer(Engines::Container_var aContainer) {
61                         _Container = aContainer ; } ;
62       Engines::Component_var Component() const { return _ObjComponent ; } ;
63       void SetComponent(Engines::Component_var anObjComponent) {
64                         _ObjComponent = anObjComponent ; } ;
65       char * ComponentName() const { return my_strdup( _ComponentName ) ; } ;
66       char * InterfaceName() const { return my_strdup( _InterfaceName ) ; } ;
67       char * Computer() const {
68 //             cdebug_in << "GraphBase::FactoryNode::Computer returns '" << _Computer << "'"
69 //                       << endl;
70              return my_strdup( _Computer ) ; } ;
71
72       bool ComponentName( const char * aComponentName ) ;
73       bool InterfaceName( const char * anInterfaceName ) ;
74       bool Computer( const char *c ) ;
75
76 //      bool SaveXML( ostream &f , char *Tabs ,
77       bool SaveXML( QDomDocument & Graph , QDomElement & info ,
78                     int XCoordinate , int YCoordinate ) const ;
79       bool SavePY( ostream &f , const char * aGraphName ,
80                    int XCoordinate , int YCoordinate ) const ;
81
82   };
83   
84 };
85
86 #endif