1 // Copyright (C) 2006-2014 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, or (at your option) any later version.
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
20 #include "TypeConversions.hxx"
21 #include "RuntimeSALOME.hxx"
22 #include "NeutralCORBAConv.hxx"
26 using namespace YACS::ENGINE;
30 void NeutralCorbaInt::put(const void *data) throw(ConversionException)
32 put((YACS::ENGINE::Any *)data);
35 //!Convert a YACS::ENGINE::Any (integer) to CORBA::Any (integer)
37 * \param data : YACS::ENGINE::Any object
40 void NeutralCorbaInt::put(YACS::ENGINE::Any *data) throw(ConversionException)
42 CORBA::Any *a =convertNeutralCorba(edGetType(),data);
44 //delete Any that has been allocated by convertNeutralCorba
48 void NeutralCorbaBool::put(const void *data) throw(ConversionException)
50 put((YACS::ENGINE::Any *)data);
53 //!Convert a YACS::ENGINE::Any (boolean) to CORBA::Any (boolean)
55 * \param data : YACS::ENGINE::Any object
58 void NeutralCorbaBool::put(YACS::ENGINE::Any *data) throw(ConversionException)
60 CORBA::Any *a =convertNeutralCorba(edGetType(),data);
62 //delete Any that has been allocated by convertNeutralCorba
67 void NeutralCorbaDouble::put(const void *data) throw(ConversionException)
69 put((YACS::ENGINE::Any *)data);
72 //!Convert a YACS::ENGINE::Any (double) to CORBA::Any (double)
74 * \param data : YACS::ENGINE::Any object
77 void NeutralCorbaDouble::put(YACS::ENGINE::Any *data) throw(ConversionException)
79 CORBA::Any *a =convertNeutralCorba(edGetType(),data);
81 //delete Any that has been allocated by convertNeutralCorba
85 void NeutralCorbaSequence::put(const void *data) throw(ConversionException)
87 put((YACS::ENGINE::Any *)data);
90 //!Convert a Neutral::Any sequence to CORBA::Any* Sequence
92 * \param data : Neutral::Any object
94 void NeutralCorbaSequence::put(YACS::ENGINE::Any *data) throw(ConversionException)
96 CORBA::Any *a =convertNeutralCorba(edGetType(),data);
98 //delete Any that has been allocated by convertNeutralCorba
102 NeutralCorbaString::NeutralCorbaString(InputCorbaPort* p):ProxyPort(p), DataPort(p->getName(), p->getNode(), p->edGetType()), Port(p->getNode())
106 void NeutralCorbaString::put(const void *data) throw(ConversionException)
108 put((YACS::ENGINE::Any *)data);
111 //!Convert a Neutral::Any string to CORBA::Any* string
113 * \param data : Neutral::Any object
115 void NeutralCorbaString::put(YACS::ENGINE::Any *data) throw(ConversionException)
117 CORBA::Any *a =convertNeutralCorba(edGetType(),data);
119 //delete Any that has been allocated by convertNeutralCorba
123 NeutralCorbaObjref::NeutralCorbaObjref(InputCorbaPort* p):ProxyPort(p), DataPort(p->getName(), p->getNode(), p->edGetType()), Port(p->getNode())
127 void NeutralCorbaObjref::put(const void *data) throw(ConversionException)
129 put((YACS::ENGINE::Any *)data);
132 //!Convert a Neutral::Any Objref to CORBA::Any* Objref
134 * \param data : Neutral::Any object
136 void NeutralCorbaObjref::put(YACS::ENGINE::Any *data) throw(ConversionException)
138 CORBA::Any *a =convertNeutralCorba(edGetType(),data);
140 //delete Any that has been allocated by convertNeutralCorba
145 NeutralCorbaStruct::NeutralCorbaStruct(InputCorbaPort* p)
146 : ProxyPort(p), DataPort(p->getName(), p->getNode(), p->edGetType()), Port(p->getNode())
150 void NeutralCorbaStruct::put(const void *data) throw(ConversionException)
152 put((YACS::ENGINE::Any *)data);
155 //!Convert a Neutral::Any struct to CORBA::Any* struct
157 * \param data : Neutral::Any object
159 void NeutralCorbaStruct::put(YACS::ENGINE::Any *data) throw(ConversionException)
161 CORBA::Any *a =convertNeutralCorba(edGetType(),data);
163 //delete Any that has been allocated by convertNeutralCorba