]> SALOME platform Git repositories - modules/superv.git/blob - idl/SUPERV.idl
Salome HOME
NRI : -lSalomeLoggerServer replaced by -lSALOMELocalTrace according to bug KERNEL4778.
[modules/superv.git] / idl / SUPERV.idl
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3 // 
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. 
8 // 
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. 
13 // 
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 
17 // 
18 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
19 //
20 //
21 //
22 //  File   : SUPERV.idl
23 //  Author : Jean Rahuel
24 //  $Header: 
25
26 /*! \file SUPERV.idl This file contains a set of interfaces of the %SUPERVISION module
27 */
28
29 #ifndef __SUPERV_IDL__
30 #define __SUPERV_IDL__
31
32 #include "SALOME_ModuleCatalog.idl"
33 #include "SALOME_Component.idl"
34 #include "SALOMEDS.idl"
35 /*! 
36  The main package of interfaces of %SUPERVISION module
37 */
38 module SUPERV {
39
40 /*!
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.
44 */
45   enum KindOfPort { UndefinedParameter , ServiceParameter , GateParameter ,
46                     InLineParameter , LoopParameter , SwitchParameter ,
47                     EndSwitchParameter , GOTOParameter } ;
48
49 /*!
50 This enumeration contains a set of elements defining the type of the node.
51 */
52   enum KindOfNode { FactoryNode , DataFlowNode , ComputingNode ,
53                     InLineNode , LoopNode , EndLoopNode ,
54                     SwitchNode , EndSwitchNode , GOTONode , UnknownNode };
55
56 /*!
57 This struct contains fields defining the date.
58 */
59   struct SDate {
60     short Second;
61     short Minute;
62     short Hour;
63     short Day;
64     short Month;
65     short Year;
66   };
67 /*!
68 This enumeration contains a set of elements defining the type of operation, which has been performed 
69 on this node(graph).
70 */
71
72   enum GraphEvent { UndefinedEvent , NoEvent , NewThreadEvent ,
73                     WaitingEvent , ReadyEvent ,
74                     RunningEvent , DoneEvent , ErroredEvent ,
75                     SuspendEvent , ResumeEvent ,
76                     KillEvent , StopEvent ,
77                     ReRunEvent , ReStartEvent } ;
78
79   // UndefinedState : Non existing Node, Port etc...
80 /*!
81 This enumeration contains a set of elements defining the current state of the node(graph).
82 */
83
84   enum GraphState { UndefinedState , NoState , EditingState , SuspendState ,
85                     WaitingState , ReadyState , SuspendReadyState ,
86                     RunningState ,
87                     DoneState , ErrorState ,
88                     SuspendDoneState , SuspendErroredState ,
89                     KillState , StopState ,
90                     ReRunState , ReStartState ,
91                     NumberOfGraphStates } ;
92
93   typedef sequence<string> ListOfStrings ;
94
95   interface Value ;
96
97   interface Link ;
98
99   typedef sequence<Link> ListOfLinks ;
100
101   interface Port ;
102
103   typedef sequence<Port> ListOfPorts ;
104
105   interface CNode ;
106   interface FNode ;
107   interface INode ;
108   interface GNode ;
109   interface LNode ;
110   interface ELNode ;
111   interface SNode ;
112   interface ESNode ;
113   typedef sequence<CNode>  ListOfCNodes ;
114   typedef sequence<FNode>  ListOfFNodes ;
115   typedef sequence<INode>  ListOfINodes ;
116   typedef sequence<GNode>  ListOfGNodes ;
117   typedef sequence<LNode>  ListOfLNodes ;
118   typedef sequence<ELNode> ListOfELNodes ;
119   typedef sequence<SNode>  ListOfSNodes ;
120   typedef sequence<ESNode> ListOfESNodes ;
121
122   struct ListOfNodes {
123     ListOfCNodes  CNodes ;
124     ListOfFNodes  FNodes ;
125     ListOfINodes  INodes ;
126     ListOfGNodes  GNodes ;
127     ListOfLNodes  LNodes ;
128     ListOfELNodes ELNodes ;
129     ListOfSNodes  SNodes ;
130     ListOfESNodes ESNodes ;
131   } ;
132
133   interface Graph ;
134
135   typedef sequence<Graph> ListOfGraphs ;
136
137   // ToSuspendState : will be Suspended before running if waiting or
138   //                  will be Suspended while running or
139   //                  will be Suspended after run
140   // ToSuspendStartState : will be Suspended at the beginning of execution
141   // ToSuspendDoneState : will be Suspended after run
142 /*!
143 This enumeration contains a set of elements defining the %ControlState of the node. 
144 The %ControlState gives a possibility to determine the "control actions" which have been done by
145 the user (Suspend, SuspendDone, Kill, etc...).
146 */ 
147   enum ControlState { VoidState , ToSuspendStartState ,
148                       ToSuspendState , ToSuspendDoneState ,
149                       ToKillState , ToKillDoneState , ToStopState ,
150                       NumberOfControlStates } ;
151 /*!
152 The AutomatonState is an internal state of the automaton of the Executor
153 of the %SuperVision %Engine. It is used for inner debugging purposes only.
154 */
155
156   enum AutomatonState { UnKnownState ,
157                         DataUndefState , 
158                         DataWaitingState ,
159                         DataReadyState ,
160                         SuspendedReadyState, 
161                         SuspendedReadyToResumeState ,
162                         ResumedReadyState ,
163                         KilledReadyState ,
164                         StoppedReadyState ,
165                         ExecutingState ,
166                         SuspendedExecutingState , 
167                         ResumedExecutingState ,
168                         KilledExecutingState , 
169                         StoppedExecutingState ,
170                         SuccessedExecutingState , 
171                         ErroredExecutingState ,
172                         SuspendedSuccessedState ,
173                         SuspendedErroredState,
174                         ResumedSuccessedState , 
175                         ResumedErroredState ,
176                              KilledSuccessedState , 
177                         KilledErroredState ,
178                              StoppedSuccessedState ,
179                         StoppedErroredState ,
180                         SuccessedState , 
181                         ErroredState ,
182                         SuspendedState ,
183                         KilledState , 
184                         StoppedState ,
185                         SuspendedSuccessedToReStartState ,
186                         SuspendedErroredToReStartState ,
187                         ReRunnedState , 
188                         ReStartedState ,
189                         NumberOfAutomatonStates 
190                      } ;
191
192
193
194
195
196
197
198
199   ////////////////
200 /*! \brief interface %SuperG
201
202 This interface contains a set of methods necessary for management of a %graph.
203 */
204   interface SuperG : Engines::Component, SALOMEDS::Driver {
205   ////////////////
206 /*! 
207   Constructs a graph with possibility to read/edit it
208   \param aGraph  %aGraphName or %aGraphXmlFile
209 */
210     SUPERV::Graph Graph(in string aGraph ) ; // aGraphName or aGraphXmlFile
211
212 /*!  
213   Constructs a read Only graph ( for execution ).
214  \note <BR>In this graph there is also a possibility to update nodes, coordinates of the links,
215   of container names and input data.
216   \param aGraph  %aGraphName or %aGraphXmlFile
217 */
218     SUPERV::Graph GraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile
219
220 /*! 
221 Creates a value for %Input method in interface %Node.
222 */
223     SUPERV::Value StringValue( in string aString ) ;
224     SUPERV::Value AnyValue( in any anAny ) ;
225 /*!
226  Gets a graph from its %IOR 
227 */
228     SUPERV::Graph getGraph(in string ior); // get Graph from is IOR
229
230   };
231
232 /*! \brief Interface of a node
233
234 This interface includes a set of methods used for management of the nodes in the graph.
235 */ 
236
237   //////////////
238   interface CNode : Engines::Component {
239   //////////////
240
241
242 /*! 
243 Returns the name of the node(graph).
244 */
245     string Name() ;
246 /*! 
247 Returns the service of this node .
248 */
249     SALOME_ModuleCatalog::Service Service() ;
250 /*! 
251 Returns the type of the node.
252 */
253     SUPERV::KindOfNode Kind() ;
254 /*! 
255 Returns the date of creation of the node(graph).
256 */ 
257     SUPERV::SDate CreationDate() ;
258 /*! 
259 Returns the date of last update of the node(graph).
260 */
261     SUPERV::SDate LastUpdateDate() ;
262 /*! 
263 Returns the name of the version of the node(graph).
264 */
265     string Version() ;
266 /*! 
267 Returns the name of the author of the node(graph).
268 */
269     string Author() ;
270 /*! 
271 Returns the string containing comments about this node(graph).
272 */
273     string Comment() ;
274    
275
276 /*! 
277 Sets the name of the node(graph). Returns True if it is updated. 
278 */
279     boolean SetName(in string aNewName ) ;
280 /*! 
281 Sets the name of the author. Returns True if it is updated. 
282 */
283     boolean SetAuthor(in string anAuthor ) ;
284 /*!
285 Allows to update the comments about this node(graph).
286 */ 
287     boolean SetComment(in string aComment ) ;
288
289 /*!
290  Gets a port of the node.
291 */ 
292     SUPERV::Port Port( in string aParameterName ) ;
293
294 /*!
295  Enters a value into an Input %Port
296 */ 
297     SUPERV::Port Input( in string InputParameterName ,
298                         in Value aValue ) ;
299
300
301     // Create an Input %Port and an Output Port in LabelNode or ControlNode
302     //    boolean BusPort( in string InOutParameterName ,
303     //                     in string InOutParameterType ,
304     //                     out SUPERV::Port InputPort ,
305     //                     out SUPERV::Port OutputPort ) ;
306     //    boolean BusPorts( in string InputParameterName ,
307     //                      in string InputParameterType ,
308     //                      in string OutputParameterName ,
309     //                      in string OutputParameterType ,
310     //                      out SUPERV::Port InputPort ,
311     //                      out SUPERV::Port OutputPort ) ;
312
313 /*!  
314   Gets a list of ports of the node(graph)
315 */
316     SUPERV::ListOfPorts Ports() ;
317
318     // Get list of Links
319     SUPERV::ListOfLinks Links() ;
320
321 /*!
322 Returns True if this node is a graph. 
323 \note <BR>A node of the graph can also represent in its turn another graph.
324 */
325     boolean IsGraph() ;
326 /*!
327 Returns True if the node appears to be a %computing node.
328 */
329     boolean IsComputing() ;
330     boolean IsFactory() ;
331     boolean IsInLine() ;
332     boolean IsGOTO() ;
333     boolean IsLoop() ;
334     boolean IsEndLoop() ;
335     boolean IsSwitch() ;
336     boolean IsEndSwitch() ;
337
338 /*! 
339  Returns the number of  SubGraphs
340 */
341     long SubGraph() ;
342
343 /*! 
344 Returns nuber of threads.
345 */
346     long Thread() ;
347
348 /*! 
349  Returns True if the node(graph) is waiting for Data input
350 */
351     boolean IsWaiting() ;
352
353 /*! 
354  Returns True if the node(graph) is ready for execution
355 */
356      boolean IsReady() ;
357
358  /*! 
359  Returns True if the node(graph) is running
360 */
361     boolean IsRunning() ;
362
363 /*! 
364  Returns True if execution is finished 
365 */
366  
367     boolean IsDone() ;
368 /*! 
369  Returns True if execution is suspended
370 */
371  
372     boolean IsSuspended() ;
373 /*!
374 Returns the current state of the graph.
375 */
376     SUPERV::GraphState State() ;
377
378     // wait for ready_to_run state, Suspend and return
379     boolean ReadyW() ;
380
381     // wait for running state, Suspend and return
382     boolean RunningW() ;
383
384     // wait for done state, Suspend and return
385     boolean DoneW() ;
386
387     // wait for Suspend state and return
388     boolean SuspendedW() ;
389
390     //    boolean Ping();
391
392     // if not running : will be killed when ready to run
393     // if running : Kill immediatly
394     boolean Kill();
395
396     // will be killed only just after running (only for nodes)
397     boolean KillDone();
398
399     // if not running : will be stopped when ready to run
400     // if running : Stop immediatly
401     boolean Stop();
402
403     // if not running : will be Suspended when ready to run
404     // if running : Suspend immediatly
405     boolean Suspend();
406
407     // will be Suspended only just after running
408     boolean SuspendDone();
409
410     // if Suspended : running will continue
411     // if not Suspended : cancel current ControlState ( Suspend, Kill, ...)
412     boolean Resume();
413
414 /*!
415  Restarts execution of the node.
416 */
417     boolean ReRun();
418 /*!
419 Restarts execution of the graph beginning from a definite node.
420 */
421     boolean ReRunAt( in string aNodeName );
422
423 /*!
424  Restarts and suspends execution of the node(graph).
425 */ 
426     boolean ReStart();
427 /*!
428 Restarts and suspends execution of the graph beginning from a defined node.
429 */
430     boolean ReStartAt( in string aNodeName );
431
432 /*!
433  Returns automaton execution state of the node(graph).
434 */
435     SUPERV::AutomatonState AutoState() ;
436
437     // Control state required : Kill, Suspend, Stop
438     SUPERV::ControlState Control() ;
439 /*!
440 Clears the control state of the node(graph).
441 */
442     void ControlClear() ;
443
444     boolean ContainerKill();
445 /*! 
446 Sets the position of the node in the window.
447 */
448     void Coords( in long X , in long Y ) ;
449 /*! 
450 Returns the position of the node along X-axis.
451 */
452     long X() ;
453 /*! 
454 Returns the position of the node along Y-axis.
455 */
456     long Y() ;
457 /*! 
458 Returns the Cpu used by a node in seconds.
459 */
460     long CpuUsed() ;
461
462   } ;
463
464   //////////////
465   interface FNode : CNode {
466   //////////////
467
468     string GetComponentName() ;
469     string GetInterfaceName() ;
470     string GetContainer() ;
471     boolean SetComponentName(in string aComponentName ) ;
472     boolean SetInterfaceName(in string anInterfaceName ) ;
473     boolean SetContainer(in string aContainer ) ;
474   } ;
475
476   // InLine Nodes
477   //////////////
478   interface INode : CNode {
479   //////////////
480
481     void SetPyFunction( in string FuncName ,
482                         in SUPERV::ListOfStrings aPyInitFunction ) ;
483     SUPERV::ListOfStrings PyFunction() ;
484     string PyFuncName() ;
485
486     // Create Input/Output Port in InLineNodes
487     SUPERV::Port InPort( in string aParameterName , in string aParameterType ) ;
488     SUPERV::Port OutPort( in string aParameterName , in string aParameterType ) ;
489   } ;
490
491   // GOTO/EndLoop/EndSwitch Nodes
492   ///////////////
493   interface GNode : INode {
494   ///////////////
495
496     boolean SetCoupled( in string anInLineNode ) ;
497     SUPERV::INode Coupled() ;
498   } ;
499
500   // Loop Nodes
501   ///////////////
502   interface LNode : GNode {
503   ///////////////
504
505     void SetPyInit( in string MoreName ,
506                             in SUPERV::ListOfStrings aPyMoreFunction ) ;
507     SUPERV::ListOfStrings PyInit() ;
508     string PyInitName() ;
509
510     void SetPyMore( in string MoreName ,
511                             in SUPERV::ListOfStrings aPyMoreFunction ) ;
512     SUPERV::ListOfStrings PyMore() ;
513     string PyMoreName() ;
514
515     void SetPyNext( in string NextName ,
516                             in SUPERV::ListOfStrings aPyNextFunction ) ;
517     SUPERV::ListOfStrings PyNext() ;
518     string PyNextName() ;
519
520   } ;
521
522   // EndOfLoop Nodes
523   ////////////////
524   interface ELNode : GNode {
525   ////////////////
526   } ;
527
528   // Switch Nodes
529   ///////////////
530   interface SNode : GNode {
531   ///////////////
532   } ;
533
534   // EndOfSwitch Nodes
535   ////////////////
536   interface ESNode : GNode {
537   ////////////////
538   } ;
539
540 /*! \brief Interface of a graph
541
542 This interface includes a set of methods used for management of the graphs in %SUPERVISION module.
543 */ 
544
545   ///////////////
546   interface Graph : INode {
547   ///////////////
548
549     // Create a Computing Node in a Graph
550     SUPERV::CNode CNode( in SALOME_ModuleCatalog::Service aService ) ;
551
552     // Create a Factory Node in a Graph
553     SUPERV::FNode FNode( in string aComponentName ,
554                          in string anInterfaceName ,
555                          in SALOME_ModuleCatalog::Service aService ) ;
556
557     // Create an InLine Node in a Graph
558     SUPERV::INode INode( in string FuncName , in ListOfStrings aPythonFunction ) ;
559
560     // Create a GOTO node and link to the corresponding InLine node
561     SUPERV::GNode GNode( in string FuncName , in ListOfStrings aPythonFunction ,
562                          in string anINode ) ;
563
564     // Create a "for" or "while" node and the corresponding end of loop node
565     SUPERV::LNode LNode( in string InitName , in ListOfStrings InitFunction ,
566                          in string MoreName , in ListOfStrings MoreFunction ,
567                          in string NextName , in ListOfStrings NextFunction ,
568                          out SUPERV::INode anEndOfLoop ) ;
569
570     // Create a "if/elseif/else" or "switch" node and the corresponding end node
571     SUPERV::SNode SNode( in string FuncName , in ListOfStrings aPythonFunction ,
572                          out SUPERV::INode anEndOfSwitch ) ;
573
574     // Create a CORBA Component Object Reference
575     Engines::Component ComponentRef( in string aComputerContainer ,
576                                      in string aComponentName ) ;
577
578 /*!
579  Creates a link  connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph
580 */
581     SUPERV::Link Link( in SUPERV::Port OutputPort ,
582                        in SUPERV::Port InputPort ) ;
583
584 /*! 
585 Imports a graph into a file with XML format
586 */
587     boolean Import( in string anXmlFile ) ;
588 /*! 
589 Exports a graph from a file with XML format
590 */
591     boolean Export( in string anXmlFile ) ;
592 /*!
593 Returns True if the graph is read Only.
594 */
595     boolean IsReadOnly() ;
596
597 /*!
598  Starts asynchronous execution of the graph.
599 */
600     boolean Run() ;
601
602 /*! 
603  Assigns to the %Node an %Event and a %State of the %Node, if the Event is
604  available. And returns immediately Nil, NoEvent and NoState if not.
605  Returns false if the graph is finished, suspended, killed or stopped.
606 \param aNode  %Node for which this method is called
607 \param anEvent  An operation, which has been performed on this node(graph).
608 \param aState   Current state of the graph
609 */
610     boolean EventNoW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
611                       out SUPERV::GraphState aState ) ;
612
613 /*! 
614  Assigns to the %Node an %Event and a %State of the %Node, if the Event is
615  available. Waits if it is not available at the current moment. 
616  Returns false if the graph is finished, suspended, killed or stopped.
617 \param aNode  %Node for which this method is called
618 \param anEvent  An operation, which has been performed on this node(graph).
619 \param aState   Current state of the graph
620 */
621     boolean Event( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
622                    out SUPERV::GraphState aState ) ;
623
624     // Same as Event but execution of the thread is suspended between the
625     // return of EventW and the next call to EventW
626 /*! 
627  Assigns to the %Node an %Event and a %State of the %Node, if the Event is
628  available. And returns immediately Nil, NoEvent and NoState if not.
629  Returns false if the graph is finished, suspended, killed or stopped.
630 \note <BR>Execution of the thread is suspended between the return of this 
631 method and its next usage.
632 \param aNode  %Node for which this method is called
633 \param anEvent  An operation, which has been performed on this node(graph).
634 \param aState   Current state of the graph
635 */
636     boolean EventW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent ,
637                     out SUPERV::GraphState aState ) ;
638
639     long LevelMax() ;
640     SUPERV::ListOfNodes LevelNodes( in long aLevel ) ;
641     long ThreadsMax() ;
642 /*!
643 Returns the number of independent subgraphs
644 */
645     long GraphsNumber() ;
646 /*!
647 Returns the number of currently running threads.
648 */
649     long Threads();
650 /*!
651 Returns the number of suspended threads.
652 */
653     long SuspendedThreads();
654 /*!
655 Returns True if the graph is valid.
656 */ 
657     boolean IsValid() ;
658 /*!
659 Returns True if the graph can be executed.
660 */ 
661     boolean IsExecutable() ;
662 /*!
663 Returns True if the graph represents a working algorithm.
664 */ 
665     boolean IsDataFlow() ;
666
667 /*!
668 Returns True if the graph is being currently edited. 
669 */
670     boolean IsEditing() ;
671 /*!
672 Returns True if the graph is being currently executed. 
673 */
674     boolean IsExecuting() ;
675
676     long LastLevelDone() ;
677
678 /*!
679  Launches step-by-step execution of the graph.
680 \note  The execution is suspended immediatly after performance of operations of the first node and
681 user can specify the nodes, where execution will be again suspended after its resuming.
682 */
683     boolean Start() ;
684 /*!
685 Allows to copy one graph into another.
686 */
687     SUPERV::Graph Copy() ;
688 /*!
689 Merges two graphs
690 */
691     boolean Merge( in Graph aGraph ) ;
692 /*!
693 Returns a list of nodes of the graph.
694 */
695     SUPERV::ListOfNodes Nodes() ;
696 /*!
697 Returns a list of links of the graph.
698 */
699     SUPERV::ListOfLinks GLinks() ;
700 /*!
701 Gets IOR of the garph.
702 */
703     string getIOR();
704
705 /*!
706 Returns a list of graphs.
707 \note  Not implemented
708 */
709     SUPERV::ListOfGraphs Graphs() ;
710
711   } ;
712
713
714
715
716
717 /*! \brief Interface of the %link
718
719 This interface contains a set of methods used for representation and management of the links 
720 connecting nodes in a %graph.
721 */ 
722
723   //////////////
724   interface Link : Engines::Component {
725   //////////////
726 /*!
727 Associates an %Output %Port to the Link
728 */
729     SUPERV::Port OutPort() ;
730
731 /*!
732 Associates an %Input %Port to the Link
733 */
734     SUPERV::Port InPort() ;
735
736     // For GUI :
737 /*! \name Methods used for representation of links in GUI of %SALOME application :
738 */
739 /*@{*/ 
740 /*!
741 Returns the number of coordinate points which are included in the link.
742 \note  <BR>Every link can contain a set of coordinate points which constitute it. These points have 
743 index numbers (beginning from 1) and coordinates defining their position in the window. Indexing of 
744 the points starts from input port to output port of the corresponding link.
745 */
746     long CoordsSize() ;
747 /*!
748 Adds a coordinate point to the link.
749 \param index  Index of the point. 
750 \param X  Coordinates of the point.
751 \param Y  Coordinates of the point.
752 */
753     boolean AddCoord( in long index , in long X , in long Y ) ;
754 /*!
755 Changes the location of a definite coordinate point of the link.
756 \param index  Index of the point. 
757 \param X  Coordinates of the point.
758 \param Y  Coordinates of the point.
759 */
760
761     boolean ChangeCoord( in long index , in long X , in long Y ) ;
762 /*!
763 Removes a coordinate point of the link.
764 \param index  Index of the point. 
765 */
766
767     boolean RemoveCoord( in long index ) ;
768
769 /*!
770 Sets the location of a coordinate point of the link.
771 \param index  Index of the point. 
772 \param X  Coordinates of the point.
773 \param Y  Coordinates of the point.
774 */
775
776     boolean Coords( in long index , out long X , out long Y ) ;
777 /*@}*/ 
778
779     //    void Destroy() ;
780
781   } ;
782
783 /*! \brief  %Value interface
784
785 This interface contains a set of methods used for setting initial parameters of the ports
786 */
787
788   ///////////////
789   interface Value : Engines::Component {
790   ///////////////
791 /*!
792 Converts the given value into a value of string type.
793 */
794     string ToString() ;
795 /*!
796 Converts the given value into a value of independant data type.
797 */
798     any ToAny() ;
799 /*!
800 Returns True if the value represents an IOR.
801 */
802     boolean IsIOR() ;
803 /*! 
804 Gets data type of the component.
805 */
806     string ComponentDataType() ;
807
808     //    void Destroy() ;
809
810   } ;
811 /*! \brief  %Port interface
812
813 This interface contains a set of methods used for management of the ports.
814 */
815
816   //////////////
817   interface Port : Value {
818   //////////////
819
820 /*!
821   Gives a value to an Input %Port 
822 */
823     boolean Input( in SUPERV::Value aValue ) ;
824
825 /*! 
826 Returns the node of the port
827 */
828     SUPERV::CNode Node() ;
829 /*! 
830 Sets the name of the port.
831 */
832     string Name() ;
833
834     // Type of a Port
835     string Type() ;
836
837     // Link of an Input Port
838 /*! 
839 Returns the link of an %Input %Port
840 */
841     SUPERV::Link Link() ;
842
843 /*!
844 Returns a list of links of an Input %Port of an EndSwitchNode
845 */
846     SUPERV::ListOfLinks Links() ;
847
848 /*! 
849 Returns True if this port appears to be an %Input %Port of a Node
850 */
851     boolean IsInput() ;
852
853 /*! 
854 Returns True if an %Input %Value exists for that %Input %Port (without link)
855 */
856     boolean HasInput() ;
857
858 /*! 
859 Returns True if the %Port is linked (without value)
860 */
861 // Port with link (without Value)
862     boolean IsLinked() ;
863
864     // Kind of a Port
865     SUPERV::KindOfPort Kind() ;
866
867     // Port from the service of the node
868 /*! 
869 Returns True if the %Port is a parameter of a service 
870 */
871     boolean IsParam() ;
872     // Port is a Gate of the node
873 /*! 
874 Returns True if the %Port appears to be a GatePort of the node  
875 */
876     boolean IsGate() ;
877     // Port is a parameter of an InLineNode
878     boolean IsInLine() ;
879     // Port is a LoopParameter (InitLoop or DoLoop) of an LoopNode
880     boolean IsLoop() ;
881     // Port is an output parameter of a SwitchNode connected to an InGate
882 /*! 
883 Returns True if the %Port appears to be a parameter of a switch node  
884 */
885     // Port is a parameter of a switch node
886     boolean IsSwitch() ;
887     // Port is an Input parameter of a EndSwitchNode connected to several output ports
888     boolean IsEndSwitch() ;
889
890     SUPERV::GraphState State() ;
891     boolean IsDone() ;
892
893   } ;
894
895 };
896 #endif