functionObject base class for writing single files More...
Public Member Functions | |
writeFile (const objectRegistry &obr, const word &prefix) | |
Construct from objectRegistry and prefix. More... | |
writeFile (const writeFile &)=delete | |
Disallow default bitwise copy construction. More... | |
~writeFile () | |
Destructor. More... | |
void | initStream (Ostream &os) const |
Initialise the output stream for writing. More... | |
fileName | baseFileDir () const |
Return the base directory for output. More... | |
fileName | baseTimeDir () const |
Return the base directory for the current time value. More... | |
Omanip< int > | valueWidth (const label offset=0) const |
Return the value width when writing to stream with optional offset. More... | |
void | writeCommented (Ostream &os, const string &str) const |
Write a commented string to stream. More... | |
void | writeTabbed (Ostream &os, const string &str) const |
Write a tabbed string to stream. More... | |
void | writeHeader (Ostream &os, const string &str) const |
Write a commented header to stream. More... | |
void | writeTime (Ostream &os) const |
Write the current time to stream. More... | |
template<class Type > | |
void | writeHeaderValue (Ostream &os, const string &property, const Type &value) const |
Write a (commented) header property and value pair. More... | |
label | charWidth () const |
Return width of character stream output. More... | |
void | operator= (const writeFile &)=delete |
Disallow default bitwise assignment. More... | |
Static Public Attributes | |
static const word | outputPrefix |
Directory prefix. More... | |
static label | addChars = 8 |
Additional characters for writing. More... | |
Protected Attributes | |
const objectRegistry & | fileObr_ |
Reference to the region objectRegistry. More... | |
const word | prefix_ |
Prefix. More... | |
functionObject base class for writing single files
Definition at line 55 of file writeFile.H.
writeFile | ( | const objectRegistry & | obr, |
const word & | prefix | ||
) |
Construct from objectRegistry and prefix.
Definition at line 99 of file writeFile.C.
Referenced by writeFile::valueWidth().
~writeFile | ( | ) |
Destructor.
Definition at line 111 of file writeFile.C.
void initStream | ( | Ostream & | os | ) | const |
Initialise the output stream for writing.
Definition at line 42 of file writeFile.C.
References writeFile::charWidth(), Foam::scientific(), IOstream::setf(), and Ostream::width().
Referenced by logFiles::createFiles().
Foam::fileName baseFileDir | ( | ) | const |
Return the base directory for output.
Definition at line 49 of file writeFile.C.
References fileName::clean(), polyMesh::defaultRegion, writeFile::fileObr_, mesh, IOobject::name(), writeFile::outputPrefix, UPstream::parRun(), Time::path(), and objectRegistry::time().
Referenced by writeFile::baseTimeDir(), logFiles::createFiles(), and surfaceFieldValue::outputDir().
Foam::fileName baseTimeDir | ( | ) | const |
Return the base directory for the current time value.
Definition at line 81 of file writeFile.C.
References writeFile::baseFileDir(), writeFile::fileObr_, writeFile::prefix_, objectRegistry::time(), Time::timeName(), and writeFile::valueWidth().
Foam::Omanip< int > valueWidth | ( | const label | offset = 0 | ) | const |
Return the value width when writing to stream with optional offset.
Definition at line 88 of file writeFile.C.
References writeFile::addChars, IOstream::defaultPrecision(), Foam::setw(), and writeFile::writeFile().
Referenced by writeFile::baseTimeDir().
Write a commented string to stream.
Definition at line 124 of file writeFile.C.
References writeFile::charWidth(), Foam::setf(), Foam::setw(), and writeFile::writeTabbed().
Referenced by writeFile::charWidth(), and volRegion::writeFileHeader().
Write a tabbed string to stream.
Definition at line 135 of file writeFile.C.
References writeFile::charWidth(), Foam::setw(), Foam::tab, and writeFile::writeHeader().
Referenced by writeFile::writeCommented(), and residuals::writeFileHeader().
Write a commented header to stream.
Definition at line 145 of file writeFile.C.
References writeFile::charWidth(), Foam::nl, Foam::setf(), and Foam::setw().
Referenced by writeFile::writeTabbed().
void writeTime | ( | Ostream & | os | ) | const |
Write the current time to stream.
Definition at line 155 of file writeFile.C.
References writeFile::charWidth(), writeFile::fileObr_, Foam::setw(), objectRegistry::time(), and Time::timeName().
Write a (commented) header property and value pair.
Definition at line 30 of file writeFileTemplates.C.
References Foam::nl, Foam::setf(), and Foam::setw().
Referenced by volRegion::writeFileHeader().
Foam::label charWidth | ( | ) | const |
Return width of character stream output.
Definition at line 117 of file writeFile.C.
References writeFile::addChars, IOstream::defaultPrecision(), and writeFile::writeCommented().
Referenced by writeFile::initStream(), writeFile::writeCommented(), writeFile::writeHeader(), writeFile::writeTabbed(), and writeFile::writeTime().
|
delete |
Disallow default bitwise assignment.
|
protected |
Reference to the region objectRegistry.
Definition at line 63 of file writeFile.H.
Referenced by writeFile::baseFileDir(), writeFile::baseTimeDir(), logFiles::createFiles(), and writeFile::writeTime().
|
protected |
Prefix.
Definition at line 66 of file writeFile.H.
Referenced by writeFile::baseTimeDir(), and logFiles::createFiles().
|
static |
Directory prefix.
Definition at line 72 of file writeFile.H.
Referenced by writeFile::baseFileDir(), Foam::makeGraph(), and Foam::writeCellGraph().
|
static |
Additional characters for writing.
Definition at line 75 of file writeFile.H.
Referenced by writeFile::charWidth(), and writeFile::valueWidth().