Salome HOME
Integration of 0019971: A patch for cmake compilation.
[modules/kernel.git] / idl / SALOME_Ports.idl
1 //  Copyright (C) 2007  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //  File   : SALOME_Ports.idl
21 //  Author : Andre RIBES, EDF
22 //  $Header:
23
24 #ifndef _SALOME_PORTS_IDL_
25 #define _SALOME_PORTS_IDL_
26
27 /*! \file
28   This file contains the IDL declarations of the kind of ports provided by the 
29   SALOME component model.
30  */
31
32 module Ports {
33   
34   /*! \brief Interface of a DSC Port.
35     This interface defines a Port.
36     A port is a CORBA interface.
37   */
38   interface Port {};
39
40   /*! \brief Interface of a Control_Port.
41     This interface defines a Control Port. When a component uses a control port, 
42     it says that the service associated to the provides port can be started.
43
44     \note Currently Control_Port can not employed since it is not recognized 
45     by the supervisor. But this type can be used to classified the port.
46   */
47   interface Control_Port : Ports::Port {};
48   
49   /*! \brief Interface a Data_Port.
50     This interface defines a Data Port.
51     A Data Port is a port that transmit data between two components.
52
53     Each Data Port has a Put operation for the emitter and a Get operation 
54     for the receiver.
55
56     \note Data_Port is currently empty but it permits to identified 
57     the behaviour of a port.
58   */
59   interface Data_Port : Ports::Port {};
60
61   /*! \brief Data_And_Control_Port.
62     This interface defines a combination of a Control_Port and a Data_Port.
63
64     \note Like Control_Port, Data_And_Control_Port  can not employed since it is 
65     not recognized by the supervisor. But this type can be used to classified the port.
66   */
67   interface Data_And_Control_Port : Ports::Port {};
68
69   /*!
70     This exception indicates that the property doesn't not exist.
71   */
72   exception NotDefined {};
73
74   /*!
75     This exception indicates that the given value to the property is not
76     of a good type.
77   */
78   exception BadType {};
79
80   /*!
81     This exception indicates that the given value to the property is not
82     authorized.
83   */
84   exception BadValue {};
85
86   /*! \brief Interface of a PortProperties.
87     This interface permits to set and get properties
88     associated to a port. Each uses or provides port have a 
89     PortProperties object. But this object could be empty.
90   */
91   interface PortProperties {
92     
93     /*!
94       This operation permits to set a value of a property.
95
96       \param name property's name.
97       \param value value of the property.
98
99       \exception Ports::BadType
100       \exception Ports::NotDefined
101     */
102     void set_property(in string name, in any value) raises (Ports::BadType,
103                                                             Ports::BadValue,
104                                                             Ports::NotDefined);
105
106     /*!
107       This operation permits to get property's value.
108
109       \param name property's name.
110       \return value of the property.
111
112       \exception Ports::NotDefined
113     */
114     any  get_property(in string name) raises (Ports::NotDefined);
115   };
116
117   /*! \brief Interface of a basic datastream short port
118     This interface defines a Data_Port that transmit a CORBA::Short.
119     This interface can be seen as an example of an integration of 
120     a port in the DSC_User programming model.
121   */
122   interface Data_Short_Port : Ports::Data_Port {
123     void put(in short data);
124   };
125 };
126
127 #endif