1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
23 // Author : Jean Rahuel
26 /*! \file SUPERV.idl This file contains a set of interfaces of the %SUPERVISION module
29 #ifndef __SUPERV_IDL__
30 #define __SUPERV_IDL__
32 #include "SALOME_ModuleCatalog.idl"
33 #include "SALOME_Component.idl"
34 #include "SALOMEDS.idl"
36 The main package of interfaces of %SUPERVISION module
41 This enumeration contains a set of elements defining the type of the port.
42 \note <BR>In general, ports represent <STRONG>input or output parameters</STRONG> of the functions,
43 implemented in different kinds of nodes of the graph.
45 enum KindOfPort { UndefinedParameter , ServiceParameter , GateParameter ,
46 InLineParameter , LoopParameter , SwitchParameter ,
47 EndSwitchParameter , GOTOParameter , DataStreamParameter } ;
50 This enumeration contains a set of dependencies of InPorts and OutPorts.
52 // enum KindOfDependency { UndefinedDependency , TimeDependency , IterationDependency } ;
55 This enumeration contains a set of schemas of InPorts.
57 enum KindOfSchema { SCHENULL , TI , TF , DELTA } ;
60 This enumeration contains a set of interpolations of InPorts.
62 enum KindOfInterpolation { INTERNULL , L0 , L1 } ;
65 This enumeration contains a set of extrapolations of InPorts.
67 enum KindOfExtrapolation { EXTRANULL , E0 , E1 } ;
70 This enumeration contains a set of dependencies of Ports.
72 enum KindOfDataStreamTrace { WithoutTrace , SummaryTrace , DetailedTrace } ;
75 This enumeration contains a set of elements defining the type of the node.
77 enum KindOfNode { FactoryNode , DataFlowGraph , ComputingNode ,
78 InLineNode , LoopNode , EndLoopNode ,
79 SwitchNode , EndSwitchNode , GOTONode , DataStreamGraph ,
80 MacroNode ,UnknownNode };
83 This struct contains fields defining the date.
94 This enumeration contains a set of elements defining the type of operation, which has been performed
98 enum GraphEvent { UndefinedEvent , NoEvent , NewThreadEvent ,
99 WaitingEvent , ReadyEvent ,
100 RunningEvent , DoneEvent , ErroredEvent ,
101 SuspendEvent , ResumeEvent ,
102 KillEvent , StopEvent ,
103 ReRunEvent , ReStartEvent } ;
105 // UndefinedState : Non existing Node, Port etc...
107 This enumeration contains a set of elements defining the current state of the node(graph).
110 enum GraphState { UndefinedState , NoState , EditingState , SuspendState ,
111 WaitingState , ReadyState , SuspendReadyState ,
113 DoneState , ErrorState ,
114 SuspendDoneState , SuspendErroredState ,
115 KillState , StopState ,
116 ReRunState , ReStartState ,
117 NumberOfGraphStates } ;
119 /*! A sequence of string values.
121 typedef sequence<string> ListOfStrings ;
126 interface StreamLink ;
128 typedef sequence<Link> ListOfLinks ;
129 typedef sequence<StreamLink> ListOfStreamLinks ;
132 interface StreamPort ;
134 typedef sequence<Port> ListOfPorts ;
135 typedef sequence<StreamPort> ListOfStreamPorts ;
146 interface StreamGraph ;
148 typedef sequence<CNode> ListOfCNodes ;
149 typedef sequence<FNode> ListOfFNodes ;
150 typedef sequence<INode> ListOfINodes ;
151 typedef sequence<GNode> ListOfGNodes ;
152 typedef sequence<LNode> ListOfLNodes ;
153 typedef sequence<ELNode> ListOfELNodes ;
154 typedef sequence<SNode> ListOfSNodes ;
155 typedef sequence<ESNode> ListOfESNodes ;
156 typedef sequence<Graph> ListOfGraphs ;
159 This struct contains fields defining different types of nodes.
163 ListOfCNodes CNodes ;
164 ListOfFNodes FNodes ;
165 ListOfINodes INodes ;
166 ListOfGNodes GNodes ;
167 ListOfLNodes LNodes ;
168 ListOfELNodes ELNodes ;
169 ListOfSNodes SNodes ;
170 ListOfESNodes ESNodes ;
171 ListOfGraphs Graphs ;
174 // ToSuspendState : will be Suspended before running if waiting or
175 // will be Suspended while running or
176 // will be Suspended after run
177 // ToSuspendStartState : will be Suspended at the beginning of execution
178 // ToSuspendDoneState : will be Suspended after run
180 This enumeration contains a set of elements defining the %ControlState of the node.
181 The %ControlState gives a possibility to determine the "control actions" which have been done by
182 the user (Suspend, SuspendDone, Kill, etc...).
184 enum ControlState { VoidState , ToSuspendStartState ,
185 ToSuspendState , ToSuspendDoneState ,
186 ToKillState , ToKillDoneState , ToStopState ,
187 NumberOfControlStates } ;
197 /*! \brief interface %SuperG
199 This interface contains a set of methods necessary for management of a %graph.
201 interface SuperG : Engines::Component, SALOMEDS::Driver {
204 Constructs a graph with possibility to read/edit it
205 \param aGraph %aGraphName or %aGraphXmlFile
207 SUPERV::Graph Graph(in string aGraph ) ; // aGraphName or aGraphXmlFile
210 Constructs a read Only graph ( for execution ).
211 \note <BR>In this graph there is also a possibility to update nodes, coordinates of the links,
212 of container names and input data.
213 \param aGraph %aGraphName or %aGraphXmlFile
215 SUPERV::Graph GraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile
218 Constructs a StreamGraph with possibility to read/edit it
219 \param aGraph %aGraphName or %aGraphXmlFile
221 SUPERV::StreamGraph StreamGraph(in string aGraph ) ; // aGraphName or aGraphXmlFile
224 Constructs a read Only StreamGraph ( for execution ).
225 \note <BR>In this graph there is also a possibility to update nodes, coordinates of the links,
226 of container names and input data.
227 \param aGraph %aGraphName or %aGraphXmlFile
229 SUPERV::StreamGraph StreamGraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile
232 Creates a value of <b>string</b> type which will be used for <VAR>Input</VAR> method in the interface %Node.
233 \param aString Input value of string type.
235 SUPERV::Value StringValue( in string aString ) ;
237 Creates a value of <b>any</b> type which will be used for <VAR>Input</VAR> method in the interface %Node.
238 \param anAny Input value of any type.
240 SUPERV::Value AnyValue( in any anAny ) ;
242 Gets a graph with a definite %IOR
243 \param ior String parameter defining %IOR of the graph.
245 SUPERV::Graph getGraph(in string ior); // get Graph from is IOR
248 Gets a graph with a definite %IOR
249 \param ior String parameter defining %IOR of the graph.
251 SUPERV::StreamGraph getStreamGraph(in string ior); // get Graph from is IOR
255 /*! \brief %CNode interface
257 This is a base class of the SUPERVISION module. It contains a set of methods allowing:
259 <li>creating a <b>Computation</b> node and setting its parameters (Name, Author, Comments etc.)
260 <li>checking the current state of the node in the data flow
261 <li>node execution follow-up
262 <li>management of the components, which can be initialized for execution of calculations in the data flow. (For that purpose %CNode class inherits the methods of the %Engines:Component class)
267 interface CNode : Engines::Component {
272 Returns the name of the node(graph).
276 Returns the service of this node .
278 SALOME_ModuleCatalog::Service Service() ;
280 Returns the type of the node.
282 SUPERV::KindOfNode Kind() ;
284 Returns the date of creation of the node(graph).
286 SUPERV::SDate CreationDate() ;
288 Returns the date of last update of the node(graph).
290 SUPERV::SDate LastUpdateDate() ;
292 Returns the name of the version of the node(graph).
296 Returns the name of the author of the node(graph).
300 Returns the string containing comments about this node(graph).
306 Sets the name of the node(graph).
307 \param aNewName String value defining the name of the node(graph).
308 \return True if the name has been updated.
310 boolean SetName(in string aNewName ) ;
312 Sets the name of the author. Returns True if it is updated.
313 \param anAuthor String value defining the name of the author.
314 \return True if the name has been updated.
316 boolean SetAuthor(in string anAuthor ) ;
318 Allows to update the comments about this node(graph).
319 \param aComment String value containing a comment to this node(graph).
320 \return True if the old comment has been updated.
322 boolean SetComment(in string aComment ) ;
325 Gets a port of the node (for compatibility : see GetInPort - GetOutPort).
327 SUPERV::Port Port( in string aParameterName ) ;
329 /*! Gets an Input port in a node.
330 \param aParameterName This value sets the name of the parameter which will be defined in this port.
332 SUPERV::Port GetInPort( in string aParameterName ) ;
334 /*! Gets an Output port in a node.
335 \param aParameterName This value sets the name of the parameter which will be defined in this port.
337 SUPERV::Port GetOutPort( in string aParameterName ) ;
339 /*! Gets an Input StreamPort in a node.
340 \param aParameterName This value sets the name of the parameter which will be defined in this port.
342 SUPERV::StreamPort GetInStreamPort( in string aParameterName ) ;
344 /*! Gets an Output StreamPort in a node.
345 \param aParameterName This value sets the name of the parameter which will be defined in this port.
347 SUPERV::StreamPort GetOutStreamPort( in string aParameterName ) ;
350 Returns true if a Node (or Graph) has StreamPorts
352 boolean HasStreamPort() ;
355 Enters a value into an Input %Port
357 SUPERV::Port Input( in string InputParameterName ,
361 Gets a list of ports of the node(graph)
363 SUPERV::ListOfPorts Ports() ;
366 Gets a list of ports of the node(graph)
368 SUPERV::ListOfStreamPorts StreamPorts() ;
370 /*! Gets a list of links of a node(graph)
372 SUPERV::ListOfLinks Links() ;
374 /*! Gets a list of StreamLinks of a node(graph)
376 SUPERV::ListOfStreamLinks StreamLinks() ;
379 Returns True if this node is a graph.
381 boolean IsStreamGraph() ;
383 Returns True if this node is a graph.
388 Returns True if this node is a MacroNode of a DataFlowGraph or a DataStreamGraph.
392 Returns True if this node is a MacroNode of a DataFlowGraph.
394 boolean IsFlowMacro() ;
396 Returns True if this node is a MacroNode of a DataStreamGraph.
398 boolean IsStreamMacro() ;
401 Returns True if this node is a Head Graph .
403 boolean IsHeadGraph() ;
405 Returns the MacroNode Level of this node.
410 Returns True if the node appears to be a %computing node.
412 boolean IsComputing() ;
414 Returns True if the node appears to be a %factory node.
416 boolean IsFactory() ;
418 Returns True if the node appears to be an %inline node.
422 Returns True if the node appears to be a %GOTO node.
426 Returns True if the node appears to be a %loop node.
430 Returns True if the node appears to be an %endloop node.
432 boolean IsEndLoop() ;
434 Returns True if the node appears to be a %switch node.
438 Returns True if the node appears to be a %endswitch node.
440 boolean IsEndSwitch() ;
443 Returns the numero of subgraph of a node.
447 Returns the numero of substreamgraph of a node.
449 long SubStreamGraph() ;
452 Returns the number of threads of the graph.
457 Returns True if the node(graph) is waiting for Data input
459 boolean IsWaiting() ;
462 Returns True if the node(graph) is ready for execution
467 Returns True if the node(graph) is currently running
469 boolean IsRunning() ;
472 Returns True if execution is finished
477 Returns True if execution is suspended
480 boolean IsSuspended() ;
482 Returns the current state of the graph.
484 SUPERV::GraphState State() ;
487 Waits for ready_to_run state, Suspend and return.
491 /*! Waits for running state, Suspend and return.
495 /*! Waits for done state, Suspend and return.
499 /*! Waits for Suspend state and return.
501 boolean SuspendedW() ;
507 If not running : will be killed when ready to run.
508 If running : kills immediatly.
514 Execution will be killed only just after running (only for nodes).
520 If not running : will be stopped when ready to run.
521 If running : stops immediatly
524 /*! Suspends execution.
526 If not running : will be Suspended when ready to run. It is used in step-by-step execution.
527 If running : suspends immediatly
530 /*! Suspends execution only just after running.
532 boolean SuspendDone();
534 /*! Resumes execution.
536 If Suspended : running will be continued.
537 If not Suspended : cancels the current ControlState ( Suspend, Kill, ...)
542 Restarts execution of the node.
546 Restarts execution of the graph beginning from a definite node.
548 boolean ReRunAt( in string aNodeName );
551 Restarts and suspends execution of the node(graph).
555 Restarts and suspends execution of the graph beginning from a definite node.
556 \param aNodeName String parameter defining the name of the node.
558 boolean ReStartAt( in string aNodeName );
560 // Control state required : Kill, Suspend, Stop
562 Returns control state of the node(graph).
564 SUPERV::ControlState Control() ;
566 Clears the control state of the node(graph).
568 void ControlClear() ;
570 boolean ContainerKill();
572 Sets the position of the node in the window.
574 void Coords( in long X , in long Y ) ;
576 Returns the position of the node along X-axis.
580 Returns the position of the node along Y-axis.
584 Returns the Cpu used by a node for execution of calculations in seconds.
589 /*! \brief %FNode class
591 This class is necessary for management of factory nodes in a data flow. Besides the inherited methods it contains some methods allowing to define
592 the component from the container, which will be called for execution of the calculation.
595 interface FNode : CNode {
597 /*! Gets the name of the component, which will be called for execution of the calculation.
599 string GetComponentName() ;
600 /*! Gets the name of the interface of the component.
602 string GetInterfaceName() ;
603 /*! Gets the container containing the component, which will be called for execution of the calculation.
605 string GetContainer() ;
606 /*! Sets the name of the component, which will be called for execution of the calculation.
607 \param aComponentName Name of the component.
609 boolean SetComponentName(in string aComponentName ) ;
610 /*! Sets the name of the interface of the component.
611 \param anInterfaceName Name of the interface.
613 boolean SetInterfaceName(in string anInterfaceName ) ;
614 /*! Gets the container containing the component, which will be called for execution of the calculation.
615 \param aContainer Container containing the component.
617 boolean SetContainer(in string aContainer ) ;
619 /*! \brief %INode class
621 This class is necessary for management of inline nodes in a data flow. Besides the inherited methods it contains some methods allowing to set a Python function, which will be
622 executed for performing calculations, as well as input and output parameters for the node.
626 interface INode : CNode {
629 /*! Sets Python function for the InLine Node.
630 \param FuncName Name of the function
631 \param aPyInitFunction Python initialization function of the InLine Node
633 void SetPyFunction( in string FuncName ,
634 in SUPERV::ListOfStrings aPyInitFunction ) ;
635 /*! Returns Python function of the InLine Node.
637 SUPERV::ListOfStrings PyFunction() ;
638 /*! Returns the name of the Python function of the InLine Node.
640 string PyFuncName() ;
642 /*! Creates an Input port in a node.
643 \param aParameterName This value sets the name of the parameter which will be defined in this port.
644 \param aParameterType This value sets the type of the parameter which will be defined in this port.
646 SUPERV::Port InPort( in string aParameterName , in string aParameterType ) ;
647 /*! Creates an Output port in an Inline node.
648 \param aParameterName This value sets the name of the parameter which will be defined in this port.
649 \param aParameterType This value sets the type of the parameter which will be defined in this port.
651 SUPERV::Port OutPort( in string aParameterName , in string aParameterType ) ;
653 /*! Creates an Input DataStreamPort in an Inline node.
654 \param aParameterName This value sets the name of the parameter which will be defined in this port.
655 \param aParameterType This value sets the type of the parameter which will be defined in this port.
657 SUPERV::StreamPort InStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ;
659 /*! Creates an Output DataStreamPort in an Inline node.
660 \param aParameterName This value sets the name of the parameter which will be defined in this port.
661 \param aParameterType This value sets the type of the parameter which will be defined in this port.
663 SUPERV::StreamPort OutStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ;
666 /*! \brief %GNode class
668 This class is necessary for management of GOTO/EndLoop/EndSwitch nodes in the dataflow.
669 Besides the inherited methods it contains some methods allowing to define the couple node, which will be linked to this one.
671 // GOTO/EndLoop/EndSwitch Nodes
673 interface GNode : INode {
675 /*! Sets the coupled InLine Node to this GOTO/EndLoop/EndSwitch Node.
677 boolean SetCoupled( in string anInLineNode ) ;
678 /*! Returns the coupled InLine Node to this GOTO/EndLoop/EndSwitch Node.
680 SUPERV::INode Coupled() ;
682 /*! %Loop Nodes class
686 interface LNode : GNode {
688 /*! Sets Python Init function of the Loop Node.
689 \param InitName Name of the Init function
690 \param aPyInitFunction Python Init function
692 void SetPyInit( in string InitName ,
693 in SUPERV::ListOfStrings aPyInitFunction ) ;
694 /*! Returns Python Init function of the Loop Node.
696 SUPERV::ListOfStrings PyInit() ;
697 /*! Returns the name of the Python Init function of the Loop Node.
699 string PyInitName() ;
701 /*! Sets Python More function of the Loop Node.
702 \param MoreName Name of the More function
703 \param aPyMoreFunction Python More function
705 void SetPyMore( in string MoreName ,
706 in SUPERV::ListOfStrings aPyMoreFunction ) ;
707 /*! Returns Python More function of the Loop Node.
709 SUPERV::ListOfStrings PyMore() ;
710 /*! Returns the name of the Python More function of the Loop Node.
712 string PyMoreName() ;
714 /*! Sets Python Next function of the Loop Node.
715 \param NextName Name of the Next function
716 \param aPy NextFunction Python Next function
718 void SetPyNext( in string NextName ,
719 in SUPERV::ListOfStrings aPyNextFunction ) ;
721 /*! Returns Python Next function of the Loop Node.
723 SUPERV::ListOfStrings PyNext() ;
724 /*! Returns the name of the Python Next function of the Loop Node.
726 string PyNextName() ;
732 interface ELNode : GNode {
738 interface SNode : GNode {
744 interface ESNode : GNode {
748 /*! \brief Interface of a graph
750 This interface includes a set of methods used for management of the graphs in %SUPERVISION module.
754 interface Graph : GNode {
757 /*! Creates a Computing Node in a Graph.
759 SUPERV::CNode CNode( in SALOME_ModuleCatalog::Service aService ) ;
761 /*! Creates a Factory Node in a Graph.
763 SUPERV::FNode FNode( in string aComponentName ,
764 in string anInterfaceName ,
765 in SALOME_ModuleCatalog::Service aService ) ;
767 /*! Creates an InLine Node in a Graph.
769 SUPERV::INode INode( in string FuncName , in ListOfStrings aPythonFunction ) ;
771 /*! Creates a GOTO Node and links it to the corresponding InLine node.
773 SUPERV::GNode GNode( in string FuncName , in ListOfStrings aPythonFunction ,
774 in string anINode ) ;
776 /*! Creates a Loop Node ("for" or "while" loop) and links it to the corresponding end of loop node.
778 SUPERV::LNode LNode( in string InitName , in ListOfStrings InitFunction ,
779 in string MoreName , in ListOfStrings MoreFunction ,
780 in string NextName , in ListOfStrings NextFunction ,
781 out SUPERV::INode anEndOfLoop ) ;
783 /*! Creates a conditional "if/elseif/else" or "switch" node and the corresponding end node
785 SUPERV::SNode SNode( in string FuncName , in ListOfStrings aPythonFunction ,
786 out SUPERV::INode anEndOfSwitch ) ;
788 /*! Creates a "MacroNode" node which corresponds to a Graph with a xml file
790 SUPERV::Graph MNode( in string aXmlFileName ) ;
792 /*! Creates a "MacroNode" node which corresponds to a Graph with a Graph
794 SUPERV::Graph GraphMNode( in Graph aGraph ) ;
796 /*! Returns a Graph of a "MacroNode" or a "MacroNode" of a Graph
798 SUPERV::Graph FlowObjRef() ;
800 /*! Returns a StreamGraph of a "MacroNode" or a "MacroNode" of a StreamGraph
802 SUPERV::StreamGraph StreamObjRef() ;
804 /*! Returns an existing node with a definite name.
805 \param aNodeName Name of the Node.
807 SUPERV::CNode Node( in string aNodeName ) ;
809 /*! Creates a CORBA Component Object Reference
811 Engines::Component ComponentRef( in string aComputerContainer ,
812 in string aComponentName ) ;
815 Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph
817 SUPERV::Link Link( in SUPERV::Port OutputPort ,
818 in SUPERV::Port InputPort ) ;
821 Imports a graph into a file with XML format
822 \param anXmlFile String parameter defining the name of the XML file.
823 \return True, if the graph has been successfully imported.
825 boolean Import( in string anXmlFile ) ;
827 Exports a graph from a file with XML format
828 \param anXmlFile String parameter defining the name of the XML file.
829 \return True, if the graph has been successfully imported.
831 boolean Export( in string anXmlFile ) ;
833 Returns True if the graph is read Only.
835 boolean IsReadOnly() ;
838 Starts asynchronous execution of the graph.
843 Assigns to the %Node an %Event and a %State of the %Node, if the Event is
844 available. And returns immediately Nil, NoEvent and NoState if not.
845 Returns false if the graph is finished, suspended, killed or stopped.
846 \param aNode %Node for which this method is called
847 \param anEvent An operation, which has been performed on this node(graph).
848 \param aState Current state of the graph
850 boolean EventNoW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
851 out SUPERV::GraphState aState ) ;
854 Assigns to the %Node an %Event and a %State of the %Node, if the Event is
855 available. Waits if it is not available at the current moment.
856 Returns false if the graph is finished, suspended, killed or stopped.
857 \param aNode %Node for which this method is called
858 \param anEvent An operation, which has been performed on this node(graph).
859 \param aState Current state of the graph
861 boolean Event( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
862 out SUPERV::GraphState aState ) ;
864 // Same as Event but execution of the thread is suspended between the
865 // return of EventW and the next call to EventW
867 Assigns to the %Node an %Event and a %State of the %Node, if the Event is
868 available. And returns immediately Nil, NoEvent and NoState if not.
869 Returns false if the graph is finished, suspended, killed or stopped.
870 \note <BR>Execution of the thread is suspended between the return of this
871 method and its next usage.
872 \param aNode %Node for which this method is called
873 \param anEvent An operation, which has been performed on this node(graph).
874 \param aState Current state of the graph
876 boolean EventW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
877 out SUPERV::GraphState aState ) ;
878 /*! \name Methods used for inner debugging purposes of threads management :
884 SUPERV::ListOfNodes LevelNodes( in long aLevel ) ;
890 Returns the number of currently running threads.
894 Returns the number of suspended threads.
896 long SuspendedThreads();
898 Returns True if the graph is valid.
902 Returns True if the graph can be executed.
904 boolean IsExecutable() ;
906 Returns True if the graph is being currently edited.
908 boolean IsEditing() ;
910 Returns True if the graph is being currently executed.
912 boolean IsExecuting() ;
914 long LastLevelDone() ;
917 Launches step-by-step execution of the graph.
918 \note The execution is suspended immediatly after performance of operations of the first node and
919 user can specify the nodes, where execution will be again suspended after its resuming.
923 Allows to copy one graph into another.
925 SUPERV::Graph Copy() ;
927 Convert a FlowGraph to a StreamGraph.
929 SUPERV::StreamGraph ToStreamGraph() ;
933 boolean Merge( in Graph aGraph ) ;
935 Returns a list of nodes of the graph.
937 SUPERV::ListOfNodes Nodes() ;
939 Returns a list of links of the graph.
941 SUPERV::ListOfLinks GLinks() ;
943 Gets IOR of the garph.
948 Returns the number of independent subgraphs
950 long SubGraphsNumber() ;
952 Returns a list of Nodes of a SubGraph.
954 SUPERV::ListOfNodes SubGraphsNodes( in long SubGraphNumber ) ;
962 /*! \brief Interface of a StreamGraph
964 This interface includes a set of methods used for management of the graphs in %SUPERVISION module.
967 /////////////////////
968 interface StreamGraph : Graph {
969 /////////////////////
972 Allows to copy one graph into another.
974 SUPERV::StreamGraph StreamCopy() ;
975 /*! Creates a "MacroNode" node which corresponds to a StreamGraph with a xml file
977 SUPERV::StreamGraph StreamMNode( in string aXmlFileName ) ;
979 /*! Creates a "MacroNode" node which corresponds to a StreamGraph with a Graph
981 SUPERV::StreamGraph StreamGraphMNode( in StreamGraph aStreamGraph ) ;
984 Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph
986 SUPERV::StreamLink StreamLink( in SUPERV::StreamPort OutputPort ,
987 in SUPERV::StreamPort InputPort ) ;
990 Returns a list of links of the graph.
992 SUPERV::ListOfStreamLinks GStreamLinks() ;
993 boolean SetStreamParams( in long Timeout ,
994 in SUPERV::KindOfDataStreamTrace DataStreamTrace ,
995 in double DeltaTime ) ;
996 void StreamParams( out long Timeout ,
997 out SUPERV::KindOfDataStreamTrace DataStreamTrace ,
998 out double DeltaTime ) ;
1001 Returns the number of independent subStreamgraphs
1003 long SubStreamGraphsNumber() ;
1005 Returns a list of Nodes of a SubStreamGraph.
1007 SUPERV::ListOfNodes SubStreamGraphsNodes( in long SubStreamGraphNumber ) ;
1010 Convert a StreamGraph to a FlowGraph.
1012 SUPERV::Graph ToFlowGraph() ;
1015 Merge a StreamGraph.
1017 boolean StreamMerge( in StreamGraph aStreamGraph ) ;
1026 /*! \brief Interface of the %link
1028 This interface contains a set of methods used for representation and management of the links
1029 connecting nodes in a %graph.
1033 interface Link : Engines::Component {
1036 Returns the %Output %Port of the Link
1038 SUPERV::Port OutPort() ;
1041 Returns the %Input %Port of the Link
1043 SUPERV::Port InPort() ;
1046 /*! \name Methods used for representation of links in GUI of %SALOME application :
1050 Returns the number of coordinate points which are included in the link.
1051 \note <BR>Every link can contain a set of coordinate points which constitute it. These points have
1052 index numbers (beginning from 1) and coordinates defining their position in the window. Indexing of
1053 the points starts from input port to output port of the corresponding link.
1057 Adds a coordinate point to the link.
1058 \param index Index of the point.
1059 \param X Coordinates of the point.
1060 \param Y Coordinates of the point.
1062 boolean AddCoord( in long index , in long X , in long Y ) ;
1064 Changes the location of a definite coordinate point of the link.
1065 \param index Index of the point.
1066 \param X Coordinates of the point.
1067 \param Y Coordinates of the point.
1070 boolean ChangeCoord( in long index , in long X , in long Y ) ;
1072 Removes a coordinate point of the link.
1073 \param index Index of the point.
1076 boolean RemoveCoord( in long index ) ;
1079 Sets the location of a coordinate point of the link.
1080 \param index Index of the point.
1081 \param X Coordinates of the point.
1082 \param Y Coordinates of the point.
1085 boolean Coords( in long index , out long X , out long Y ) ;
1097 /*! \brief Interface of the %link
1099 This interface contains a set of methods used for representation and management of the links
1100 connecting nodes in a %graph.
1103 ////////////////////
1104 interface StreamLink : Link {
1105 ////////////////////
1107 Returns the %Output %StreamPort of the StreamLink
1109 SUPERV::StreamPort OutStreamPort() ;
1112 Returns the %Input %StreamPort of the StreamLink
1114 SUPERV::StreamPort InStreamPort() ;
1123 /*! \brief %Value interface
1125 This interface contains a set of methods used for setting initial parameters of the ports
1129 interface Value : Engines::Component {
1132 Converts the given value into a value of string type.
1136 Converts the given value into a value of independant data type.
1140 Returns True if the value represents an IOR.
1144 Gets data type of the component.
1146 string ComponentDataType() ;
1151 /*! \brief %Port interface
1153 This interface contains a set of methods used for management of the ports.
1157 interface Port : Value {
1161 Gives a value to an Input %Port
1162 \param aValue This parameter defines the input value
1164 boolean Input( in SUPERV::Value aValue ) ;
1167 Returns the node of the port
1169 SUPERV::CNode Node() ;
1171 Sets the name of the port.
1175 /* Gets the type of a port.
1176 \return A string defining the type of a port
1181 // Link of an Input Port
1183 Returns the link of an %Input %Port
1185 SUPERV::Link Link() ;
1188 Returns a list of links of an Input %Port of an EndSwitchNode
1190 SUPERV::ListOfLinks Links() ;
1193 Returns True if this port appears to be an %Input %Port of a Node
1198 Returns True if an %Input %Value exists for that %Input %Port (without link)
1200 boolean HasInput() ;
1203 Returns True if the %Port is linked (without value)
1205 // Port with link (without Value)
1206 boolean IsLinked() ;
1209 /*! Returns the type of this port.
1211 SUPERV::KindOfPort Kind() ;
1213 // Port from the service of the node
1215 Returns True if the %Port is a parameter of a service
1218 // Port is a Gate of the node
1220 Returns True if the %Port appears to be a Gate Port of the Node
1223 // Port is a parameter of an InLineNode
1225 Returns True if the %Port appears to be a parameter of an InLine Node.
1227 boolean IsInLine() ;
1229 // Port is a LoopParameter (InitLoop or DoLoop) of an LoopNode
1231 Returns True if the %Port appears to be a Loop Parameter (InitLoop or DoLoop) of a Loop Node
1234 // Port is an output parameter of a SwitchNode connected to an InGate
1236 Returns True if the %Port appears to be a parameter of a switch node
1238 // Port is a parameter of a switch node
1239 boolean IsSwitch() ;
1240 // Port is an Input parameter of a EndSwitchNode connected to several output ports
1242 Returns True if the %Port appears to be an EndSwitch Node connected to several output ports.
1244 boolean IsEndSwitch() ;
1246 boolean IsDataStream() ;
1248 /*! Returns the current state of the port.
1250 SUPERV::GraphState State() ;
1251 /*! Returns True if computation is finished.
1255 /*! deactivate the objref of a Port when its node is destroyed
1261 ////////////////////
1262 interface StreamPort : Port {
1263 ////////////////////
1265 // Link of a StreamPort
1267 Returns the link of a %StreamPort
1269 SUPERV::StreamLink StreamLink() ;
1271 /*! Returns the current Dependency of the DataStreamPort : TimeDependency or IterationDependency
1273 SALOME_ModuleCatalog::DataStreamDependency Dependency() ;
1274 boolean SetDependency( in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ;
1276 /*! Sets or Returns the current kinds of Schema, Interpolation and Extrapolation of the InDataStreamPort
1278 boolean SetParams( in KindOfSchema aKindOfSchema ,
1279 in KindOfInterpolation aKindOfInterpolation ,
1280 in KindOfExtrapolation aKindOfExtrapolation ) ;
1281 boolean Params( out KindOfSchema aKindOfSchema ,
1282 out KindOfInterpolation aKindOfInterpolation ,
1283 out KindOfExtrapolation aKindOfExtrapolation ) ;
1285 /*! Sets or Returns the current number of values ("NIVEAU") of the OutDataStreamPort
1287 boolean SetNumberOfValues( in long aNumberOfValues ) ;
1288 long NumberOfValues() ;