FreeFOAM The Cross-Platform CFD Toolkit
dummyIPstreamImpl.H
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------*\
2  ______ _ ____ __ __
3  | ____| _| |_ / __ \ /\ | \/ |
4  | |__ _ __ ___ ___ / \| | | | / \ | \ / |
5  | __| '__/ _ \/ _ ( (| |) ) | | |/ /\ \ | |\/| |
6  | | | | | __/ __/\_ _/| |__| / ____ \| | | |
7  |_| |_| \___|\___| |_| \____/_/ \_\_| |_|
8 
9  FreeFOAM: The Cross-Platform CFD Toolkit
10 
11  Copyright (C) 2008-2012 Michael Wild <themiwi@users.sf.net>
12  Gerber van der Graaf <gerber_graaf@users.sf.net>
13 --------------------------------------------------------------------------------
14 License
15  This file is part of FreeFOAM.
16 
17  FreeFOAM is free software: you can redistribute it and/or modify it
18  under the terms of the GNU General Public License as published by the
19  Free Software Foundation, either version 3 of the License, or (at your
20  option) any later version.
21 
22  FreeFOAM is distributed in the hope that it will be useful, but WITHOUT
23  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
24  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25  for more details.
26 
27  You should have received a copy of the GNU General Public License
28  along with FreeFOAM. If not, see <http://www.gnu.org/licenses/>.
29 
30 Class
31  Foam::dummyIPstreamImpl
32 
33 Description
34  Dummy implementation of the IPstreamImpl abstract base class.
35 
36 SourceFiles
37  dummyIPstreamImpl.C
38 
39 \*----------------------------------------------------------------------------*/
40 
41 #ifndef dummyIPstreamImpl_H
42 #define dummyIPstreamImpl_H
43 
44 #include <OpenFOAM/IPstreamImpl.H>
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class dummyIPstreamImpl Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public IPstreamImpl
58 {
59  // Private Member Functions
60 
61  //- Disallow default bitwise copy construct
63 
64  //- Disallow default bitwise assignment
65  void operator=(const dummyIPstreamImpl&);
66 
67 public:
68 
69  // Declare name of the class and its debug switch
70  TypeName("dummyIPstreamImpl");
71 
72  // Constructors
73 
74  //- Construct null
76 
77  // Member Functions
78 
79  //- Initialization
80  virtual void init
81  (
82  const PstreamImpl::commsTypes commsType,
83  const label bufSize,
84  int& fromProcNo,
85  label& messageSize,
86  List<char>& buf
87  );
88 
89  //- Read into given buffer from given processor and return the
90  // message size
91  virtual label read
92  (
93  const PstreamImpl::commsTypes commsType,
94  const int fromProcNo,
95  char* buf,
96  const std::streamsize bufSize
97  );
98 
99  //- Non-blocking receives: wait until all have finished.
100  virtual void waitRequests();
101 
102  //- Non-blocking receives: has request i finished?
103  virtual bool finishedRequest(const label i);
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #endif
114 
115 // ************************ vim: set sw=4 sts=4 et: ************************ //