Go to the documentation of this file.
47 const size_t align =
sizeof(
T);
48 externalBufPosition_ = align + ((externalBufPosition_ - 1) & ~(align - 1));
50 t =
reinterpret_cast<T&
>(externalBuf_[externalBufPosition_]);
51 externalBufPosition_ +=
sizeof(
T);
65 externalBufPosition_ =
67 + ((externalBufPosition_ - 1) & ~(align - 1));
70 const char* bufPtr = &externalBuf_[externalBufPosition_];
71 char* dataPtr =
reinterpret_cast<char*
>(
data);
73 while (i--) *dataPtr++ = *bufPtr++;
74 externalBufPosition_ += count;
83 if (clearAtEnd_ && eof())
87 Pout<<
"UIPstream::~UIPstream() : tag:" << tag_
88 <<
" fromProcNo:" << fromProcNo_
89 <<
" clearing externalBuf_ of size "
90 << externalBuf_.size()
91 <<
" messageSize_:" << messageSize_ <<
endl;
93 externalBuf_.clearStorage();
184 string* pval =
new string;
266 c = externalBuf_[externalBufPosition_];
267 externalBufPosition_++;
277 str = &externalBuf_[externalBufPosition_];
278 externalBufPosition_ += len + 1;
288 str = &externalBuf_[externalBufPosition_];
289 externalBufPosition_ += len + 1;
321 <<
"stream format not binary"
325 readFromBuffer(
data, count, 8);
332 externalBufPosition_ = 0;
339 os <<
"Reading from processor " << fromProcNo_
340 <<
" using communicator " << comm_
341 <<
" and tag " << tag_
static autoPtr< compound > New(const word &type, Istream &)
Select null constructed.
word format(conversionProperties.lookup("format"))
double doubleScalar
Double precision floating point scalar type.
A class for handling words, derived from string.
label & externalBufPosition_
void checkEof()
Check the bufferPosition against messageSize_ for EOF.
bool read(const char *, int32_t &)
float floatScalar
Float precision floating point scalar type.
punctuationToken
Standard punctuation tokens.
void setEof()
Set stream to have reached eof.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A token holds items read from Istream.
A class for handling character strings derived from std::string.
static label read(const commsTypes commsType, const int fromProcNo, char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label communicator=0)
Read into given buffer from given processor and return the.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void print(Ostream &) const
Print description of IOstream to Ostream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
static bool isCompound(const word &name)
Return true if name is a compound type.
void readFromBuffer(T &)
Read a T from the transfer buffer.
errorManip< error > abort(error &err)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
prefixOSstream Pout(cout, "Pout")
Istream & rewind()
Rewind and return the stream so that it may be read again.
const dimensionedScalar c
Speed of light in a vacuum.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool getBack(token &)
Get the put back token if there is one and return true.
Database for solution data, solver performance and other reduced data.