35#ifndef Foam_OSHA1stream_H
36#define Foam_OSHA1stream_H
53 virtual public std::ios,
67 virtual int overflow(
int c = EOF)
69 if (c != EOF) sha1_.
append(c);
74 virtual std::streamsize xsputn(
const char*
s, std::streamsize
n)
235 #ifdef Foam_IOstream_extras
Allocator for an osha1stream.
OSHA1streamAllocator()=default
Default construct.
SHA1Digest digest()
Return SHA1::Digest for the data processed until now.
void reset()
Clear the SHA1 calculation.
SHA1 & sha1() noexcept
Full access to the sha1.
stream_type stream_
The output stream.
Representation of a major/minor version number.
The IOstreamOption is a simple container for options an IOstream can normally have.
versionNumber version() const noexcept
Get the stream version.
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
streamFormat format() const noexcept
Get the current stream format.
streamFormat
Data format (ascii | binary)
static const versionNumber currentVersion
The current version number (2.0)
The output stream for calculating SHA1 digests.
OSHA1stream(IOstreamOption streamOpt=IOstreamOption())
Construct with an empty digest.
void rewind()
Deprecated(2017-07) clear the SHA1 calculation.
Generic output stream using a standard (STL) stream.
virtual Ostream & writeQuoted(const std::string &str, const bool quoted=true)
Write std::string surrounded by quotes.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Functions to compute SHA1 message digest according to the NIST specification FIPS-180-1.
void clear() noexcept
Reset the hashed data before appending more.
void append(char c)
Append single character.
SHA1Digest digest() const
Calculate digest from current data.
A basic output stream for calculating SHA1 digests.
osha1stream()
Default construct.
sha1buf * rdbuf()
This hides both signatures of std::basic_ios::rdbuf()
SHA1 & sha1() noexcept
Full access to the sha1.
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))