]> SALOME platform Git repositories - modules/superv.git/blob - src/Supervision/Graph_Impl.hxx
Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/superv.git] / src / Supervision / Graph_Impl.hxx
1 //=============================================================================
2 // File      : Graph_Impl.hxx
3 // Created   : Nov 2001
4 // Author    : Jean Rahuel
5 // Project   : SALOME
6 // Copyright : CEA 2001
7 // $Header: 
8 //=============================================================================
9
10 #ifndef _GRAPH_IMPL_HXX_
11 #define _GRAPH_IMPL_HXX_
12
13 #include <iostream.h>
14
15 #include "CORBA.h"
16
17 #include <SALOMEconfig.h>
18 #include "SALOME_Component_i.hxx"
19 #include "SALOME_LifeCycleCORBA.hxx"
20
21 #include "Link_Impl.hxx"
22 #include "FNode_Impl.hxx"
23 #include "GNode_Impl.hxx"
24 #include "LNode_Impl.hxx"
25 #include "ELNode_Impl.hxx"
26 #include "SNode_Impl.hxx"
27 #include "ESNode_Impl.hxx"
28
29 #include "DataFlowEditor_DataFlow.hxx"
30 #include "DataFlowExecutor_DataFlow.hxx"
31
32 class Graph_Impl :public INode_Impl ,
33                   public POA_SUPERV::Graph {
34   private:
35
36     CORBA::ORB_ptr             _Orb ;
37     PortableServer::POA_ptr    _Poa ;
38     PortableServer::ObjectId * _ContId ;
39
40     SALOME_NamingService *     _NamingService ;
41     char * _DebugFileName ;
42
43     GraphExecutor::DataFlow *  _DataFlowExecutor ;
44
45     int                        _ExecNumber ;
46     SUPERV::Graph_var          myServant; // mpv 23.12.2002: store servant of graph to get constant IOR
47
48   public:
49     Graph_Impl();
50     Graph_Impl( CORBA::ORB_ptr orb ,
51                 PortableServer::POA_ptr poa ,
52                 PortableServer::ObjectId * contId , 
53                 const char *instanceName ,
54                 const char *interfaceName ,
55                 const char *aDataFlowName ) ;
56     virtual SUPERV::Graph_ptr Copy() ;
57
58     virtual ~Graph_Impl() ;
59     virtual void destroy() ;
60
61     virtual char* getIOR();
62
63     virtual void ReadOnly() ;
64
65     virtual SUPERV::INode_ptr GetNode() ;
66
67 //    virtual char * DataFlowInfo() ;
68 //    virtual char * DataNodeInfo() ;
69 //    virtual char * NodeInfo( const char * aNodeName ) ;
70
71     virtual GraphBase::SGraph * GetGraph() ;
72
73     virtual bool LoadGraph(const GraphBase::SGraph *aGraph ) ;
74     virtual bool Import(const char * aXmlFile ) ;
75
76     virtual bool Export(const char * aXmlFile ) ;
77
78 #if 0
79     virtual GraphBase::ListOfNodes * GetNodes() ;
80     virtual GraphBase::ListOfLinks * GetLinks() ;
81     virtual GraphBase::ListOfLinks * GetDatas() ;
82 #endif
83
84     virtual SUPERV::CNode_ptr CNode(
85                           const SALOME_ModuleCatalog::Service &NodeService ) ;
86     virtual SUPERV::FNode_ptr FNode(
87                           const char * NodeComponentName ,
88                           const char * InterfaceName ,
89                           const SALOME_ModuleCatalog::Service &NodeService ) ;
90     virtual SUPERV::INode_ptr INode(
91                           const char * FuncName ,
92                           const SUPERV::ListOfStrings & PythonFunction ) ;
93     virtual SUPERV::GNode_ptr GNode(
94                           const char * FuncName ,
95                           const SUPERV::ListOfStrings & PythonFunction ,
96                           const char * anInLineNode ) ;
97     virtual SUPERV::LNode_ptr LNode(
98                           const char * InitName ,
99                           const SUPERV::ListOfStrings & InitFunction ,
100                           const char * MoreName ,
101                           const SUPERV::ListOfStrings & MoreFunction ,
102                           const char * NextName ,
103                           const SUPERV::ListOfStrings & NextFunction ,
104                           SUPERV::INode_out anEndOfLoop ) ;
105     virtual SUPERV::SNode_ptr SNode(
106                           const char * FuncName ,
107                           const SUPERV::ListOfStrings & PythonFunction ,
108                           SUPERV::INode_out anEndOfSwitch ) ;
109
110     virtual SUPERV::CNode_ptr GetNode( const char * NodeName );
111
112     virtual SUPERV::Link_ptr Link( SUPERV::Port_ptr OutPort ,
113                                    SUPERV::Port_ptr InPort ) ;
114
115     virtual SUPERV::ListOfNodes_var Graph_Impl::SetNode( SUPERV::ListOfNodes_var RetVal ,
116                                       GraphBase::ComputingNode * aNode ) ;
117     virtual SUPERV::ListOfNodes * Nodes() ;
118     virtual SUPERV::ListOfLinks * GLinks() ;
119     virtual SUPERV::ListOfLinks * Links( GraphBase::ComputingNode * aNode ,
120                                          const char * anInputParam ) ;
121     virtual SUPERV::ListOfGraphs * Graphs() ;
122
123     virtual Engines::Component_ptr ComponentRef( const char * aComputerContainer ,
124                                                  const char * aComponentName ) ;
125
126     virtual bool IsValid() ;
127     virtual bool IsExecutable() ;
128     virtual bool IsDataFlow() ;
129
130     virtual bool IsEditing() ;
131     virtual bool IsExecuting() ;
132
133     virtual bool IsReadOnly() ;
134
135     virtual long LevelMax() ;
136     virtual SUPERV::ListOfNodes * LevelNodes(long aLevel ) ;
137     virtual long ThreadsMax() ;
138     virtual long GraphsNumber() ;
139     virtual long Threads() ;
140     virtual long SuspendedThreads() ;
141
142     virtual bool Begin() ;
143     virtual bool Run() ;
144     virtual bool Start() ;
145     virtual long LastLevelDone() ;
146
147     virtual bool EventNoW( SUPERV::CNode_out aNode ,
148                            SUPERV::GraphEvent & anEvent ,
149                            SUPERV::GraphState & aState ) ;
150     virtual bool Event( SUPERV::CNode_out aNode ,
151                         SUPERV::GraphEvent & anEvent ,
152                         SUPERV::GraphState & aState ) ;
153     virtual bool EventW( SUPERV::CNode_out aNode ,
154                          SUPERV::GraphEvent & anEvent ,
155                          SUPERV::GraphState & aState ) ;
156
157     virtual bool Merge(const SUPERV::Graph_ptr aGraph ) ;
158
159 };
160
161
162 #endif