1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef _RECEIVERS_HXX_
23 #define _RECEIVERS_HXX_
28 #include "SALOME_Comm_i.hxx"
29 #include "Receiver.hxx"
32 Receiver used for transfert with CORBA when no copy is required remotely and locally.
34 template<class T,class TCorba,class TSeqCorba,class CorbaSender,class servForT,class ptrForT>
35 class CorbaNCNoCopyReceiver : public Receiver<T,servForT,ptrForT>
38 CorbaSender _mySender;
40 CorbaNCNoCopyReceiver(CorbaSender mySender);
41 ~CorbaNCNoCopyReceiver();
42 T *getValue(long &size);
44 T *getDistValue(long &size);
48 Receiver used for transfert with CORBA when copy is not required remotely but required locally.
50 template<class T,class TCorba,class TSeqCorba,class CorbaSender,class servForT,class ptrForT>
51 class CorbaNCWithCopyReceiver : public Receiver<T,servForT,ptrForT>
54 CorbaSender _mySender;
56 CorbaNCWithCopyReceiver(CorbaSender mySender);
57 ~CorbaNCWithCopyReceiver();
58 T *getValue(long &size);
60 T *getDistValue(long &size);
64 Receiver used for transfert with CORBA when copy is required remotely but not required locally.
66 template<class T,class TCorba,class TSeqCorba,class CorbaSender,class servForT,class ptrForT>
67 class CorbaWCNoCopyReceiver : public Receiver<T,servForT,ptrForT>
70 CorbaSender _mySender;
72 CorbaWCNoCopyReceiver(CorbaSender mySender);
73 ~CorbaWCNoCopyReceiver();
74 T *getValue(long &size);
76 T *getDistValue(long &size);
80 Receiver used for transfert with CORBA when copy is required both remotely and locally.
82 template<class T,class TCorba,class TSeqCorba,class CorbaSender,class servForT,class ptrForT>
83 class CorbaWCWithCopyReceiver : public Receiver<T,servForT,ptrForT>
86 CorbaSender _mySender;
88 CorbaWCWithCopyReceiver(CorbaSender mySender);
89 ~CorbaWCWithCopyReceiver();
90 T *getValue(long &size);
92 T *getDistValue(long &size);
97 Receiver for MPI transfert.
102 static MPI_Datatype MpiType;
106 MPI_Datatype MPITRAITS<double>::MpiType=MPI_DOUBLE;
109 MPI_Datatype MPITRAITS<int>::MpiType=MPI_INT;
111 template<class T,class CorbaSender,class servForT,class ptrForT>
112 class MPIReceiver : public Receiver<T,servForT,ptrForT>
115 CorbaSender _mySender;
117 MPIReceiver(CorbaSender mySender);
119 T *getValue(long &size);
121 T *getDistValue(long &size);
130 Receiver for transfert with sockets.
132 template<class T,int (*myFunc)(XDR*,T*),class CorbaSender,class servForT,class ptrForT>
133 class SocketReceiver : public Receiver<T,servForT,ptrForT>
136 CorbaSender _mySender;
140 SocketReceiver(CorbaSender mySender);
142 T *getValue(long &size);
144 T *getDistValue(long &size);
146 void connectCom(const char *, int);
151 #include "Receivers.cxx"