// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : SUPERV.idl // Author : Jean Rahuel // $Header: /*! \file SUPERV.idl This file contains a set of interfaces of the %SUPERVISION module */ #ifndef __SUPERV_IDL__ #define __SUPERV_IDL__ #include "SALOME_ModuleCatalog.idl" #include "SALOME_Component.idl" #include "SALOMEDS.idl" /*! The main package of interfaces of %SUPERVISION module */ module SUPERV { /*! This enumeration contains a set of elements defining the type of the port. \note
In general, ports represent input or output parameters of the functions, implemented in different kinds of nodes of the graph. */ enum KindOfPort { UndefinedParameter , ServiceParameter , GateParameter , InLineParameter , LoopParameter , SwitchParameter , EndSwitchParameter , GOTOParameter , DataStreamParameter } ; /*! This enumeration contains a set of dependencies of InPorts and OutPorts. */ // enum KindOfDependency { UndefinedDependency , TimeDependency , IterationDependency } ; /*! This enumeration contains a set of schemas of InPorts. */ enum KindOfSchema { SCHENULL , TI , TF , DELTA } ; /*! This enumeration contains a set of interpolations of InPorts. */ enum KindOfInterpolation { INTERNULL , L0 , L1 } ; /*! This enumeration contains a set of extrapolations of InPorts. */ enum KindOfExtrapolation { EXTRANULL , E0 , E1 } ; /*! This enumeration contains a set of dependencies of Ports. */ enum KindOfDataStreamTrace { WithoutTrace , SummaryTrace , DetailedTrace } ; /*! This enumeration contains a set of elements defining the type of the node. */ enum KindOfNode { FactoryNode , DataFlowGraph , ComputingNode , InLineNode , LoopNode , EndLoopNode , SwitchNode , EndSwitchNode , GOTONode , DataStreamGraph , MacroNode , UnknownNode }; /*! This struct contains fields defining the date. */ struct SDate { short Second; short Minute; short Hour; short Day; short Month; short Year; }; /*! This enumeration contains a set of elements defining the type of operation, which has been performed on this node(graph). */ enum GraphEvent { UndefinedEvent , NoEvent , NewThreadEvent , WaitingEvent , ReadyEvent , RunningEvent , DoneEvent , ErroredEvent , SuspendEvent , ResumeEvent , KillEvent , StopEvent } ; // UndefinedState : Non existing Node, Port etc... /*! This enumeration contains a set of elements defining the current state of the node(graph). */ enum GraphState { UndefinedState , NoState , EditingState , SuspendState , WaitingState , ReadyState , SuspendReadyState , RunningState , DoneState , ErrorState , SuspendDoneState , SuspendErroredState , KillState , StopState , LoadingState, NumberOfGraphStates } ; /*! A sequence of string values. */ typedef sequence ListOfStrings ; interface Value ; interface Link ; interface StreamLink ; typedef sequence ListOfLinks ; typedef sequence ListOfStreamLinks ; interface Port ; interface StreamPort ; typedef sequence ListOfPorts ; typedef sequence ListOfStreamPorts ; interface CNode ; interface FNode ; interface INode ; interface GNode ; interface LNode ; interface ELNode ; interface SNode ; interface ESNode ; interface Graph ; interface StreamGraph ; typedef sequence ListOfCNodes ; typedef sequence ListOfFNodes ; typedef sequence ListOfINodes ; typedef sequence ListOfGNodes ; typedef sequence ListOfLNodes ; typedef sequence ListOfELNodes ; typedef sequence ListOfSNodes ; typedef sequence ListOfESNodes ; typedef sequence ListOfGraphs ; /*! This struct contains fields defining different types of nodes. */ struct ListOfNodes { ListOfCNodes CNodes ; ListOfFNodes FNodes ; ListOfINodes INodes ; ListOfGNodes GNodes ; ListOfLNodes LNodes ; ListOfELNodes ELNodes ; ListOfSNodes SNodes ; ListOfESNodes ESNodes ; ListOfGraphs Graphs ; } ; // ToSuspendState : will be Suspended before running if waiting or // will be Suspended while running or // will be Suspended after run // ToSuspendStartState : will be Suspended at the beginning of execution // ToSuspendDoneState : will be Suspended after run /*! This enumeration contains a set of elements defining the %ControlState of the node. The %ControlState gives a possibility to determine the "control actions" which have been done by the user (Suspend, SuspendDone, Kill, etc...). */ enum ControlState { VoidState , ToSuspendStartState , ToSuspendState , ToSuspendDoneState , ToKillState , ToKillDoneState , ToStopState , NumberOfControlStates } ; //////////////// /*! \brief interface %SuperG This interface contains a set of methods necessary for management of a %graph. */ interface SuperG : Engines::Component, SALOMEDS::Driver { //////////////// //DumpPython is defined in SALOME_Component.idl (SALOMEDS::Driver) // SALOMEDS::TMPFile DumpPython( in SALOMEDS::Study theStudy , // in boolean isPublished , // out boolean isValisScript ) ; /*! Constructs a graph with possibility to read/edit it \param aGraph %aGraphName or %aGraphXmlFile */ SUPERV::Graph Graph(in string aGraph ) ; // aGraphName or aGraphXmlFile /*! Constructs a read Only graph ( for execution ). \note
In this graph there is also a possibility to update nodes, coordinates of the links, of container names and input data. \param aGraph %aGraphName or %aGraphXmlFile */ SUPERV::Graph GraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile /*! Constructs a StreamGraph with possibility to read/edit it \param aGraph %aGraphName or %aGraphXmlFile */ SUPERV::StreamGraph StreamGraph(in string aGraph ) ; // aGraphName or aGraphXmlFile /*! Constructs a read Only StreamGraph ( for execution ). \note
In this graph there is also a possibility to update nodes, coordinates of the links, of container names and input data. \param aGraph %aGraphName or %aGraphXmlFile */ SUPERV::StreamGraph StreamGraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile /*! Creates a value of string type which will be used for Input method in the interface %Node. \param aString Input value of string type. */ SUPERV::Value StringValue( in string aString ) ; /*! Creates a value of any type which will be used for Input method in the interface %Node. \param anAny Input value of any type. */ SUPERV::Value AnyValue( in any anAny ) ; /*! Gets a graph with a definite %IOR \param ior String parameter defining %IOR of the graph. */ SUPERV::Graph getGraph(in string ior); // get Graph from is IOR /*! Gets a graph with a definite %IOR \param ior String parameter defining %IOR of the graph. */ SUPERV::StreamGraph getStreamGraph(in string ior); // get Graph from is IOR }; /*! \brief %CNode interface This is a base class of the SUPERVISION module. It contains a set of methods allowing:
  • creating a Computation node and setting its parameters (Name, Author, Comments etc.)
  • checking the current state of the node in the data flow
  • node execution follow-up
  • 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)
