49 fromProcNo_(fromProcNo),
55 impl()->init(commsType, bufSize, fromProcNo_, messageSize_, buf_);
61 inline void Foam::IPstream::checkEof()
71 inline void Foam::IPstream::readFromBuffer(
T& t)
73 const size_t align =
sizeof(
T);
74 bufPosition_ = align + ((bufPosition_ - 1) & ~(align - 1));
76 t =
reinterpret_cast<T&
>(buf_[bufPosition_]);
77 bufPosition_ +=
sizeof(
T);
82 inline void Foam::IPstream::readFromBuffer
91 bufPosition_ = align + ((bufPosition_ - 1) & ~(align - 1));
94 register const char* bufPtr = &buf_[bufPosition_];
95 register char* dataPtr =
reinterpret_cast<char*
>(data);
96 register size_t i = count;
97 while (i--) *dataPtr++ = *bufPtr++;
98 bufPosition_ += count;
182 string* pval =
new string;
260 c = buf_[bufPosition_];
271 str = &buf_[bufPosition_];
272 bufPosition_ += len + 1;
282 str = &buf_[bufPosition_];
283 bufPosition_ += len + 1;
315 <<
"stream format not binary"
319 readFromBuffer(data, count, 8);