1 // Copyright (C) 2007-2011 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
23 #ifndef _RECEIVERS_HXX_
24 #define _RECEIVERS_HXX_
29 #include "SALOME_Comm_i.hxx"
30 #include "Receiver.hxx"
33 Receiver used for transfert with CORBA when no copy is required remotely and locally.
35 template<class T,class TCorba,class TSeqCorba,class CorbaSender,class servForT,class ptrForT>
36 class CorbaNCNoCopyReceiver : public Receiver<T,servForT,ptrForT>
39 CorbaSender _mySender;
41 CorbaNCNoCopyReceiver(CorbaSender mySender);
42 ~CorbaNCNoCopyReceiver();
43 T *getValue(long &size);
45 T *getDistValue(long &size);
49 Receiver used for transfert with CORBA when copy is not required remotely but required locally.
51 template<class T,class TCorba,class TSeqCorba,class CorbaSender,class servForT,class ptrForT>
52 class CorbaNCWithCopyReceiver : public Receiver<T,servForT,ptrForT>
55 CorbaSender _mySender;
57 CorbaNCWithCopyReceiver(CorbaSender mySender);
58 ~CorbaNCWithCopyReceiver();
59 T *getValue(long &size);
61 T *getDistValue(long &size);
65 Receiver used for transfert with CORBA when copy is required remotely but not required locally.
67 template<class T,class TCorba,class TSeqCorba,class CorbaSender,class servForT,class ptrForT>
68 class CorbaWCNoCopyReceiver : public Receiver<T,servForT,ptrForT>
71 CorbaSender _mySender;
73 CorbaWCNoCopyReceiver(CorbaSender mySender);
74 ~CorbaWCNoCopyReceiver();
75 T *getValue(long &size);
77 T *getDistValue(long &size);
81 Receiver used for transfert with CORBA when copy is required both remotely and locally.
83 template<class T,class TCorba,class TSeqCorba,class CorbaSender,class servForT,class ptrForT>
84 class CorbaWCWithCopyReceiver : public Receiver<T,servForT,ptrForT>
87 CorbaSender _mySender;
89 CorbaWCWithCopyReceiver(CorbaSender mySender);
90 ~CorbaWCWithCopyReceiver();
91 T *getValue(long &size);
93 T *getDistValue(long &size);
98 Receiver for MPI transfert.
103 static MPI_Datatype MpiType;
107 MPI_Datatype MPITRAITS<double>::MpiType=MPI_DOUBLE;
110 MPI_Datatype MPITRAITS<int>::MpiType=MPI_INT;
112 template<class T,class CorbaSender,class servForT,class ptrForT>
113 class MPIReceiver : public Receiver<T,servForT,ptrForT>
116 CorbaSender _mySender;
118 MPIReceiver(CorbaSender mySender);
120 T *getValue(long &size);
122 T *getDistValue(long &size);
131 Receiver for transfert with sockets.
133 template<class T,int (*myFunc)(XDR*,T*),class CorbaSender,class servForT,class ptrForT>
134 class SocketReceiver : public Receiver<T,servForT,ptrForT>
137 CorbaSender _mySender;
141 SocketReceiver(CorbaSender mySender);
143 T *getValue(long &size);
145 T *getDistValue(long &size);
147 void connectCom(const char *, int);
152 #include "Receivers.cxx"