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