1 // Copyright (C) 2006-2008 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef __CORBAPYTHONCONV_HXX__
20 #define __CORBAPYTHONCONV_HXX__
22 #include <omniORB4/CORBA.h>
23 #include "InputPort.hxx"
24 #include "ConversionException.hxx"
32 /*! \brief Class for conversion from CORBA Output port to Python Input port
34 * \ingroup AdaptorPorts
37 class CorbaPyDouble : public ProxyPort
40 CorbaPyDouble(InputPyPort* p);
41 virtual void put(const void *data) throw(ConversionException);
42 void put(CORBA::Any *data) throw(ConversionException);
45 /*! \brief Class for conversion from CORBA Output port to Python Input port
47 * \ingroup AdaptorPorts
50 class CorbaPyInt : public ProxyPort
53 CorbaPyInt(InputPyPort* p);
54 virtual void put(const void *data) throw(ConversionException);
55 void put(CORBA::Any *data) throw(ConversionException);
58 /*! \brief Class for conversion from CORBA Output port to Python Input port
60 * \ingroup AdaptorPorts
63 class CorbaPyString : public ProxyPort
66 CorbaPyString(InputPyPort* p);
67 virtual void put(const void *data) throw(ConversionException);
68 void put(CORBA::Any *data) throw(ConversionException);
71 /*! \brief Class for conversion from CORBA Output port to Python Input port
73 * Convert boolean data
75 * \ingroup AdaptorPorts
78 class CorbaPyBool : public ProxyPort
81 CorbaPyBool(InputPyPort* p);
82 virtual void put(const void *data) throw(ConversionException);
83 void put(CORBA::Any *data) throw(ConversionException);
86 /*! \brief Class for conversion from CORBA Output port to Python Input port
88 * \ingroup AdaptorPorts
91 class CorbaPyObjref : public ProxyPort
94 CorbaPyObjref(InputPyPort* p);
95 virtual void put(const void *data) throw(ConversionException);
96 void put(CORBA::Any *data) throw(ConversionException);
99 /*! \brief Class for conversion from CORBA Output port to Python Input port
101 * \ingroup AdaptorPorts
104 class CorbaPySequence : public ProxyPort
107 CorbaPySequence(InputPyPort* p);
108 virtual void put(const void *data) throw(ConversionException);
109 void put(CORBA::Any *data) throw(ConversionException);
111 DynamicAny::DynAnyFactory_ptr _dynfactory;
114 /*! \brief Class for conversion of struct objects from CORBA Output port to Python Input port
116 * \ingroup AdaptorPorts
119 class CorbaPyStruct : public ProxyPort
122 CorbaPyStruct(InputPyPort* p);
123 virtual void put(const void *data) throw(ConversionException);
124 void put(CORBA::Any *data) throw(ConversionException);