1 //=============================================================================
2 // File : Graph_Impl.hxx
4 // Author : Jean Rahuel
6 // Copyright : CEA 2001
8 //=============================================================================
10 #ifndef _GRAPH_IMPL_HXX_
11 #define _GRAPH_IMPL_HXX_
17 #include <SALOMEconfig.h>
18 #include "SALOME_Component_i.hxx"
19 #include "SALOME_LifeCycleCORBA.hxx"
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"
29 #include "DataFlowEditor_DataFlow.hxx"
30 #include "DataFlowExecutor_DataFlow.hxx"
32 class Graph_Impl :public INode_Impl ,
33 public POA_SUPERV::Graph {
37 PortableServer::POA_ptr _Poa ;
38 PortableServer::ObjectId * _ContId ;
40 SALOME_NamingService * _NamingService ;
41 char * _DebugFileName ;
43 GraphExecutor::DataFlow * _DataFlowExecutor ;
46 SUPERV::Graph_var myServant; // mpv 23.12.2002: store servant of graph to get constant IOR
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() ;
58 virtual ~Graph_Impl() ;
59 virtual void destroy() ;
61 virtual char* getIOR();
63 virtual void ReadOnly() ;
65 virtual SUPERV::INode_ptr GetNode() ;
67 // virtual char * DataFlowInfo() ;
68 // virtual char * DataNodeInfo() ;
69 // virtual char * NodeInfo( const char * aNodeName ) ;
71 virtual GraphBase::SGraph * GetGraph() ;
73 virtual bool LoadGraph(const GraphBase::SGraph *aGraph ) ;
74 virtual bool Import(const char * aXmlFile ) ;
76 virtual bool Export(const char * aXmlFile ) ;
79 virtual GraphBase::ListOfNodes * GetNodes() ;
80 virtual GraphBase::ListOfLinks * GetLinks() ;
81 virtual GraphBase::ListOfLinks * GetDatas() ;
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 ) ;
110 virtual SUPERV::CNode_ptr GetNode( const char * NodeName );
112 virtual SUPERV::Link_ptr Link( SUPERV::Port_ptr OutPort ,
113 SUPERV::Port_ptr InPort ) ;
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() ;
123 virtual Engines::Component_ptr ComponentRef( const char * aComputerContainer ,
124 const char * aComponentName ) ;
126 virtual bool IsValid() ;
127 virtual bool IsExecutable() ;
128 virtual bool IsDataFlow() ;
130 virtual bool IsEditing() ;
131 virtual bool IsExecuting() ;
133 virtual bool IsReadOnly() ;
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() ;
142 virtual bool Begin() ;
144 virtual bool Start() ;
145 virtual long LastLevelDone() ;
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 ) ;
157 virtual bool Merge(const SUPERV::Graph_ptr aGraph ) ;