Base class for graphics format writing. Entry points are
#include <sampling/writer.H>
Base class for graphics format writing. Entry points are
// Construct writer of xmgr type autoPtr<writer<scalar> > scalarFormatter(writer<scalar>::New("xmgr")); // Output list of points and corresponding values scalarFormatter().write ( coordSet ( points, // sample coordinates "someLine", // name of coordSet "distance", // write coordinates as distance to refPoint points[0] // reference point ), "U.component(0)", // name of values vals// values );
Definition at line 85 of file writer.H.
Public Member Functions | |
TypeName ("writer") | |
Runtime type information.
| |
declareRunTimeSelectionTable (autoPtr, writer, word,(),()) | |
writer () | |
Construct null.
| |
virtual | ~writer ()=0 |
Destructor.
| |
virtual fileName | getFileName (const coordSet &, const wordList &) const =0 |
Generate file name with correct extension.
| |
virtual void | write (const coordSet &, const wordList &, const List< const Field< Type > * > &, Ostream &) const =0 |
General entry point for writing.
| |
virtual void | write (const bool writeTracks, const PtrList< coordSet > &, const wordList &valueSetNames, const List< List< Field< Type > > > &, Ostream &) const =0 |
General entry point for writing of multiple coordSets.
| |
virtual Ostream & | write (const scalar, Ostream &) const |
Write scalar as ascii.
| |
template<class VSType > | |
Ostream & | writeVS (const VSType &, Ostream &) const |
virtual Ostream & | write (const vector &, Ostream &) const |
Write vector. Tab separated ascii.
| |
virtual Ostream & | write (const sphericalTensor &, Ostream &) const |
Write sphericalTensor. Tab separated ascii.
| |
virtual Ostream & | write (const symmTensor &, Ostream &) const |
Write symmTensor. Tab separated ascii.
| |
virtual Ostream & | write (const tensor &, Ostream &) const |
Write tensor. Tab separated ascii.
| |
Static Public Member Functions | |
static autoPtr< writer > | New (const word &writeFormat) |
Return a reference to the selected writer.
| |
Protected Member Functions | |
fileName | getBaseName (const coordSet &, const wordList &) const |
Generates filename from coordSet and sampled fields.
| |
void | writeCoord (const coordSet &, const label sampleI, Ostream &) const |
void | writeTable (const coordSet &, const List< Type > &, Ostream &) const |
Writes single-column ascii write. Column 1 is coordSet coordinate,.
| |
void | writeTable (const coordSet &, const List< const List< Type > * > &, Ostream &os) const |
Writes multi-column ascii write. Column 1 is coordSet coordinate,.
| |
virtual void | writeSeparator (Ostream &os) const |
Writes a separator. Used by write functions.
|
Foam::fileName getBaseName | ( | const coordSet & | points, |
const wordList & | valueSets | ||
) | const [protected]
|
Generates filename from coordSet and sampled fields.
Definition at line 63 of file writer.C.
References forAll, and coordSet::name().
Definition at line 81 of file writer.C.
References coordSet::hasVectorAxis(), coordSet::scalarCoord(), and coordSet::vectorCoord().
void writeSeparator | ( | Ostream & | os ) | const [protected, virtual]
|
Writes a separator. Used by write functions.
Reimplemented in csvSetWriter< Type >.
TypeName | ( | "writer< Type >" | ) |
Runtime type information.
Foam::autoPtr< Foam::writer< Type > > New | ( | const word & | writeFormat ) | [static]
|
Return a reference to the selected writer.
Definition at line 35 of file writer.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, and Foam::nl.
Generate file name with correct extension.
Implemented in csvSetWriter< Type >, gnuplotSetWriter< Type >, jplotSetWriter< Type >, rawSetWriter< Type >, and xmgraceSetWriter< Type >.
virtual void write | ( | const coordSet & | , |
const wordList & | , | ||
const List< const Field< Type > * > & | , | ||
Ostream & | |||
) | const [pure virtual]
|
General entry point for writing.
The data is organized in a set of point with one or more values per point
Implemented in csvSetWriter< Type >, gnuplotSetWriter< Type >, jplotSetWriter< Type >, rawSetWriter< Type >, and xmgraceSetWriter< Type >.
virtual void write | ( | const bool | writeTracks, |
const PtrList< coordSet > & | , | ||
const wordList & | valueSetNames, | ||
const List< List< Field< Type > > > & | , | ||
Ostream & | |||
) | const [pure virtual]
|
General entry point for writing of multiple coordSets.
Each coordSet (track) has same data variables. The data is per variable, per track, per point of track. If writeTracks adds connecting lines (wherever applicable)
Implemented in csvSetWriter< Type >, gnuplotSetWriter< Type >, jplotSetWriter< Type >, rawSetWriter< Type >, and xmgraceSetWriter< Type >.
Foam::Ostream & write | ( | const scalar | value, |
Ostream & | os | ||
) | const [virtual]
|
Foam::Ostream & writeVS | ( | const VSType & | value, |
Ostream & | os | ||
) | const |
Foam::Ostream & write | ( | const vector & | value, |
Ostream & | os | ||
) | const [virtual]
|
Foam::Ostream & write | ( | const sphericalTensor & | value, |
Ostream & | os | ||
) | const [virtual]
|
Foam::Ostream & write | ( | const symmTensor & | value, |
Ostream & | os | ||
) | const [virtual]
|
Foam::Ostream & write | ( | const tensor & | value, |
Ostream & | os | ||
) | const [virtual]
|