Go to the documentation of this file.
34 #ifndef OScountStream_H
35 #define OScountStream_H
55 std::streamsize size_;
63 std::ios_base::seekdir way,
64 std::ios_base::openmode which = std::ios_base::in|std::ios_base::out
67 if (which & std::ios_base::out)
69 if (way == std::ios_base::beg)
73 else if (way == std::ios_base::cur)
94 std::ios_base::openmode which = std::ios_base::in|std::ios_base::out
113 virtual std::streamsize
xsputn(
const char*
s, std::streamsize
n)
129 std::streamsize
tellp()
const
137 os <<
"count=" << size_;
151 virtual public std::ios,
169 std::streamsize
size()
const
177 this->pubseekpos(0, std::ios_base::out);
292 #ifdef Foam_IOstream_extras
std::streamsize tellp() const
OCountStreamAllocator(std::streamsize precount=0)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
streamFormat format() const noexcept
static const versionNumber currentVersion
virtual void print(Ostream &os) const
void printBufInfo(Ostream &os) const
virtual const fileName & name() const
OSstream(const OSstream &)=default
The IOstreamOption is a simple container for options an IOstream can normally have.
Generic output stream using a standard (STL) stream.
versionNumber version() const noexcept
virtual std::streampos seekpos(std::streampos pos, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out)
OBJstream os(runTime.globalPath()/outputName)
constexpr auto end(C &c) -> decltype(c.end())
virtual int overflow(int c=EOF)
countstreambuf(std::streamsize precount=0)
void printBufInfo(Ostream &os) const
std::streamsize size() const
virtual std::streampos seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out)
OCountStream(const OCountStream &str)
std::streamsize size() const
virtual std::streamsize xsputn(const char *s, std::streamsize n)
OCountStream(IOstreamOption streamOpt=IOstreamOption())
const dimensionedScalar c
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
dimensionedScalar pos(const dimensionedScalar &ds)