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 ,
53 DataStreamParameter } ;
56 This enumeration contains a set of dependencies of InPorts and OutPorts.
58 // enum KindOfDependency { UndefinedDependency , TimeDependency , IterationDependency } ;
61 This enumeration contains a set of schemas of InPorts.
63 enum KindOfSchema { SCHENULL , TI , TF , DELTA } ;
66 This enumeration contains a set of interpolations of InPorts.
68 enum KindOfInterpolation { INTERNULL , L0 , L1 } ;
71 This enumeration contains a set of extrapolations of InPorts.
73 enum KindOfExtrapolation { EXTRANULL , E0 , E1 } ;
76 This enumeration contains a set of dependencies of Ports.
78 enum KindOfDataStreamTrace { WithoutTrace , SummaryTrace , DetailedTrace } ;
81 This enumeration contains a set of elements defining the type of the node.
83 enum KindOfNode { FactoryNode ,
97 This struct contains fields defining the date.
108 This enumeration contains a set of elements defining the type of operation, which has been performed
112 enum GraphEvent { UndefinedEvent ,
125 // UndefinedState : Non existing Node, Port etc...
127 This enumeration contains a set of elements defining the current state of the node(graph).
130 enum GraphState { UndefinedState ,
141 SuspendErroredState ,
145 NumberOfGraphStates } ;
147 /*! A sequence of string values.
149 typedef sequence<string> ListOfStrings ;
154 interface StreamLink ;
156 typedef sequence<Link> ListOfLinks ;
157 typedef sequence<StreamLink> ListOfStreamLinks ;
160 interface StreamPort ;
162 typedef sequence<Port> ListOfPorts ;
163 typedef sequence<StreamPort> ListOfStreamPorts ;
174 interface StreamGraph ;
176 typedef sequence<CNode> ListOfCNodes ;
177 typedef sequence<FNode> ListOfFNodes ;
178 typedef sequence<INode> ListOfINodes ;
179 typedef sequence<GNode> ListOfGNodes ;
180 typedef sequence<LNode> ListOfLNodes ;
181 typedef sequence<ELNode> ListOfELNodes ;
182 typedef sequence<SNode> ListOfSNodes ;
183 typedef sequence<ESNode> ListOfESNodes ;
184 typedef sequence<Graph> ListOfGraphs ;
187 This struct contains fields defining different types of nodes.
191 ListOfCNodes CNodes ;
192 ListOfFNodes FNodes ;
193 ListOfINodes INodes ;
194 ListOfGNodes GNodes ;
195 ListOfLNodes LNodes ;
196 ListOfELNodes ELNodes ;
197 ListOfSNodes SNodes ;
198 ListOfESNodes ESNodes ;
199 ListOfGraphs Graphs ;
202 // ToSuspendState : will be Suspended before running if waiting or
203 // will be Suspended while running or
204 // will be Suspended after run
205 // ToSuspendStartState : will be Suspended at the beginning of execution
206 // ToSuspendDoneState : will be Suspended after run
208 This enumeration contains a set of elements defining the %ControlState of the node.
209 The %ControlState gives a possibility to determine the "control actions" which have been done by
210 the user (Suspend, SuspendDone, Kill, etc...).
212 enum ControlState { VoidState ,
213 ToSuspendStartState ,
219 NumberOfControlStates } ;
224 /*! \brief interface %SuperG
226 This interface contains a set of methods necessary for management of a %graph.
228 interface SuperG : Engines::Component, SALOMEDS::Driver {
231 Constructs a graph with possibility to read/edit it
232 \param aGraph %aGraphName or %aGraphXmlFile
234 SUPERV::Graph Graph(in string aGraph ) ; // aGraphName or aGraphXmlFile
237 Constructs a read Only graph ( for execution ).
238 \note <BR>In this graph there is also a possibility to update nodes, coordinates of the links,
239 of container names and input data.
240 \param aGraph %aGraphName or %aGraphXmlFile
242 SUPERV::Graph GraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile
245 Constructs a StreamGraph with possibility to read/edit it
246 \param aGraph %aGraphName or %aGraphXmlFile
248 SUPERV::StreamGraph StreamGraph(in string aGraph ) ; // aGraphName or aGraphXmlFile
251 Constructs a read Only StreamGraph ( for execution ).
252 \note <BR>In this graph there is also a possibility to update nodes, coordinates of the links,
253 of container names and input data.
254 \param aGraph %aGraphName or %aGraphXmlFile
256 SUPERV::StreamGraph StreamGraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile
259 Creates a value of <b>string</b> type which will be used for <VAR>Input</VAR> method in the interface %Node.
260 \param aString Input value of string type.
262 SUPERV::Value StringValue( in string aString ) ;
264 Creates a value of <b>any</b> type which will be used for <VAR>Input</VAR> method in the interface %Node.
265 \param anAny Input value of any type.
267 SUPERV::Value AnyValue( in any anAny ) ;
269 Gets a graph with a definite %IOR
270 \param ior String parameter defining %IOR of the graph.
272 SUPERV::Graph getGraph(in string ior); // get Graph from is IOR
275 Gets a graph with a definite %IOR
276 \param ior String parameter defining %IOR of the graph.
278 SUPERV::StreamGraph getStreamGraph(in string ior); // get Graph from is IOR
282 /*! \brief %CNode interface
284 This is a base class of the SUPERVISION module. It contains a set of methods allowing:
286 <li>creating a <b>Computation</b> node and setting its parameters (Name, Author, Comments etc.)
287 <li>checking the current state of the node in the data flow
288 <li>node execution follow-up
289 <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)
294 interface CNode : Engines::Component {
299 Returns the name of the node(graph).
303 Returns the service of this node .
305 SALOME_ModuleCatalog::Service Service() ;
307 Returns the type of the node.
309 SUPERV::KindOfNode Kind() ;
311 Returns the date of creation of the node(graph).
313 SUPERV::SDate CreationDate() ;
315 Returns the date of last update of the node(graph).
317 SUPERV::SDate LastUpdateDate() ;
319 Returns the name of the version of the node(graph).
323 Returns the name of the author of the node(graph).
327 Returns the string containing comments about this node(graph).
333 Sets the name of the node(graph).
334 \param aNewName String value defining the name of the node(graph).
335 \return True if the name has been updated.
337 boolean SetName(in string aNewName ) ;
339 Sets the name of the author. Returns True if it is updated.
340 \param anAuthor String value defining the name of the author.
341 \return True if the name has been updated.
343 boolean SetAuthor(in string anAuthor ) ;
345 Allows to update the comments about this node(graph).
346 \param aComment String value containing a comment to this node(graph).
347 \return True if the old comment has been updated.
349 boolean SetComment(in string aComment ) ;
352 Gets a port of the node (for compatibility : see GetInPort - GetOutPort).
354 SUPERV::Port Port( in string aParameterName ) ;
356 /*! Gets an Input port in a node.
357 \param aParameterName This value sets the name of the parameter which will be defined in this port.
359 SUPERV::Port GetInPort( in string aParameterName ) ;
361 /*! Gets an Output port in a node.
362 \param aParameterName This value sets the name of the parameter which will be defined in this port.
364 SUPERV::Port GetOutPort( in string aParameterName ) ;
366 /*! Gets an Input StreamPort in a node.
367 \param aParameterName This value sets the name of the parameter which will be defined in this port.
369 SUPERV::StreamPort GetInStreamPort( in string aParameterName ) ;
371 /*! Gets an Output StreamPort in a node.
372 \param aParameterName This value sets the name of the parameter which will be defined in this port.
374 SUPERV::StreamPort GetOutStreamPort( in string aParameterName ) ;
377 Returns true if a Node (or Graph) has StreamPorts
379 boolean HasStreamPort() ;
382 Enters a value into an Input %Port
384 SUPERV::Port Input( in string InputParameterName ,
388 Gets a list of ports of the node(graph)
390 SUPERV::ListOfPorts Ports() ;
393 Gets a list of ports of the node(graph)
395 SUPERV::ListOfStreamPorts StreamPorts() ;
397 /*! Gets a list of links of a node(graph)
399 SUPERV::ListOfLinks Links() ;
401 /*! Gets a list of StreamLinks of a node(graph)
403 SUPERV::ListOfStreamLinks StreamLinks() ;
406 Returns True if this node is a graph.
408 boolean IsStreamGraph() ;
410 Returns True if this node is a graph.
415 Returns True if this node is a MacroNode of a DataFlowGraph or a DataStreamGraph.
419 Returns True if this node is a MacroNode of a DataFlowGraph.
421 boolean IsFlowMacro() ;
423 Returns True if this node is a MacroNode of a DataStreamGraph.
425 boolean IsStreamMacro() ;
428 Returns True if this node is a Head Graph .
430 boolean IsHeadGraph() ;
432 Returns the MacroNode Level of this node.
437 Returns True if the node appears to be a %computing node.
439 boolean IsComputing() ;
441 Returns True if the node appears to be a %factory node.
443 boolean IsFactory() ;
445 Returns True if the node appears to be an %inline node.
449 Returns True if the node appears to be a %GOTO node.
453 Returns True if the node appears to be a %loop node.
457 Returns True if the node appears to be an %endloop node.
459 boolean IsEndLoop() ;
461 Returns True if the node appears to be a %switch node.
465 Returns True if the node appears to be a %endswitch node.
467 boolean IsEndSwitch() ;
470 Returns the numero of subgraph of a node.
474 Returns the numero of substreamgraph of a node.
476 long SubStreamGraph() ;
479 Returns the number of threads of the graph.
484 Returns True if the node(graph) is waiting for Data input
486 boolean IsWaiting() ;
489 Returns True if the node(graph) is ready for execution
494 Returns True if the node(graph) is currently running
496 boolean IsRunning() ;
499 Returns True if execution is finished
504 Returns True if execution is suspended
507 boolean IsSuspended() ;
509 Returns the current state of the graph.
511 SUPERV::GraphState State() ;
514 Waits for ready_to_run state, Suspend and return.
518 /*! Waits for running state, Suspend and return.
522 /*! Waits for done state, Suspend and return.
526 /*! Waits for Suspend state and return.
528 boolean SuspendedW() ;
534 If not running : will be killed when ready to run.
535 If running : kills immediatly.
541 Execution will be killed only just after running (only for nodes).
547 If not running : will be stopped when ready to run.
548 If running : stops immediatly
551 /*! Suspends execution.
553 If not running : will be Suspended when ready to run. It is used in step-by-step execution.
554 If running : suspends immediatly
557 /*! Suspends execution only just after running.
559 boolean SuspendDone();
561 /*! Resumes execution.
563 If Suspended : running will be continued.
564 If not Suspended : cancels the current ControlState ( Suspend, Kill, ...)
569 // Control state required : Kill, Suspend, Stop
571 Returns control state of the node(graph).
573 SUPERV::ControlState Control() ;
575 Clears the control state of the node(graph).
577 void ControlClear() ;
579 boolean ContainerKill();
582 Sets the position of the node in the window.
584 void Coords( in long X , in long Y ) ;
586 Returns the position of the node along X-axis.
590 Returns the position of the node along Y-axis.
594 Returns the Cpu used by a node for execution of calculations in seconds.
599 /*! \brief %FNode class
601 This class is necessary for management of factory nodes in a data flow. Besides the inherited methods it contains some methods allowing to define
602 the component from the container, which will be called for execution of the calculation.
605 interface FNode : CNode {
607 /*! Gets the name of the component, which will be called for execution of the calculation.
609 string GetComponentName() ;
610 /*! Gets the name of the interface of the component.
612 string GetInterfaceName() ;
613 /*! Gets the container containing the component, which will be called for execution of the calculation.
615 string GetContainer() ;
616 /*! Sets the name of the component, which will be called for execution of the calculation.
617 \param aComponentName Name of the component.
619 boolean SetComponentName(in string aComponentName ) ;
620 /*! Sets the name of the interface of the component.
621 \param anInterfaceName Name of the interface.
623 boolean SetInterfaceName(in string anInterfaceName ) ;
624 /*! Gets the container containing the component, which will be called for execution of the calculation.
625 \param aContainer Container containing the component.
627 boolean SetContainer(in string aContainer ) ;
629 /*! \brief %INode class
631 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
632 executed for performing calculations, as well as input and output parameters for the node.
636 interface INode : CNode {
639 /*! Sets Python function for the InLine Node.
640 \param FuncName Name of the function
641 \param aPyInitFunction Python initialization function of the InLine Node
643 void SetPyFunction( in string FuncName ,
644 in SUPERV::ListOfStrings aPyInitFunction ) ;
645 /*! Returns Python function of the InLine Node.
647 SUPERV::ListOfStrings PyFunction() ;
648 /*! Returns the name of the Python function of the InLine Node.
650 string PyFuncName() ;
652 /*! Creates an Input port in a node.
653 \param aParameterName This value sets the name of the parameter which will be defined in this port.
654 \param aParameterType This value sets the type of the parameter which will be defined in this port.
656 SUPERV::Port InPort( in string aParameterName , in string aParameterType ) ;
657 /*! Creates an Output port in an Inline node.
658 \param aParameterName This value sets the name of the parameter which will be defined in this port.
659 \param aParameterType This value sets the type of the parameter which will be defined in this port.
661 SUPERV::Port OutPort( in string aParameterName , in string aParameterType ) ;
663 /*! Creates an Input DataStreamPort in an Inline node.
664 \param aParameterName This value sets the name of the parameter which will be defined in this port.
665 \param aParameterType This value sets the type of the parameter which will be defined in this port.
667 SUPERV::StreamPort InStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ;
669 /*! Creates an Output DataStreamPort in an Inline node.
670 \param aParameterName This value sets the name of the parameter which will be defined in this port.
671 \param aParameterType This value sets the type of the parameter which will be defined in this port.
673 SUPERV::StreamPort OutStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ;
676 /*! \brief %GNode class
678 This class is necessary for management of GOTO/EndLoop/EndSwitch nodes in the dataflow.
679 Besides the inherited methods it contains some methods allowing to define the couple node, which will be linked to this one.
681 // GOTO/EndLoop/EndSwitch Nodes
683 interface GNode : INode {
685 /*! Sets the coupled InLine Node to this GOTO/EndLoop/EndSwitch Node.
687 boolean SetCoupled( in string anInLineNode ) ;
688 /*! Returns the coupled InLine Node to this GOTO/EndLoop/EndSwitch Node.
690 SUPERV::INode Coupled() ;
692 /*! %Loop Nodes class
696 interface LNode : GNode {
698 /*! Sets Python Init function of the Loop Node.
699 \param InitName Name of the Init function
700 \param aPyInitFunction Python Init function
702 void SetPyInit( in string InitName ,
703 in SUPERV::ListOfStrings aPyInitFunction ) ;
704 /*! Returns Python Init function of the Loop Node.
706 SUPERV::ListOfStrings PyInit() ;
707 /*! Returns the name of the Python Init function of the Loop Node.
709 string PyInitName() ;
711 /*! Sets Python More function of the Loop Node.
712 \param MoreName Name of the More function
713 \param aPyMoreFunction Python More function
715 void SetPyMore( in string MoreName ,
716 in SUPERV::ListOfStrings aPyMoreFunction ) ;
717 /*! Returns Python More function of the Loop Node.
719 SUPERV::ListOfStrings PyMore() ;
720 /*! Returns the name of the Python More function of the Loop Node.
722 string PyMoreName() ;
724 /*! Sets Python Next function of the Loop Node.
725 \param NextName Name of the Next function
726 \param aPy NextFunction Python Next function
728 void SetPyNext( in string NextName ,
729 in SUPERV::ListOfStrings aPyNextFunction ) ;
731 /*! Returns Python Next function of the Loop Node.
733 SUPERV::ListOfStrings PyNext() ;
734 /*! Returns the name of the Python Next function of the Loop Node.
736 string PyNextName() ;
742 interface ELNode : GNode {
748 interface SNode : GNode {
754 interface ESNode : GNode {
758 /*! \brief Interface of a graph
760 This interface includes a set of methods used for management of the graphs in %SUPERVISION module.
764 interface Graph : GNode {
767 /*! Creates a Computing Node in a Graph.
769 SUPERV::CNode CNode( in SALOME_ModuleCatalog::Service aService ) ;
771 /*! Creates a Factory Node in a Graph.
773 SUPERV::FNode FNode( in string aComponentName ,
774 in string anInterfaceName ,
775 in SALOME_ModuleCatalog::Service aService ) ;
777 /*! Creates an InLine Node in a Graph.
779 SUPERV::INode INode( in string FuncName , in ListOfStrings aPythonFunction ) ;
781 /*! Creates a GOTO Node and links it to the corresponding InLine node.
783 SUPERV::GNode GNode( in string FuncName , in ListOfStrings aPythonFunction ,
784 in string anINode ) ;
786 /*! Creates a Loop Node ("for" or "while" loop) and links it to the corresponding end of loop node.
788 SUPERV::LNode LNode( in string InitName , in ListOfStrings InitFunction ,
789 in string MoreName , in ListOfStrings MoreFunction ,
790 in string NextName , in ListOfStrings NextFunction ,
791 out SUPERV::INode anEndOfLoop ) ;
793 /*! Creates a conditional "if/elseif/else" or "switch" node and the corresponding end node
795 SUPERV::SNode SNode( in string FuncName , in ListOfStrings aPythonFunction ,
796 out SUPERV::INode anEndOfSwitch ) ;
798 /*! Creates a "MacroNode" node which corresponds to a Graph with a xml file
800 SUPERV::Graph MNode( in string aXmlFileName ) ;
802 /*! Creates a "MacroNode" node which corresponds to a Graph with a Graph
804 SUPERV::Graph GraphMNode( in Graph aGraph ) ;
806 /*! Returns a Graph of a "MacroNode" or a "MacroNode" of a Graph
808 SUPERV::Graph FlowObjRef() ;
810 /*! Returns a StreamGraph of a "MacroNode" or a "MacroNode" of a StreamGraph
812 SUPERV::StreamGraph StreamObjRef() ;
814 /*! Returns an existing node with a definite name.
815 \param aNodeName Name of the Node.
817 SUPERV::CNode Node( in string aNodeName ) ;
819 /*! Creates a CORBA Component Object Reference
821 Engines::Component ComponentRef( in string aComputerContainer ,
822 in string aComponentName ) ;
824 /*! Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph
826 SUPERV::Link Link( in SUPERV::Port OutputPort ,
827 in SUPERV::Port InputPort ) ;
830 Imports a graph into a file with XML format
831 \param anXmlFile String parameter defining the name of the XML file.
832 \return True, if the graph has been successfully imported.
834 boolean Import( in string anXmlFile ) ;
837 Exports a graph from a file with XML format
838 \param anXmlFile String parameter defining the name of the XML file.
839 \return True, if the graph has been successfully imported.
841 boolean Export( in string anXmlFile ) ;
844 Returns True if the graph is read Only.
846 boolean IsReadOnly() ;
849 Starts asynchronous execution of the graph.
854 Assigns to the %Node an %Event and a %State of the %Node, if the Event is
855 available. And returns immediately Nil, NoEvent and NoState if not.
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 EventNoW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
862 out SUPERV::GraphState aState ) ;
865 Assigns to the %Node an %Event and a %State of the %Node, if the Event is
866 available. Waits if it is not available at the current moment.
867 Returns false if the graph is finished, suspended, killed or stopped.
868 \param aNode %Node for which this method is called
869 \param anEvent An operation, which has been performed on this node(graph).
870 \param aState Current state of the graph
872 boolean Event( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
873 out SUPERV::GraphState aState ) ;
875 // Same as Event but execution of the thread is suspended between the
876 // return of EventW and the next call to EventW
878 Assigns to the %Node an %Event and a %State of the %Node, if the Event is
879 available. And returns immediately Nil, NoEvent and NoState if not.
880 Returns false if the graph is finished, suspended, killed or stopped.
881 \note <BR>Execution of the thread is suspended between the return of this
882 method and its next usage.
883 \param aNode %Node for which this method is called
884 \param anEvent An operation, which has been performed on this node(graph).
885 \param aState Current state of the graph
887 boolean EventW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
888 out SUPERV::GraphState aState ) ;
889 /*! \name Methods used for inner debugging purposes of threads management :
895 SUPERV::ListOfNodes LevelNodes( in long aLevel ) ;
901 Returns the number of currently running threads.
905 Returns the number of suspended threads.
907 long SuspendedThreads();
909 Returns True if the graph is valid.
913 Returns True if the graph can be executed.
915 boolean IsExecutable() ;
917 Returns True if the graph is being currently edited.
919 boolean IsEditing() ;
921 Returns True if the graph is being currently executed.
923 boolean IsExecuting() ;
925 long LastLevelDone() ;
928 Launches step-by-step execution of the graph.
929 \note The execution is suspended immediatly after performance of operations of the first node and
930 user can specify the nodes, where execution will be again suspended after its resuming.
934 Allows to copy one graph into another.
936 SUPERV::Graph Copy() ;
938 Convert a FlowGraph to a StreamGraph.
940 SUPERV::StreamGraph ToStreamGraph() ;
944 boolean Merge( in Graph aGraph ) ;
946 Returns a list of nodes of the graph.
948 SUPERV::ListOfNodes Nodes() ;
950 Returns a list of links of the graph.
952 SUPERV::ListOfLinks GLinks() ;
954 Gets IOR of the garph.
959 Returns the number of independent subgraphs
961 long SubGraphsNumber() ;
963 Returns a list of Nodes of a SubGraph.
965 SUPERV::ListOfNodes SubGraphsNodes( in long SubGraphNumber ) ;
967 /*! Forces use of Editor's data model and destroy of Executor
977 /*! \brief Interface of a StreamGraph
979 This interface includes a set of methods used for management of the graphs in %SUPERVISION module.
982 /////////////////////
983 interface StreamGraph : Graph {
984 /////////////////////
987 Allows to copy one graph into another.
989 SUPERV::StreamGraph StreamCopy() ;
990 /*! Creates a "MacroNode" node which corresponds to a StreamGraph with a xml file
992 SUPERV::StreamGraph StreamMNode( in string aXmlFileName ) ;
994 /*! Creates a "MacroNode" node which corresponds to a StreamGraph with a Graph
996 SUPERV::StreamGraph StreamGraphMNode( in StreamGraph aStreamGraph ) ;
999 Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph
1001 SUPERV::StreamLink StreamLink( in SUPERV::StreamPort OutputPort ,
1002 in SUPERV::StreamPort InputPort ) ;
1005 Returns a list of links of the graph.
1007 SUPERV::ListOfStreamLinks GStreamLinks() ;
1008 boolean SetStreamParams( in long Timeout ,
1009 in SUPERV::KindOfDataStreamTrace DataStreamTrace ,
1010 in double DeltaTime ) ;
1011 void StreamParams( out long Timeout ,
1012 out SUPERV::KindOfDataStreamTrace DataStreamTrace ,
1013 out double DeltaTime ) ;
1016 Returns the number of independent subStreamgraphs
1018 long SubStreamGraphsNumber() ;
1020 Returns a list of Nodes of a SubStreamGraph.
1022 SUPERV::ListOfNodes SubStreamGraphsNodes( in long SubStreamGraphNumber ) ;
1025 Convert a StreamGraph to a FlowGraph.
1027 SUPERV::Graph ToFlowGraph() ;
1030 Merge a StreamGraph.
1032 boolean StreamMerge( in StreamGraph aStreamGraph ) ;
1041 /*! \brief Interface of the %link
1043 This interface contains a set of methods used for representation and management of the links
1044 connecting nodes in a %graph.
1048 interface Link : Engines::Component {
1051 Returns the %Output %Port of the Link
1053 SUPERV::Port OutPort() ;
1056 Returns the %Input %Port of the Link
1058 SUPERV::Port InPort() ;
1061 /*! \name Methods used for representation of links in GUI of %SALOME application :
1065 Returns the number of coordinate points which are included in the link.
1066 \note <BR>Every link can contain a set of coordinate points which constitute it. These points have
1067 index numbers (beginning from 1) and coordinates defining their position in the window. Indexing of
1068 the points starts from input port to output port of the corresponding link.
1072 Adds a coordinate point to the link.
1073 \param index Index of the point.
1074 \param X Coordinates of the point.
1075 \param Y Coordinates of the point.
1077 boolean AddCoord( in long index , in long X , in long Y ) ;
1079 Changes the location of a definite 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 ChangeCoord( in long index , in long X , in long Y ) ;
1087 Removes a coordinate point of the link.
1088 \param index Index of the point.
1091 boolean RemoveCoord( in long index ) ;
1094 Sets the location of a coordinate point of the link.
1095 \param index Index of the point.
1096 \param X Coordinates of the point.
1097 \param Y Coordinates of the point.
1100 boolean Coords( in long index , out long X , out long Y ) ;
1105 /*! Checks if the types of Ports that it connects are compatible
1109 /*! Check if the Link equals to the another given Link
1111 boolean IsEqual( in SUPERV::Link aLink );
1120 /*! \brief Interface of the %link
1122 This interface contains a set of methods used for representation and management of the links
1123 connecting nodes in a %graph.
1126 ////////////////////
1127 interface StreamLink : Link {
1128 ////////////////////
1130 Returns the %Output %StreamPort of the StreamLink
1132 SUPERV::StreamPort OutStreamPort() ;
1135 Returns the %Input %StreamPort of the StreamLink
1137 SUPERV::StreamPort InStreamPort() ;
1146 /*! \brief %Value interface
1148 This interface contains a set of methods used for setting initial parameters of the ports
1152 interface Value : Engines::Component {
1155 Converts the given value into a value of string type.
1159 Converts the given value into a value of independant data type.
1163 Returns True if the value represents an IOR.
1167 Gets data type of the component.
1169 string ComponentDataType() ;
1174 /*! \brief %Port interface
1176 This interface contains a set of methods used for management of the ports.
1180 interface Port : Value {
1184 Gives a value to an Input %Port
1185 \param aValue This parameter defines the input value
1187 boolean Input( in SUPERV::Value aValue ) ;
1190 Returns the node of the port
1192 SUPERV::CNode Node() ;
1194 Sets the name of the port.
1198 /* Gets the type of a port.
1199 \return A string defining the type of a port
1204 // Link of an Input Port
1206 Returns the link of an %Input %Port
1208 SUPERV::Link Link() ;
1211 Returns a list of links of an Input %Port of an EndSwitchNode
1213 SUPERV::ListOfLinks Links() ;
1216 Returns True if this port appears to be an %Input %Port of a Node
1221 Returns True if an %Input %Value exists for that %Input %Port (without link)
1223 boolean HasInput() ;
1226 Returns True if the %Port is linked (without value)
1228 // Port with link (without Value)
1229 boolean IsLinked() ;
1232 /*! Returns the type of this port.
1234 SUPERV::KindOfPort Kind() ;
1236 // Port from the service of the node
1238 Returns True if the %Port is a parameter of a service
1241 // Port is a Gate of the node
1243 Returns True if the %Port appears to be a Gate Port of the Node
1246 // Port is a parameter of an InLineNode
1248 Returns True if the %Port appears to be a parameter of an InLine Node.
1250 boolean IsInLine() ;
1252 // Port is a LoopParameter (InitLoop or DoLoop) of an LoopNode
1254 Returns True if the %Port appears to be a Loop Parameter (InitLoop or DoLoop) of a Loop Node
1257 // Port is an output parameter of a SwitchNode connected to an InGate
1259 Returns True if the %Port appears to be a parameter of a switch node
1261 // Port is a parameter of a switch node
1262 boolean IsSwitch() ;
1263 // Port is an Input parameter of a EndSwitchNode connected to several output ports
1265 Returns True if the %Port appears to be an EndSwitch Node connected to several output ports.
1267 boolean IsEndSwitch() ;
1269 boolean IsDataStream() ;
1271 /*! Returns the current state of the port.
1273 SUPERV::GraphState State() ;
1274 /*! Returns True if computation is finished.
1278 /*! deactivate the objref of a Port when its node is destroyed
1284 ////////////////////
1285 interface StreamPort : Port {
1286 ////////////////////
1288 // Link of a StreamPort
1290 Returns the link of a %StreamPort
1292 SUPERV::StreamLink StreamLink() ;
1294 /*! Returns the current Dependency of the DataStreamPort : TimeDependency or IterationDependency
1296 SALOME_ModuleCatalog::DataStreamDependency Dependency() ;
1297 boolean SetDependency( in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ;
1299 /*! Sets or Returns the current kinds of Schema, Interpolation and Extrapolation of the InDataStreamPort
1301 boolean SetParams( in KindOfSchema aKindOfSchema ,
1302 in KindOfInterpolation aKindOfInterpolation ,
1303 in KindOfExtrapolation aKindOfExtrapolation ) ;
1304 boolean Params( out KindOfSchema aKindOfSchema ,
1305 out KindOfInterpolation aKindOfInterpolation ,
1306 out KindOfExtrapolation aKindOfExtrapolation ) ;
1308 /*! Sets or Returns the current number of values ("NIVEAU") of the OutDataStreamPort
1310 boolean SetNumberOfValues( in long aNumberOfValues ) ;
1311 long NumberOfValues() ;