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.salome-platform.org/ or email : webmaster.salome@opencascade.com
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 //DumpPython is defined in SALOME_Component.idl (SALOMEDS::Driver)
232 // SALOMEDS::TMPFile DumpPython( in SALOMEDS::Study theStudy ,
233 // in boolean isPublished ,
234 // out boolean isValisScript ) ;
237 Constructs a graph with possibility to read/edit it
238 \param aGraph %aGraphName or %aGraphXmlFile
240 SUPERV::Graph Graph(in string aGraph ) ; // aGraphName or aGraphXmlFile
243 Constructs a read Only graph ( for execution ).
244 \note <BR>In this graph there is also a possibility to update nodes, coordinates of the links,
245 of container names and input data.
246 \param aGraph %aGraphName or %aGraphXmlFile
248 SUPERV::Graph GraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile
251 Constructs a StreamGraph with possibility to read/edit it
252 \param aGraph %aGraphName or %aGraphXmlFile
254 SUPERV::StreamGraph StreamGraph(in string aGraph ) ; // aGraphName or aGraphXmlFile
257 Constructs a read Only StreamGraph ( for execution ).
258 \note <BR>In this graph there is also a possibility to update nodes, coordinates of the links,
259 of container names and input data.
260 \param aGraph %aGraphName or %aGraphXmlFile
262 SUPERV::StreamGraph StreamGraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile
265 Creates a value of <b>string</b> type which will be used for <VAR>Input</VAR> method in the interface %Node.
266 \param aString Input value of string type.
268 SUPERV::Value StringValue( in string aString ) ;
270 Creates a value of <b>any</b> type which will be used for <VAR>Input</VAR> method in the interface %Node.
271 \param anAny Input value of any type.
273 SUPERV::Value AnyValue( in any anAny ) ;
275 Gets a graph with a definite %IOR
276 \param ior String parameter defining %IOR of the graph.
278 SUPERV::Graph getGraph(in string ior); // get Graph from is IOR
281 Gets a graph with a definite %IOR
282 \param ior String parameter defining %IOR of the graph.
284 SUPERV::StreamGraph getStreamGraph(in string ior); // get Graph from is IOR
288 /*! \brief %CNode interface
290 This is a base class of the SUPERVISION module. It contains a set of methods allowing:
292 <li>creating a <b>Computation</b> node and setting its parameters (Name, Author, Comments etc.)
293 <li>checking the current state of the node in the data flow
294 <li>node execution follow-up
295 <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)
300 interface CNode : Engines::Component {
305 Returns the name of the node(graph).
309 Returns the service of this node .
311 SALOME_ModuleCatalog::Service Service() ;
313 Returns the type of the node.
315 SUPERV::KindOfNode Kind() ;
317 Returns the date of creation of the node(graph).
319 SUPERV::SDate CreationDate() ;
321 Returns the date of last update of the node(graph).
323 SUPERV::SDate LastUpdateDate() ;
325 Returns the name of the version of the node(graph).
329 Returns the name of the author of the node(graph).
333 Returns the string containing comments about this node(graph).
339 Sets the name of the node(graph).
340 \param aNewName String value defining the name of the node(graph).
341 \return True if the name has been updated.
343 boolean SetName(in string aNewName ) ;
345 Sets the name of the author. Returns True if it is updated.
346 \param anAuthor String value defining the name of the author.
347 \return True if the name has been updated.
349 boolean SetAuthor(in string anAuthor ) ;
351 Allows to update the comments about this node(graph).
352 \param aComment String value containing a comment to this node(graph).
353 \return True if the old comment has been updated.
355 boolean SetComment(in string aComment ) ;
358 Gets a port of the node (for compatibility : see GetInPort - GetOutPort).
360 SUPERV::Port Port( in string aParameterName ) ;
362 /*! Gets an Input port in a node.
363 \param aParameterName This value sets the name of the parameter which will be defined in this port.
365 SUPERV::Port GetInPort( in string aParameterName ) ;
367 /*! Gets an Output port in a node.
368 \param aParameterName This value sets the name of the parameter which will be defined in this port.
370 SUPERV::Port GetOutPort( in string aParameterName ) ;
372 /*! Gets an Input StreamPort in a node.
373 \param aParameterName This value sets the name of the parameter which will be defined in this port.
375 SUPERV::StreamPort GetInStreamPort( in string aParameterName ) ;
377 /*! Gets an Output StreamPort in a node.
378 \param aParameterName This value sets the name of the parameter which will be defined in this port.
380 SUPERV::StreamPort GetOutStreamPort( in string aParameterName ) ;
383 Returns true if a Node (or Graph) has StreamPorts
385 boolean HasStreamPort() ;
388 Enters a value into an Input %Port
390 SUPERV::Port Input( in string InputParameterName ,
394 Gets a list of ports of the node(graph)
396 SUPERV::ListOfPorts Ports() ;
399 Gets a list of ports of the node(graph)
401 SUPERV::ListOfStreamPorts StreamPorts() ;
403 /*! Gets a list of links of a node(graph)
405 SUPERV::ListOfLinks Links() ;
407 /*! Gets a list of StreamLinks of a node(graph)
409 SUPERV::ListOfStreamLinks StreamLinks() ;
412 Returns True if this node is a graph.
414 boolean IsStreamGraph() ;
416 Returns True if this node is a graph.
421 Returns True if this node is a MacroNode of a DataFlowGraph or a DataStreamGraph.
425 Returns True if this node is a MacroNode of a DataFlowGraph.
427 boolean IsFlowMacro() ;
429 Returns True if this node is a MacroNode of a DataStreamGraph.
431 boolean IsStreamMacro() ;
434 Returns True if this node is a Head Graph .
436 boolean IsHeadGraph() ;
438 Returns the MacroNode Level of this node.
443 Returns True if the node appears to be a %computing node.
445 boolean IsComputing() ;
447 Returns True if the node appears to be a %factory node.
449 boolean IsFactory() ;
451 Returns True if the node appears to be an %inline node.
455 Returns True if the node appears to be a %GOTO node.
459 Returns True if the node appears to be a %loop node.
463 Returns True if the node appears to be an %endloop node.
465 boolean IsEndLoop() ;
467 Returns True if the node appears to be a %switch node.
471 Returns True if the node appears to be a %endswitch node.
473 boolean IsEndSwitch() ;
476 Returns the numero of subgraph of a node.
480 Returns the numero of substreamgraph of a node.
482 long SubStreamGraph() ;
485 Returns the number of threads of the graph.
490 Returns True if the node(graph) is waiting for Data input
492 boolean IsWaiting() ;
495 Returns True if the node(graph) is ready for execution
500 Returns True if the node(graph) is currently running
502 boolean IsRunning() ;
505 Returns True if execution is finished
510 Returns True if execution is suspended
513 boolean IsSuspended() ;
515 Returns the current state of the graph.
517 SUPERV::GraphState State() ;
520 Waits for ready_to_run state, Suspend and return.
524 /*! Waits for running state, Suspend and return.
528 /*! Waits for done state, Suspend and return.
532 /*! Waits for Suspend state and return.
534 boolean SuspendedW() ;
540 If not running : will be killed when ready to run.
541 If running : kills immediatly.
547 Execution will be killed only just after running (only for nodes).
553 If not running : will be stopped when ready to run.
554 If running : stops immediatly
557 /*! Suspends execution.
559 If not running : will be Suspended when ready to run. It is used in step-by-step execution.
560 If running : suspends immediatly
563 /*! Suspends execution only just after running.
565 boolean SuspendDone();
567 /*! Resumes execution.
569 If Suspended : running will be continued.
570 If not Suspended : cancels the current ControlState ( Suspend, Kill, ...)
575 // Control state required : Kill, Suspend, Stop
577 Returns control state of the node(graph).
579 SUPERV::ControlState Control() ;
581 Clears the control state of the node(graph).
583 void ControlClear() ;
585 boolean ContainerKill();
588 Sets the position of the node in the window.
590 void Coords( in long X , in long Y ) ;
592 Returns the position of the node along X-axis.
596 Returns the position of the node along Y-axis.
600 Returns the Cpu used by a node for execution of calculations in seconds.
605 /*! \brief %FNode class
607 This class is necessary for management of factory nodes in a data flow. Besides the inherited methods it contains some methods allowing to define
608 the component from the container, which will be called for execution of the calculation.
611 interface FNode : CNode {
613 /*! Gets the name of the component, which will be called for execution of the calculation.
615 string GetComponentName() ;
616 /*! Gets the name of the interface of the component.
618 string GetInterfaceName() ;
619 /*! Gets the container containing the component, which will be called for execution of the calculation.
621 string GetContainer() ;
622 /*! Sets the name of the component, which will be called for execution of the calculation.
623 \param aComponentName Name of the component.
625 boolean SetComponentName(in string aComponentName ) ;
626 /*! Sets the name of the interface of the component.
627 \param anInterfaceName Name of the interface.
629 boolean SetInterfaceName(in string anInterfaceName ) ;
630 /*! Gets the container containing the component, which will be called for execution of the calculation.
631 \param aContainer Container containing the component.
633 boolean SetContainer(in string aContainer ) ;
634 /*! Method to define if %FNode gets from a component, which is implemented in C++ or Python.
635 Returns True if it's a C++ component node
640 /*! \brief %INode class
642 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
643 executed for performing calculations, as well as input and output parameters for the node.
647 interface INode : CNode {
650 /*! Sets Python function for the InLine Node.
651 \param FuncName Name of the function
652 \param aPyInitFunction Python initialization function of the InLine Node
654 void SetPyFunction( in string FuncName ,
655 in SUPERV::ListOfStrings aPyInitFunction ) ;
656 /*! Returns Python function of the InLine Node.
658 SUPERV::ListOfStrings PyFunction() ;
659 /*! Returns the name of the Python function of the InLine Node.
661 string PyFuncName() ;
663 /*! Creates an Input port in a 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::Port InPort( in string aParameterName , in string aParameterType ) ;
668 /*! Creates an Output port in an Inline node.
669 \param aParameterName This value sets the name of the parameter which will be defined in this port.
670 \param aParameterType This value sets the type of the parameter which will be defined in this port.
672 SUPERV::Port OutPort( in string aParameterName , in string aParameterType ) ;
674 /*! Creates an Input DataStreamPort in an Inline node.
675 \param aParameterName This value sets the name of the parameter which will be defined in this port.
676 \param aParameterType This value sets the type of the parameter which will be defined in this port.
678 SUPERV::StreamPort InStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ;
680 /*! Creates an Output DataStreamPort in an Inline node.
681 \param aParameterName This value sets the name of the parameter which will be defined in this port.
682 \param aParameterType This value sets the type of the parameter which will be defined in this port.
684 SUPERV::StreamPort OutStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ;
687 /*! \brief %GNode class
689 This class is necessary for management of GOTO/EndLoop/EndSwitch nodes in the dataflow.
690 Besides the inherited methods it contains some methods allowing to define the couple node, which will be linked to this one.
692 // GOTO/EndLoop/EndSwitch Nodes
694 interface GNode : INode {
696 /*! Sets the coupled InLine Node to this GOTO/EndLoop/EndSwitch Node.
698 boolean SetCoupled( in string anInLineNode ) ;
699 /*! Returns the coupled InLine Node to this GOTO/EndLoop/EndSwitch Node.
701 SUPERV::INode Coupled() ;
703 /*! %Loop Nodes class
707 interface LNode : GNode {
709 /*! Sets Python Init function of the Loop Node.
710 \param InitName Name of the Init function
711 \param aPyInitFunction Python Init function
713 void SetPyInit( in string InitName ,
714 in SUPERV::ListOfStrings aPyInitFunction ) ;
715 /*! Returns Python Init function of the Loop Node.
717 SUPERV::ListOfStrings PyInit() ;
718 /*! Returns the name of the Python Init function of the Loop Node.
720 string PyInitName() ;
722 /*! Sets Python More function of the Loop Node.
723 \param MoreName Name of the More function
724 \param aPyMoreFunction Python More function
726 void SetPyMore( in string MoreName ,
727 in SUPERV::ListOfStrings aPyMoreFunction ) ;
728 /*! Returns Python More function of the Loop Node.
730 SUPERV::ListOfStrings PyMore() ;
731 /*! Returns the name of the Python More function of the Loop Node.
733 string PyMoreName() ;
735 /*! Sets Python Next function of the Loop Node.
736 \param NextName Name of the Next function
737 \param aPy NextFunction Python Next function
739 void SetPyNext( in string NextName ,
740 in SUPERV::ListOfStrings aPyNextFunction ) ;
742 /*! Returns Python Next function of the Loop Node.
744 SUPERV::ListOfStrings PyNext() ;
745 /*! Returns the name of the Python Next function of the Loop Node.
747 string PyNextName() ;
753 interface ELNode : GNode {
759 interface SNode : GNode {
765 interface ESNode : GNode {
769 /*! \brief Interface of a graph
771 This interface includes a set of methods used for management of the graphs in %SUPERVISION module.
775 interface Graph : GNode {
778 /*! Creates a Computing Node in a Graph.
780 SUPERV::CNode CNode( in SALOME_ModuleCatalog::Service aService ) ;
782 /*! Creates a Factory Node in a Graph.
784 SUPERV::FNode FNode( in string aComponentName ,
785 in string anInterfaceName ,
786 in SALOME_ModuleCatalog::Service aService ,
787 in boolean isCimpl ) ;
789 /*! Creates an InLine Node in a Graph.
791 SUPERV::INode INode( in string FuncName , in ListOfStrings aPythonFunction ) ;
793 /*! Creates a GOTO Node and links it to the corresponding InLine node.
795 SUPERV::GNode GNode( in string FuncName , in ListOfStrings aPythonFunction ,
796 in string anINode ) ;
798 /*! Creates a Loop Node ("for" or "while" loop) and links it to the corresponding end of loop node.
800 SUPERV::LNode LNode( in string InitName , in ListOfStrings InitFunction ,
801 in string MoreName , in ListOfStrings MoreFunction ,
802 in string NextName , in ListOfStrings NextFunction ,
803 out SUPERV::INode anEndOfLoop ) ;
805 /*! Creates a conditional "if/elseif/else" or "switch" node and the corresponding end node
807 SUPERV::SNode SNode( in string FuncName , in ListOfStrings aPythonFunction ,
808 out SUPERV::INode anEndOfSwitch ) ;
810 /*! Creates a "MacroNode" node which corresponds to a Graph with a xml file
812 SUPERV::Graph MNode( in string aXmlFileName ) ;
814 /*! Creates a "MacroNode" node which corresponds to a Graph with a Graph
816 SUPERV::Graph GraphMNode( in Graph aGraph ) ;
818 /*! Returns a Graph of a "MacroNode" or a "MacroNode" of a Graph
820 SUPERV::Graph FlowObjRef() ;
822 /*! Returns a StreamGraph of a "MacroNode" or a "MacroNode" of a StreamGraph
824 SUPERV::StreamGraph StreamObjRef() ;
826 /*! Returns an existing node with a definite name.
827 \param aNodeName Name of the Node.
829 SUPERV::CNode Node( in string aNodeName ) ;
831 /*! Creates a CORBA Component Object Reference
833 Engines::Component ComponentRef( in string aComputerContainer ,
834 in string aComponentName ) ;
836 /*! Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph
838 SUPERV::Link Link( in SUPERV::Port OutputPort ,
839 in SUPERV::Port InputPort ) ;
842 Give the last error[s] message[s]
843 \return string[s] corresponding to last error[s].
848 Imports a graph into a file with XML format
849 \param anXmlFile String parameter defining the name of the XML file.
850 \return True, if the graph has been successfully imported.
852 boolean Import( in string anXmlFile ) ;
855 Exports a graph to a file with XML format
856 \param anXmlFile String parameter defining the name of the XML file.
857 \return True, if the graph has been successfully exported.
859 boolean Export( in string anXmlFile ) ;
862 Exports a graph to a string in python format
864 string SavePY( in boolean importSuperV ) ;
867 Returns True if the graph is read Only.
869 boolean IsReadOnly() ;
872 Starts asynchronous execution of the graph.
877 Assigns to the %Node an %Event and a %State of the %Node, if the Event is
878 available. And returns immediately Nil, NoEvent and NoState if not.
879 Returns false if the graph is finished, suspended, killed or stopped.
880 \param aNode %Node for which this method is called
881 \param anEvent An operation, which has been performed on this node(graph).
882 \param aState Current state of the graph
884 boolean EventNoW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
885 out SUPERV::GraphState aState ) ;
888 Assigns to the %Node an %Event and a %State of the %Node, if the Event is
889 available. Waits if it is not available at the current moment.
890 Returns false if the graph is finished, suspended, killed or stopped.
891 \param aNode %Node for which this method is called
892 \param anEvent An operation, which has been performed on this node(graph).
893 \param aState Current state of the graph
895 boolean Event( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
896 out SUPERV::GraphState aState ) ;
898 // Same as Event but execution of the thread is suspended between the
899 // return of EventW and the next call to EventW
901 Assigns to the %Node an %Event and a %State of the %Node, if the Event is
902 available. And returns immediately Nil, NoEvent and NoState if not.
903 Returns false if the graph is finished, suspended, killed or stopped.
904 \note <BR>Execution of the thread is suspended between the return of this
905 method and its next usage.
906 \param aNode %Node for which this method is called
907 \param anEvent An operation, which has been performed on this node(graph).
908 \param aState Current state of the graph
910 boolean EventW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
911 out SUPERV::GraphState aState ) ;
912 /*! \name Methods used for inner debugging purposes of threads management :
918 SUPERV::ListOfNodes LevelNodes( in long aLevel ) ;
924 Returns the number of currently running threads.
928 Returns the number of suspended threads.
930 long SuspendedThreads();
932 Returns True if the graph is valid.
936 Returns True if the graph can be executed.
938 boolean IsExecutable() ;
940 Returns True if the graph is being currently edited.
942 boolean IsEditing() ;
944 Returns True if the graph is being currently executed.
946 boolean IsExecuting() ;
948 long LastLevelDone() ;
951 Launches step-by-step execution of the graph.
952 \note The execution is suspended immediatly after performance of operations of the first node and
953 user can specify the nodes, where execution will be again suspended after its resuming.
957 Allows to copy one graph into another.
959 SUPERV::Graph Copy() ;
961 Convert a FlowGraph to a StreamGraph.
963 SUPERV::StreamGraph ToStreamGraph() ;
967 boolean Merge( in Graph aGraph ) ;
969 Returns a list of nodes of the graph.
971 SUPERV::ListOfNodes Nodes() ;
973 Returns a list of links of the graph.
975 SUPERV::ListOfLinks GLinks() ;
977 Gets IOR of the garph.
982 Returns the number of independent subgraphs
984 long SubGraphsNumber() ;
986 Returns a list of Nodes of a SubGraph.
988 SUPERV::ListOfNodes SubGraphsNodes( in long SubGraphNumber ) ;
990 /*! Forces use of Editor's data model and destroy of Executor
1000 /*! \brief Interface of a StreamGraph
1002 This interface includes a set of methods used for management of the graphs in %SUPERVISION module.
1005 /////////////////////
1006 interface StreamGraph : Graph {
1007 /////////////////////
1010 Allows to copy one graph into another.
1012 SUPERV::StreamGraph StreamCopy() ;
1013 /*! Creates a "MacroNode" node which corresponds to a StreamGraph with a xml file
1015 SUPERV::StreamGraph StreamMNode( in string aXmlFileName ) ;
1017 /*! Creates a "MacroNode" node which corresponds to a StreamGraph with a Graph
1019 SUPERV::StreamGraph StreamGraphMNode( in StreamGraph aStreamGraph ) ;
1022 Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph
1024 SUPERV::StreamLink StreamLink( in SUPERV::StreamPort OutputPort ,
1025 in SUPERV::StreamPort InputPort ) ;
1028 Returns a list of links of the graph.
1030 SUPERV::ListOfStreamLinks GStreamLinks() ;
1031 boolean SetStreamParams( in long Timeout ,
1032 in SUPERV::KindOfDataStreamTrace DataStreamTrace ,
1033 in double DeltaTime ) ;
1034 void StreamParams( out long Timeout ,
1035 out SUPERV::KindOfDataStreamTrace DataStreamTrace ,
1036 out double DeltaTime ) ;
1039 Returns the number of independent subStreamgraphs
1041 long SubStreamGraphsNumber() ;
1043 Returns a list of Nodes of a SubStreamGraph.
1045 SUPERV::ListOfNodes SubStreamGraphsNodes( in long SubStreamGraphNumber ) ;
1048 Convert a StreamGraph to a FlowGraph.
1050 SUPERV::Graph ToFlowGraph() ;
1053 Merge a StreamGraph.
1055 boolean StreamMerge( in StreamGraph aStreamGraph ) ;
1064 /*! \brief Interface of the %link
1066 This interface contains a set of methods used for representation and management of the links
1067 connecting nodes in a %graph.
1071 interface Link : Engines::Component {
1074 Returns the %Output %Port of the Link
1076 SUPERV::Port OutPort() ;
1079 Returns the %Input %Port of the Link
1081 SUPERV::Port InPort() ;
1084 /*! \name Methods used for representation of links in GUI of %SALOME application :
1088 Returns the number of coordinate points which are included in the link.
1089 \note <BR>Every link can contain a set of coordinate points which constitute it. These points have
1090 index numbers (beginning from 1) and coordinates defining their position in the window. Indexing of
1091 the points starts from input port to output port of the corresponding link.
1095 Adds a coordinate point to the link.
1096 \param index Index of the point.
1097 \param X Coordinates of the point.
1098 \param Y Coordinates of the point.
1100 boolean AddCoord( in long index , in long X , in long Y ) ;
1102 Changes the location of a definite coordinate point of the link.
1103 \param index Index of the point.
1104 \param X Coordinates of the point.
1105 \param Y Coordinates of the point.
1108 boolean ChangeCoord( in long index , in long X , in long Y ) ;
1110 Removes a coordinate point of the link.
1111 \param index Index of the point.
1114 boolean RemoveCoord( in long index ) ;
1117 Sets the location of a coordinate point of the link.
1118 \param index Index of the point.
1119 \param X Coordinates of the point.
1120 \param Y Coordinates of the point.
1123 boolean Coords( in long index , out long X , out long Y ) ;
1128 /*! Checks if the types of Ports that it connects are compatible
1132 /*! Check if the Link equals to the another given Link
1134 boolean IsEqual( in SUPERV::Link aLink );
1143 /*! \brief Interface of the %link
1145 This interface contains a set of methods used for representation and management of the links
1146 connecting nodes in a %graph.
1149 ////////////////////
1150 interface StreamLink : Link {
1151 ////////////////////
1153 Returns the %Output %StreamPort of the StreamLink
1155 SUPERV::StreamPort OutStreamPort() ;
1158 Returns the %Input %StreamPort of the StreamLink
1160 SUPERV::StreamPort InStreamPort() ;
1169 /*! \brief %Value interface
1171 This interface contains a set of methods used for setting initial parameters of the ports
1175 interface Value : Engines::Component {
1178 Converts the given value into a value of string type.
1182 Converts the given value into a value of independant data type.
1186 Returns True if the value represents an IOR.
1190 Gets data type of the component.
1192 string ComponentDataType() ;
1197 /*! \brief %Port interface
1199 This interface contains a set of methods used for management of the ports.
1203 interface Port : Value {
1207 Gives a value to an Input %Port
1208 \param aValue This parameter defines the input value
1210 boolean Input( in SUPERV::Value aValue ) ;
1213 Returns the node of the port
1215 SUPERV::CNode Node() ;
1217 Sets the name of the port.
1221 /* Gets the type of a port.
1222 \return A string defining the type of a port
1227 // Link of an Input Port
1229 Returns the link of an %Input %Port
1231 SUPERV::Link Link() ;
1234 Returns a list of links of an Input %Port of an EndSwitchNode
1236 SUPERV::ListOfLinks Links() ;
1239 Returns True if this port appears to be an %Input %Port of a Node
1244 Returns True if an %Input %Value exists for that %Input %Port (without link)
1246 boolean HasInput() ;
1249 Returns True if the %Port is linked (without value)
1251 // Port with link (without Value)
1252 boolean IsLinked() ;
1255 /*! Returns the type of this port.
1257 SUPERV::KindOfPort Kind() ;
1259 // Port from the service of the node
1261 Returns True if the %Port is a parameter of a service
1264 // Port is a Gate of the node
1266 Returns True if the %Port appears to be a Gate Port of the Node
1269 // Port is a parameter of an InLineNode
1271 Returns True if the %Port appears to be a parameter of an InLine Node.
1273 boolean IsInLine() ;
1275 // Port is a LoopParameter (InitLoop or DoLoop) of an LoopNode
1277 Returns True if the %Port appears to be a Loop Parameter (InitLoop or DoLoop) of a Loop Node
1280 // Port is an output parameter of a SwitchNode connected to an InGate
1282 Returns True if the %Port appears to be a parameter of a switch node
1284 // Port is a parameter of a switch node
1285 boolean IsSwitch() ;
1286 // Port is an Input parameter of a EndSwitchNode connected to several output ports
1288 Returns True if the %Port appears to be an EndSwitch Node connected to several output ports.
1290 boolean IsEndSwitch() ;
1292 boolean IsDataStream() ;
1294 /*! Returns the current state of the port.
1296 SUPERV::GraphState State() ;
1297 /*! Returns True if computation is finished.
1301 /*! deactivate the objref of a Port when its node is destroyed
1307 ////////////////////
1308 interface StreamPort : Port {
1309 ////////////////////
1311 // Link of a StreamPort
1313 Returns the link of a %StreamPort
1315 SUPERV::StreamLink StreamLink() ;
1317 /*! Returns the current Dependency of the DataStreamPort : TimeDependency or IterationDependency
1319 SALOME_ModuleCatalog::DataStreamDependency Dependency() ;
1320 boolean SetDependency( in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ;
1322 /*! Sets or Returns the current kinds of Schema, Interpolation and Extrapolation of the InDataStreamPort
1324 boolean SetParams( in KindOfSchema aKindOfSchema ,
1325 in KindOfInterpolation aKindOfInterpolation ,
1326 in KindOfExtrapolation aKindOfExtrapolation ) ;
1327 boolean Params( out KindOfSchema aKindOfSchema ,
1328 out KindOfInterpolation aKindOfInterpolation ,
1329 out KindOfExtrapolation aKindOfExtrapolation ) ;
1331 /*! Sets or Returns the current number of values ("NIVEAU") of the OutDataStreamPort
1333 boolean SetNumberOfValues( in long aNumberOfValues ) ;
1334 long NumberOfValues() ;