Salome HOME
copy tag mergefrom_BR_V0_1_CC_Salome_04oct07
[modules/yacs.git] / src / runtime / CORBAPythonConv.hxx
1 #ifndef __CORBAPYTHONCONV_HXX__
2 #define __CORBAPYTHONCONV_HXX__
3
4 #include <omniORB4/CORBA.h>
5 #include "InputPort.hxx"
6 #include "ConversionException.hxx"
7
8 namespace YACS
9 {
10   namespace ENGINE
11   {
12     class InputPyPort;
13
14 /*! \brief Class for conversion from CORBA Output port to Python Input port
15  *
16  * \ingroup AdaptorPorts
17  *
18  */
19     class CorbaPyDouble : public ProxyPort
20     {
21     public:
22       CorbaPyDouble(InputPyPort* p);
23       virtual void put(const void *data) throw(ConversionException);
24       void put(CORBA::Any *data) throw(ConversionException);
25     };
26
27 /*! \brief Class for conversion from CORBA Output port to Python Input port
28  *
29  * \ingroup AdaptorPorts
30  *
31  */
32     class CorbaPyInt : public ProxyPort
33     {
34     public:
35       CorbaPyInt(InputPyPort* p);
36       virtual void put(const void *data) throw(ConversionException);
37       void put(CORBA::Any *data) throw(ConversionException);
38     };
39
40 /*! \brief Class for conversion from CORBA Output port to Python Input port
41  *
42  * \ingroup AdaptorPorts
43  *
44  */
45     class CorbaPyString : public ProxyPort
46     {
47     public:
48       CorbaPyString(InputPyPort* p);
49       virtual void put(const void *data) throw(ConversionException);
50       void put(CORBA::Any *data) throw(ConversionException);
51     };
52
53 /*! \brief Class for conversion from CORBA Output port to Python Input port
54  *
55  * Convert boolean data
56  *
57  * \ingroup AdaptorPorts
58  *
59  */
60     class CorbaPyBool : public ProxyPort
61     {
62     public:
63       CorbaPyBool(InputPyPort* p);
64       virtual void put(const void *data) throw(ConversionException);
65       void put(CORBA::Any *data) throw(ConversionException);
66     };
67
68 /*! \brief Class for conversion from CORBA Output port to Python Input port
69  *
70  * \ingroup AdaptorPorts
71  *
72  */
73     class CorbaPyObjref : public ProxyPort
74     {
75     public:
76       CorbaPyObjref(InputPyPort* p);
77       virtual void put(const void *data) throw(ConversionException);
78       void put(CORBA::Any *data) throw(ConversionException);
79     };
80
81 /*! \brief Class for conversion from CORBA Output port to Python Input port
82  *
83  * \ingroup AdaptorPorts
84  *
85  */
86     class CorbaPySequence : public ProxyPort
87     {
88     public:
89       CorbaPySequence(InputPyPort* p);
90       virtual void put(const void *data) throw(ConversionException);
91       void put(CORBA::Any *data) throw(ConversionException);
92     protected:
93       DynamicAny::DynAnyFactory_ptr _dynfactory;
94     };
95
96 /*! \brief Class for conversion of struct objects from CORBA Output port to Python Input port
97  *
98  * \ingroup AdaptorPorts
99  *
100  */
101     class CorbaPyStruct : public ProxyPort
102     {
103     public:
104       CorbaPyStruct(InputPyPort* p);
105       virtual void put(const void *data) throw(ConversionException);
106       void put(CORBA::Any *data) throw(ConversionException);
107     };
108
109   }
110 }
111 #endif