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 85 of file writeFile.C.
Referenced by writeFile::valueWidth().
~writeFile | ( | ) |
Destructor.
Definition at line 97 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 polyMesh::defaultRegion, writeFile::fileObr_, TimePaths::globalPath(), mesh, IOobject::name(), writeFile::outputPrefix, 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 67 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 74 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 110 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 121 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 131 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 141 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 103 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(), sampledSets::sampledSets(), sampledSurfaces::sampledSurfaces(), streamlines::write(), and Foam::writeCellGraph().
|
static |
Additional characters for writing.
Definition at line 75 of file writeFile.H.
Referenced by writeFile::charWidth(), and writeFile::valueWidth().