1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef _RECEIVERS_HXX_
21 #define _RECEIVERS_HXX_
26 #include "SALOME_Comm_i.hxx"
27 #include "Receiver.hxx"
30 Receiver used for transfert with CORBA when no copy is required remotely and locally.
32 template<class T,class TCorba,class TSeqCorba,class CorbaSender,class servForT,class ptrForT>
33 class CorbaNCNoCopyReceiver : public Receiver<T,servForT,ptrForT>
36 CorbaSender _mySender;
38 CorbaNCNoCopyReceiver(CorbaSender mySender);
39 ~CorbaNCNoCopyReceiver();
40 T *getValue(long &size);
42 T *getDistValue(long &size);
46 Receiver used for transfert with CORBA when copy is not required remotely but required locally.
48 template<class T,class TCorba,class TSeqCorba,class CorbaSender,class servForT,class ptrForT>
49 class CorbaNCWithCopyReceiver : public Receiver<T,servForT,ptrForT>
52 CorbaSender _mySender;
54 CorbaNCWithCopyReceiver(CorbaSender mySender);
55 ~CorbaNCWithCopyReceiver();
56 T *getValue(long &size);
58 T *getDistValue(long &size);
62 Receiver used for transfert with CORBA when copy is required remotely but not required locally.
64 template<class T,class TCorba,class TSeqCorba,class CorbaSender,class servForT,class ptrForT>
65 class CorbaWCNoCopyReceiver : public Receiver<T,servForT,ptrForT>
68 CorbaSender _mySender;
70 CorbaWCNoCopyReceiver(CorbaSender mySender);
71 ~CorbaWCNoCopyReceiver();
72 T *getValue(long &size);
74 T *getDistValue(long &size);
78 Receiver used for transfert with CORBA when copy is required both remotely and locally.
80 template<class T,class TCorba,class TSeqCorba,class CorbaSender,class servForT,class ptrForT>
81 class CorbaWCWithCopyReceiver : public Receiver<T,servForT,ptrForT>
84 CorbaSender _mySender;
86 CorbaWCWithCopyReceiver(CorbaSender mySender);
87 ~CorbaWCWithCopyReceiver();
88 T *getValue(long &size);
90 T *getDistValue(long &size);
95 Receiver for MPI transfert.
100 static MPI_Datatype MpiType;
104 MPI_Datatype MPITRAITS<double>::MpiType=MPI_DOUBLE;
107 MPI_Datatype MPITRAITS<int>::MpiType=MPI_INT;
109 template<class T,class CorbaSender,class servForT,class ptrForT>
110 class MPIReceiver : public Receiver<T,servForT,ptrForT>
113 CorbaSender _mySender;
115 MPIReceiver(CorbaSender mySender);
117 T *getValue(long &size);
119 T *getDistValue(long &size);
128 Receiver for transfert with sockets.
130 template<class T,int (*myFunc)(XDR*,T*),class CorbaSender,class servForT,class ptrForT>
131 class SocketReceiver : public Receiver<T,servForT,ptrForT>
134 CorbaSender _mySender;
138 SocketReceiver(CorbaSender mySender);
140 T *getValue(long &size);
142 T *getDistValue(long &size);
144 void connectCom(const char *, int);
149 #include "Receivers.cxx"