Salome HOME
DCQ:prepare 2.0.0
[modules/superv.git] / src / Supervision / Graph_Impl.hxx
index 0a3b874e0769e34d1456820f05dc68198fed05b3..66c29baf2e630b403f81c1286031e85e881c2f9a 100644 (file)
@@ -48,8 +48,8 @@
 #include "DataFlowEditor_DataFlow.hxx"
 #include "DataFlowExecutor_DataFlow.hxx"
 
-class Graph_Impl :public INode_Impl ,
-                  public POA_SUPERV::Graph {
+class Graph_Impl : public POA_SUPERV::Graph ,
+                   public GNode_Impl {
   private:
 
     CORBA::ORB_ptr             _Orb ;
@@ -60,7 +60,7 @@ class Graph_Impl :public INode_Impl ,
     char * _DebugFileName ;
 
     pthread_mutex_t            _MutexExecutorWait ;
-    GraphExecutor::DataFlow *  _DataFlowExecutor ;
+//    GraphExecutor::DataFlow *  _DataFlowExecutor ;
 
     SUPERV::Graph_var          myServant; // mpv 23.12.2002: store servant of graph to get constant IOR
 
@@ -73,11 +73,30 @@ class Graph_Impl :public INode_Impl ,
                 const char *interfaceName ,
                 const char *aDataFlowName ,
                 const SUPERV::KindOfNode aKindOfNode ) ;
+    Graph_Impl( CORBA::ORB_ptr orb ,
+               PortableServer::POA_ptr poa ,
+               PortableServer::ObjectId * contId , 
+               const char *instanceName ,
+                const char *interfaceName ,
+                GraphEditor::DataFlow * DataFlowEditor ,
+                GraphEditor::InNode * DataFlowNode ) ;
+    Graph_Impl( CORBA::ORB_ptr orb ,
+               PortableServer::POA_ptr poa ,
+               PortableServer::ObjectId * contId , 
+               const char *instanceName ,
+                const char *interfaceName ,
+                GraphExecutor::DataFlow * DataFlowExecutor ,
+                GraphExecutor::InNode * DataFlowExecutorNode ) ;
     virtual SUPERV::Graph_ptr Copy() ;
 
     virtual ~Graph_Impl() ;
     virtual void destroy() ;
 
+    void DebugFileName( char * aDebugFileName ) {
+         _DebugFileName = my_strdup( aDebugFileName ) ; } ;
+    char * DebugFileName() {
+           return _DebugFileName ; } ;
+
     virtual char* getIOR();
 
     virtual void ReadOnly() ;
@@ -88,9 +107,9 @@ class Graph_Impl :public INode_Impl ,
 //    virtual char * DataNodeInfo() ;
 //    virtual char * NodeInfo( const char * aNodeName ) ;
 
-    virtual GraphBase::SGraph * GetGraph() ;
+    virtual GraphBase::ListOfSGraphs * GetGraphs() ;
 
-    virtual bool LoadGraph(const GraphBase::SGraph *aGraph ) ;
+    virtual bool LoadGraphs( GraphBase::ListOfSGraphs *aListOfGraphs ) ;
     virtual bool Import(const char * aXmlFile ) ;
 
     virtual bool Export(const char * aXmlFile ) ;
@@ -121,13 +140,30 @@ class Graph_Impl :public INode_Impl ,
                           const SUPERV::ListOfStrings & PythonFunction ,
                           SUPERV::INode_out anEndOfSwitch ) ;
 
+    bool LoadDataFlows( GraphEditor::DataFlow * aDataFlowEditor ,
+                        GraphBase::ListOfSGraphs * aListOfDataFlows ,
+                        int index ) ;
+    bool LoadDataFlows( GraphExecutor::DataFlow * aDataFlowExecutor ,
+                        GraphBase::ListOfSGraphs * aListOfDataFlows ,
+                        int index ) ;
+    virtual SUPERV::Graph_ptr MNode( const char * aXmlFileName ) ;
+
+    virtual SUPERV::Graph_ptr MNode( GraphEditor::DataFlow * aDataFlowEditor ,
+                                     GraphBase::ListOfSGraphs aListOfDataFlows ) ;
+
+    virtual SUPERV::Graph_ptr GraphMNode( SUPERV::Graph_ptr aGraph ) ;
+
+    virtual SUPERV::Graph_ptr FlowObjRef() ;
+
+    virtual SUPERV::StreamGraph_ptr StreamObjRef() ;
+
     virtual SUPERV::CNode_ptr Node( const char * NodeName );
 
     virtual SUPERV::Link_ptr Link( SUPERV::Port_ptr OutPort ,
                                    SUPERV::Port_ptr InPort ) ;
 
     virtual SUPERV::ListOfNodes_var Graph_Impl::SetNode( SUPERV::ListOfNodes_var RetVal ,
-                                      GraphBase::ComputingNode * aNode ) ;
+                                                         GraphBase::ComputingNode * aNode ) ;
     virtual SUPERV::ListOfNodes * Nodes() ;
     virtual void SetNodeObjRef( GraphEditor::InNode * anInNode ) ;