*/ ////////////// interface CNode : Engines::Component { ////////////// /*! Returns the name of the node(graph). */ string Name() ; /*! Returns the service of this node . */ SALOME_ModuleCatalog::Service Service() ; /*! Returns the type of the node. */ SUPERV::KindOfNode Kind() ; /*! Returns the date of creation of the node(graph). */ SUPERV::SDate CreationDate() ; /*! Returns the date of last update of the node(graph). */ SUPERV::SDate LastUpdateDate() ; /*! Returns the name of the version of the node(graph). */ string Version() ; /*! Returns the name of the author of the node(graph). */ string Author() ; /*! Returns the string containing comments about this node(graph). */ string Comment() ; /*! Sets the name of the node(graph). \param aNewName String value defining the name of the node(graph). \return True if the name has been updated. */ boolean SetName(in string aNewName ) ; /*! Sets the name of the author. Returns True if it is updated. \param anAuthor String value defining the name of the author. \return True if the name has been updated. */ boolean SetAuthor(in string anAuthor ) ; /*! Allows to update the comments about this node(graph). \param aComment String value containing a comment to this node(graph). \return True if the old comment has been updated. */ boolean SetComment(in string aComment ) ; /*! Gets a port of the node (for compatibility : see GetInPort - GetOutPort). */ SUPERV::Port Port( in string aParameterName ) ; /*! Gets an Input port in a node. \param aParameterName This value sets the name of the parameter which will be defined in this port. */ SUPERV::Port GetInPort( in string aParameterName ) ; /*! Gets an Output port in a node. \param aParameterName This value sets the name of the parameter which will be defined in this port. */ SUPERV::Port GetOutPort( in string aParameterName ) ; /*! Gets an Input StreamPort in a node. \param aParameterName This value sets the name of the parameter which will be defined in this port. */ SUPERV::StreamPort GetInStreamPort( in string aParameterName ) ; /*! Gets an Output StreamPort in a node. \param aParameterName This value sets the name of the parameter which will be defined in this port. */ SUPERV::StreamPort GetOutStreamPort( in string aParameterName ) ; /*! Returns true if a Node (or Graph) has StreamPorts */ boolean HasStreamPort() ; /*! Enters a value into an Input %Port */ SUPERV::Port Input( in string InputParameterName , in Value aValue ) ; /*! Gets a list of ports of the node(graph) */ SUPERV::ListOfPorts Ports() ; /*! Gets a list of ports of the node(graph) */ SUPERV::ListOfStreamPorts StreamPorts() ; /*! Gets a list of links of a node(graph) */ SUPERV::ListOfLinks Links() ; /*! Gets a list of StreamLinks of a node(graph) */ SUPERV::ListOfStreamLinks StreamLinks() ; /*! Returns True if this node is a graph. */ boolean IsStreamGraph() ; /*! Returns True if this node is a graph. */ boolean IsGraph() ; /*! Returns True if this node is a MacroNode of a DataFlowGraph or a DataStreamGraph. */ boolean IsMacro() ; /*! Returns True if this node is a MacroNode of a DataFlowGraph. */ boolean IsFlowMacro() ; /*! Returns True if this node is a MacroNode of a DataStreamGraph. */ boolean IsStreamMacro() ; /*! Returns True if this node is a Head Graph . */ boolean IsHeadGraph() ; /*! Returns the MacroNode Level of this node. */ long GraphLevel() ; /*! Returns True if the node appears to be a %computing node. */ boolean IsComputing() ; /*! Returns True if the node appears to be a %factory node. */ boolean IsFactory() ; /*! Returns True if the node appears to be an %inline node. */ boolean IsInLine() ; /*! Returns True if the node appears to be a %GOTO node. */ boolean IsGOTO() ; /*! Returns True if the node appears to be a %loop node. */ boolean IsLoop() ; /*! Returns True if the node appears to be an %endloop node. */ boolean IsEndLoop() ; /*! Returns True if the node appears to be a %switch node. */ boolean IsSwitch() ; /*! Returns True if the node appears to be a %endswitch node. */ boolean IsEndSwitch() ; /*! Returns the numero of subgraph of a node. */ long SubGraph() ; /*! Returns the numero of substreamgraph of a node. */ long SubStreamGraph() ; /*! Returns the number of threads of the graph. */ long Thread() ; /*! Returns True if the node(graph) is waiting for Data input */ boolean IsWaiting() ; /*! Returns True if the node(graph) is ready for execution */ boolean IsReady() ; /*! Returns True if the node(graph) is currently running */ boolean IsRunning() ; /*! Returns True if execution is finished */ boolean IsDone() ; /*! Returns True if execution is suspended */ boolean IsSuspended() ; /*! Returns the current state of the graph. */ SUPERV::GraphState State() ; /*! Waits for ready_to_run state, Suspend and return. */ boolean ReadyW() ; /*! Waits for running state, Suspend and return. */ boolean RunningW() ; /*! Waits for done state, Suspend and return. */ boolean DoneW() ; /*! Waits for Suspend state and return. */ boolean SuspendedW() ; // boolean Ping(); /*! Kills execution.
If not running : will be killed when ready to run. If running : kills immediatly. */ boolean Kill(); /*! Kills execution.
Execution will be killed only just after running (only for nodes). */ boolean KillDone(); /*! Stops execution.
If not running : will be stopped when ready to run. If running : stops immediatly */ boolean Stop(); /*! Suspends execution.
If not running : will be Suspended when ready to run. It is used in step-by-step execution. If running : suspends immediatly */ boolean Suspend(); /*! Suspends execution only just after running. */ boolean SuspendDone(); /*! Resumes execution.
If Suspended : running will be continued. If not Suspended : cancels the current ControlState ( Suspend, Kill, ...) */ boolean Resume(); // Control state required : Kill, Suspend, Stop /*! Returns control state of the node(graph). */ SUPERV::ControlState Control() ; /*! Clears the control state of the node(graph). */ void ControlClear() ; boolean ContainerKill(); /*! Sets the position of the node in the window. */ void Coords( in long X , in long Y ) ; /*! Returns the position of the node along X-axis. */ long X() ; /*! Returns the position of the node along Y-axis. */ long Y() ; /*! Returns the Cpu used by a node for execution of calculations in seconds. */ long CpuUsed() ; } ; /*! \brief %FNode class This class is necessary for management of factory nodes in a data flow. Besides the inherited methods it contains some methods allowing to define the component from the container, which will be called for execution of the calculation. */ ////////////// interface FNode : CNode { ////////////// /*! Gets the name of the component, which will be called for execution of the calculation. */ string GetComponentName() ; /*! Gets the name of the interface of the component. */ string GetInterfaceName() ; /*! Gets the container containing the component, which will be called for execution of the calculation. */ string GetContainer() ; /*! Sets the name of the component, which will be called for execution of the calculation. \param aComponentName Name of the component. */ boolean SetComponentName(in string aComponentName ) ; /*! Sets the name of the interface of the component. \param anInterfaceName Name of the interface. */ boolean SetInterfaceName(in string anInterfaceName ) ; /*! Gets the container containing the component, which will be called for execution of the calculation. \param aContainer Container containing the component. */ boolean SetContainer(in string aContainer ) ; } ; /*! \brief %INode class 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 executed for performing calculations, as well as input and output parameters for the node. */ // InLine Nodes ////////////// interface INode : CNode { ////////////// /*! Sets Python function for the InLine Node. \param FuncName Name of the function \param aPyInitFunction Python initialization function of the InLine Node */ void SetPyFunction( in string FuncName , in SUPERV::ListOfStrings aPyInitFunction ) ; /*! Returns Python function of the InLine Node. */ SUPERV::ListOfStrings PyFunction() ; /*! Returns the name of the Python function of the InLine Node. */ string PyFuncName() ; /*! Creates an Input port in a node. \param aParameterName This value sets the name of the parameter which will be defined in this port. \param aParameterType This value sets the type of the parameter which will be defined in this port. */ SUPERV::Port InPort( in string aParameterName , in string aParameterType ) ; /*! Creates an Output port in an Inline node. \param aParameterName This value sets the name of the parameter which will be defined in this port. \param aParameterType This value sets the type of the parameter which will be defined in this port. */ SUPERV::Port OutPort( in string aParameterName , in string aParameterType ) ; /*! Creates an Input DataStreamPort in an Inline node. \param aParameterName This value sets the name of the parameter which will be defined in this port. \param aParameterType This value sets the type of the parameter which will be defined in this port. */ SUPERV::StreamPort InStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ; /*! Creates an Output DataStreamPort in an Inline node. \param aParameterName This value sets the name of the parameter which will be defined in this port. \param aParameterType This value sets the type of the parameter which will be defined in this port. */ SUPERV::StreamPort OutStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ; } ; /*! \brief %GNode class This class is necessary for management of GOTO/EndLoop/EndSwitch nodes in the dataflow. Besides the inherited methods it contains some methods allowing to define the couple node, which will be linked to this one. */ // GOTO/EndLoop/EndSwitch Nodes /////////////// interface GNode : INode { /////////////// /*! Sets the coupled InLine Node to this GOTO/EndLoop/EndSwitch Node. */ boolean SetCoupled( in string anInLineNode ) ; /*! Returns the coupled InLine Node to this GOTO/EndLoop/EndSwitch Node. */ SUPERV::INode Coupled() ; } ; /*! %Loop Nodes class */ // Loop Nodes /////////////// interface LNode : GNode { /////////////// /*! Sets Python Init function of the Loop Node. \param InitName Name of the Init function \param aPyInitFunction Python Init function */ void SetPyInit( in string InitName , in SUPERV::ListOfStrings aPyInitFunction ) ; /*! Returns Python Init function of the Loop Node. */ SUPERV::ListOfStrings PyInit() ; /*! Returns the name of the Python Init function of the Loop Node. */ string PyInitName() ; /*! Sets Python More function of the Loop Node. \param MoreName Name of the More function \param aPyMoreFunction Python More function */ void SetPyMore( in string MoreName , in SUPERV::ListOfStrings aPyMoreFunction ) ; /*! Returns Python More function of the Loop Node. */ SUPERV::ListOfStrings PyMore() ; /*! Returns the name of the Python More function of the Loop Node. */ string PyMoreName() ; /*! Sets Python Next function of the Loop Node. \param NextName Name of the Next function \param aPy NextFunction Python Next function */ void SetPyNext( in string NextName , in SUPERV::ListOfStrings aPyNextFunction ) ; /*! Returns Python Next function of the Loop Node. */ SUPERV::ListOfStrings PyNext() ; /*! Returns the name of the Python Next function of the Loop Node. */ string PyNextName() ; } ; // EndOfLoop Nodes //////////////// interface ELNode : GNode { //////////////// } ; // Switch Nodes /////////////// interface SNode : GNode { /////////////// } ; // EndOfSwitch Nodes //////////////// interface ESNode : GNode { //////////////// } ; /*! \brief Interface of a graph This interface includes a set of methods used for management of the graphs in %SUPERVISION module. */ /////////////// interface Graph : GNode { /////////////// /*! Creates a Computing Node in a Graph. */ SUPERV::CNode CNode( in SALOME_ModuleCatalog::Service aService ) ; /*! Creates a Factory Node in a Graph. */ SUPERV::FNode FNode( in string aComponentName , in string anInterfaceName , in SALOME_ModuleCatalog::Service aService ) ; /*! Creates an InLine Node in a Graph. */ SUPERV::INode INode( in string FuncName , in ListOfStrings aPythonFunction ) ; /*! Creates a GOTO Node and links it to the corresponding InLine node. */ SUPERV::GNode GNode( in string FuncName , in ListOfStrings aPythonFunction , in string anINode ) ; /*! Creates a Loop Node ("for" or "while" loop) and links it to the corresponding end of loop node. */ SUPERV::LNode LNode( in string InitName , in ListOfStrings InitFunction , in string MoreName , in ListOfStrings MoreFunction , in string NextName , in ListOfStrings NextFunction , out SUPERV::INode anEndOfLoop ) ; /*! Creates a conditional "if/elseif/else" or "switch" node and the corresponding end node */ SUPERV::SNode SNode( in string FuncName , in ListOfStrings aPythonFunction , out SUPERV::INode anEndOfSwitch ) ; /*! Creates a "MacroNode" node which corresponds to a Graph with a xml file */ SUPERV::Graph MNode( in string aXmlFileName ) ; /*! Creates a "MacroNode" node which corresponds to a Graph with a Graph */ SUPERV::Graph GraphMNode( in Graph aGraph ) ; /*! Returns a Graph of a "MacroNode" or a "MacroNode" of a Graph */ SUPERV::Graph FlowObjRef() ; /*! Returns a StreamGraph of a "MacroNode" or a "MacroNode" of a StreamGraph */ SUPERV::StreamGraph StreamObjRef() ; /*! Returns an existing node with a definite name. \param aNodeName Name of the Node. */ SUPERV::CNode Node( in string aNodeName ) ; /*! Creates a CORBA Component Object Reference */ Engines::Component ComponentRef( in string aComputerContainer , in string aComponentName ) ; /*! Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph */ SUPERV::Link Link( in SUPERV::Port OutputPort , in SUPERV::Port InputPort ) ; /*! Give the last error[s] message[s] \return string[s] corresponding to last error[s]. */ string Messages() ; /*! Imports a graph into a file with XML format \param anXmlFile String parameter defining the name of the XML file. \return True, if the graph has been successfully imported. */ boolean Import( in string anXmlFile ) ; /*! Exports a graph to a file with XML format \param anXmlFile String parameter defining the name of the XML file. \return True, if the graph has been successfully exported. */ boolean Export( in string anXmlFile ) ; /*! Exports a graph to a string in python format */ string SavePY( in boolean importSuperV ) ; /*! Returns True if the graph is read Only. */ boolean IsReadOnly() ; /*! Starts asynchronous execution of the graph. */ boolean Run() ; /*! Assigns to the %Node an %Event and a %State of the %Node, if the Event is available. And returns immediately Nil, NoEvent and NoState if not. Returns false if the graph is finished, suspended, killed or stopped. \param aNode %Node for which this method is called \param anEvent An operation, which has been performed on this node(graph). \param aState Current state of the graph */ boolean EventNoW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent , out SUPERV::GraphState aState ) ; /*! Assigns to the %Node an %Event and a %State of the %Node, if the Event is available. Waits if it is not available at the current moment. Returns false if the graph is finished, suspended, killed or stopped. \param aNode %Node for which this method is called \param anEvent An operation, which has been performed on this node(graph). \param aState Current state of the graph */ boolean Event( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent , out SUPERV::GraphState aState ) ; // Same as Event but execution of the thread is suspended between the // return of EventW and the next call to EventW /*! Assigns to the %Node an %Event and a %State of the %Node, if the Event is available. And returns immediately Nil, NoEvent and NoState if not. Returns false if the graph is finished, suspended, killed or stopped. \note
Execution of the thread is suspended between the return of this method and its next usage. \param aNode %Node for which this method is called \param anEvent An operation, which has been performed on this node(graph). \param aState Current state of the graph */ boolean EventW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent , out SUPERV::GraphState aState ) ; /*! \name Methods used for inner debugging purposes of threads management : */ /*@{*/ long EventQSize() ; long LevelMax() ; SUPERV::ListOfNodes LevelNodes( in long aLevel ) ; long ThreadsMax() ; /*@}*/ /*! Returns the number of currently running threads. */ long Threads(); /*! Returns the number of suspended threads. */ long SuspendedThreads(); /*! Returns True if the graph is valid. */ boolean IsValid() ; /*! Returns True if the graph can be executed. */ boolean IsExecutable() ; /*! Returns True if the graph is being currently edited. */ boolean IsEditing() ; /*! Returns True if the graph is being currently executed. */ boolean IsExecuting() ; long LastLevelDone() ; /*! Launches step-by-step execution of the graph. \note The execution is suspended immediatly after performance of operations of the first node and user can specify the nodes, where execution will be again suspended after its resuming. */ boolean Start() ; /*! Allows to copy one graph into another. */ SUPERV::Graph Copy() ; /*! Convert a FlowGraph to a StreamGraph. */ SUPERV::StreamGraph ToStreamGraph() ; /*! Merges two graphs */ boolean Merge( in Graph aGraph ) ; /*! Returns a list of nodes of the graph. */ SUPERV::ListOfNodes Nodes() ; /*! Returns a list of links of the graph. */ SUPERV::ListOfLinks GLinks() ; /*! Gets IOR of the garph. */ string getIOR(); /*! Returns the number of independent subgraphs */ long SubGraphsNumber() ; /*! Returns a list of Nodes of a SubGraph. */ SUPERV::ListOfNodes SubGraphsNodes( in long SubGraphNumber ) ; /*! Forces use of Editor's data model and destroy of Executor */ void Editing(); } ; /*! \brief Interface of a StreamGraph This interface includes a set of methods used for management of the graphs in %SUPERVISION module. */ ///////////////////// interface StreamGraph : Graph { ///////////////////// /*! Allows to copy one graph into another. */ SUPERV::StreamGraph StreamCopy() ; /*! Creates a "MacroNode" node which corresponds to a StreamGraph with a xml file */ SUPERV::StreamGraph StreamMNode( in string aXmlFileName ) ; /*! Creates a "MacroNode" node which corresponds to a StreamGraph with a Graph */ SUPERV::StreamGraph StreamGraphMNode( in StreamGraph aStreamGraph ) ; /*! Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph */ SUPERV::StreamLink StreamLink( in SUPERV::StreamPort OutputPort , in SUPERV::StreamPort InputPort ) ; /*! Returns a list of links of the graph. */ SUPERV::ListOfStreamLinks GStreamLinks() ; boolean SetStreamParams( in long Timeout , in SUPERV::KindOfDataStreamTrace DataStreamTrace , in double DeltaTime ) ; void StreamParams( out long Timeout , out SUPERV::KindOfDataStreamTrace DataStreamTrace , out double DeltaTime ) ; /*! Returns the number of independent subStreamgraphs */ long SubStreamGraphsNumber() ; /*! Returns a list of Nodes of a SubStreamGraph. */ SUPERV::ListOfNodes SubStreamGraphsNodes( in long SubStreamGraphNumber ) ; /*! Convert a StreamGraph to a FlowGraph. */ SUPERV::Graph ToFlowGraph() ; /*! Merge a StreamGraph. */ boolean StreamMerge( in StreamGraph aStreamGraph ) ; } ; /*! \brief Interface of the %link This interface contains a set of methods used for representation and management of the links connecting nodes in a %graph. */ ////////////// interface Link : Engines::Component { ////////////// /*! Returns the %Output %Port of the Link */ SUPERV::Port OutPort() ; /*! Returns the %Input %Port of the Link */ SUPERV::Port InPort() ; // For GUI : /*! \name Methods used for representation of links in GUI of %SALOME application : */ /*@{*/ /*! Returns the number of coordinate points which are included in the link. \note
Every link can contain a set of coordinate points which constitute it. These points have index numbers (beginning from 1) and coordinates defining their position in the window. Indexing of the points starts from input port to output port of the corresponding link. */ long CoordsSize() ; /*! Adds a coordinate point to the link. \param index Index of the point. \param X Coordinates of the point. \param Y Coordinates of the point. */ boolean AddCoord( in long index , in long X , in long Y ) ; /*! Changes the location of a definite coordinate point of the link. \param index Index of the point. \param X Coordinates of the point. \param Y Coordinates of the point. */ boolean ChangeCoord( in long index , in long X , in long Y ) ; /*! Removes a coordinate point of the link. \param index Index of the point. */ boolean RemoveCoord( in long index ) ; /*! Sets the location of a coordinate point of the link. \param index Index of the point. \param X Coordinates of the point. \param Y Coordinates of the point. */ boolean Coords( in long index , out long X , out long Y ) ; /*@}*/ // void Destroy() ; /*! Checks if the types of Ports that it connects are compatible */ boolean IsValid(); /*! Check if the Link equals to the another given Link */ boolean IsEqual( in SUPERV::Link aLink ); } ; /*! \brief Interface of the %link This interface contains a set of methods used for representation and management of the links connecting nodes in a %graph. */ //////////////////// interface StreamLink : Link { //////////////////// /*! Returns the %Output %StreamPort of the StreamLink */ SUPERV::StreamPort OutStreamPort() ; /*! Returns the %Input %StreamPort of the StreamLink */ SUPERV::StreamPort InStreamPort() ; } ; /*! \brief %Value interface This interface contains a set of methods used for setting initial parameters of the ports */ /////////////// interface Value : Engines::Component { /////////////// /*! Converts the given value into a value of string type. */ string ToString() ; /*! Converts the given value into a value of independant data type. */ any ToAny() ; /*! Returns True if the value represents an IOR. */ boolean IsIOR() ; /*! Gets data type of the component. */ string ComponentDataType() ; // void Destroy() ; } ; /*! \brief %Port interface This interface contains a set of methods used for management of the ports. */ ////////////// interface Port : Value { ////////////// /*! Gives a value to an Input %Port \param aValue This parameter defines the input value */ boolean Input( in SUPERV::Value aValue ) ; /*! Returns the node of the port */ SUPERV::CNode Node() ; /*! Sets the name of the port. */ string Name() ; /* Gets the type of a port. \return A string defining the type of a port */ string Type() ; // Link of an Input Port /*! Returns the link of an %Input %Port */ SUPERV::Link Link() ; /*! Returns a list of links of an Input %Port of an EndSwitchNode */ SUPERV::ListOfLinks Links() ; /*! Returns True if this port appears to be an %Input %Port of a Node */ boolean IsInput() ; /*! Returns True if an %Input %Value exists for that %Input %Port (without link) */ boolean HasInput() ; /*! Returns True if the %Port is linked (without value) */ // Port with link (without Value) boolean IsLinked() ; // Kind of a Port /*! Returns the type of this port. */ SUPERV::KindOfPort Kind() ; // Port from the service of the node /*! Returns True if the %Port is a parameter of a service */ boolean IsParam() ; // Port is a Gate of the node /*! Returns True if the %Port appears to be a Gate Port of the Node */ boolean IsGate() ; // Port is a parameter of an InLineNode /*! Returns True if the %Port appears to be a parameter of an InLine Node. */ boolean IsInLine() ; // Port is a LoopParameter (InitLoop or DoLoop) of an LoopNode /*! Returns True if the %Port appears to be a Loop Parameter (InitLoop or DoLoop) of a Loop Node */ boolean IsLoop() ; // Port is an output parameter of a SwitchNode connected to an InGate /*! Returns True if the %Port appears to be a parameter of a switch node */ // Port is a parameter of a switch node boolean IsSwitch() ; // Port is an Input parameter of a EndSwitchNode connected to several output ports /*! Returns True if the %Port appears to be an EndSwitch Node connected to several output ports. */ boolean IsEndSwitch() ; boolean IsDataStream() ; /*! Returns the current state of the port. */ SUPERV::GraphState State() ; /*! Returns True if computation is finished. */ boolean IsDone() ; /*! deactivate the objref of a Port when its node is destroyed */ void Remove() ; } ; //////////////////// interface StreamPort : Port { //////////////////// // Link of a StreamPort /*! Returns the link of a %StreamPort */ SUPERV::StreamLink StreamLink() ; /*! Returns the current Dependency of the DataStreamPort : TimeDependency or IterationDependency */ SALOME_ModuleCatalog::DataStreamDependency Dependency() ; boolean SetDependency( in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ; /*! Sets or Returns the current kinds of Schema, Interpolation and Extrapolation of the InDataStreamPort */ boolean SetParams( in KindOfSchema aKindOfSchema , in KindOfInterpolation aKindOfInterpolation , in KindOfExtrapolation aKindOfExtrapolation ) ; boolean Params( out KindOfSchema aKindOfSchema , out KindOfInterpolation aKindOfInterpolation , out KindOfExtrapolation aKindOfExtrapolation ) ; /*! Sets or Returns the current number of values ("NIVEAU") of the OutDataStreamPort */ boolean SetNumberOfValues( in long aNumberOfValues ) ; long NumberOfValues() ; } ; }; #endif