72#ifndef functionObjects_writeFile_H
73#define functionObjects_writeFile_H
83namespace functionObjects
237 const string& property,
Istream and Ostream manipulators taking arguments.
Output to file stream, using an OSstream.
An Ostream manipulator taking arguments.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
Base class for writing single files from the function objects.
void operator=(const writeFile &)=delete
No copy assignment.
fileName baseFileDir() const
Return the base directory for output.
label writePrecision_
Write precision.
virtual void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
word fileName_
Name of file.
void writeHeaderValue(Ostream &os, const string &property, const Type &value) const
Write a (commented) header property and value pair.
virtual label charWidth() const
Return width of character stream output.
Omanip< int > valueWidth(const label offset=0) const
Return the value width when writing to stream with optional offset.
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
virtual bool read(const dictionary &dict)
Read.
virtual void writeBreak(Ostream &os) const
Write a break marker to the stream.
const fileName prefix_
Prefix.
virtual autoPtr< OFstream > createFile(const word &name, scalar timeValue) const
Return autoPtr to a new file for a given time.
void initStream(Ostream &os) const
Initialise the output stream for writing.
bool writeToFile_
Flag to enable/disable writing to file.
bool writtenHeader_
Flag to identify whether the header has been written.
void writeValue(Ostream &os, const Type &val) const
Write a given value to stream with the space delimiter.
virtual OFstream & file()
Return access to the file (if only 1)
static label addChars
Additional characters for writing.
autoPtr< OFstream > filePtr_
File pointer.
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
virtual void writeCurrentTime(Ostream &os) const
Write the current time to stream.
virtual bool writeToFile() const
Flag to allow writing to file.
fileName baseTimeDir() const
Return the base directory for the current time value.
virtual ~writeFile()=default
Destructor.
scalar startTime_
Start time value.
virtual void resetFile(const word &name)
Reset internal file pointer to new file with new name.
const objectRegistry & fileObr_
Reference to the region objectRegistry.
virtual bool canWriteHeader() const
Flag to allow writing the header.
Registry of regIOobjects.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.