Encapsulated combinations of output format options. This is primarily useful when defining the output type based on some command-line arguments or dictionary contents. However, it can also be a useful alternative to using the underlying enumeration directly, since this class provides additional methods not possible with an enum. More...
Public Member Functions | |
outputOptions () | |
Construct null - XML insitu ASCII format with default precision. More... | |
outputOptions (enum formatType fmtType) | |
Construct with specified format and default (ASCII) precision. More... | |
outputOptions (enum formatType fmtType, unsigned prec) | |
Construct with specified format and (ASCII) write precision. More... | |
autoPtr< formatter > | newFormatter (std::ostream &os) const |
Return new formatter based on the selected output options. More... | |
formatType | fmt () const |
The output format type. More... | |
word | ext (vtk::fileTag contentType) const |
The file extension (legacy or xml) for the given content-type. More... | |
bool | legacy () const |
True if writer uses legacy file format. More... | |
bool | xml () const |
True if writer uses XML file format (non-legacy) More... | |
bool | append () const |
True if output format uses an append mode. More... | |
bool | insitu () const |
True if output format does not use an append mode. More... | |
bool | ascii () const |
True if output format is ASCII. More... | |
unsigned | precision () const |
Return the ASCII write precision. More... | |
outputOptions & | ascii (bool on) |
Toggle ASCII mode on/off. More... | |
outputOptions & | append (bool on) |
Toggle append mode on/off. More... | |
outputOptions & | legacy (bool on) |
Toggle legacy mode on/off. More... | |
outputOptions & | precision (unsigned prec) |
Set the write precision to be used for new ASCII formatters. More... | |
string | description () const |
A text description about the output option selected. More... | |
Encapsulated combinations of output format options. This is primarily useful when defining the output type based on some command-line arguments or dictionary contents. However, it can also be a useful alternative to using the underlying enumeration directly, since this class provides additional methods not possible with an enum.
Definition at line 59 of file foamVtkOutputOptions.H.
|
inline |
Construct null - XML insitu ASCII format with default precision.
Definition at line 32 of file foamVtkOutputOptionsI.H.
References Foam::vtk::INLINE_ASCII.
|
inline |
Construct with specified format and default (ASCII) precision.
Definition at line 40 of file foamVtkOutputOptionsI.H.
|
inline |
Construct with specified format and (ASCII) write precision.
Definition at line 50 of file foamVtkOutputOptionsI.H.
|
inline |
Return new formatter based on the selected output options.
Definition at line 63 of file foamVtkOutputOptionsI.H.
References Foam::vtk::newFormatter(), and os().
Referenced by VTKsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), and Foam::vtk::writePointSet().
|
inline |
The output format type.
Definition at line 71 of file foamVtkOutputOptionsI.H.
Referenced by vtkWriter::vtkWriter().
|
inline |
The file extension (legacy or xml) for the given content-type.
Definition at line 77 of file foamVtkOutputOptionsI.H.
References Foam::vtk::fileExtension, and Foam::vtk::legacy::fileExtension.
Referenced by patchMeshWriter::ext(), internalMeshWriter::ext(), and polyWriter::ext().
|
inline |
True if writer uses legacy file format.
Definition at line 88 of file foamVtkOutputOptionsI.H.
References Foam::vtk::LEGACY_ASCII, and Foam::vtk::LEGACY_BINARY.
Referenced by VTKsurfaceFormatCore::formatOptions(), VTPsurfaceFormatCore::formatOptions(), vtkWriter::vtkWriter(), and Foam::vtk::writePointSet().
|
inline |
True if writer uses XML file format (non-legacy)
Definition at line 98 of file foamVtkOutputOptionsI.H.
|
inline |
True if output format uses an append mode.
Definition at line 104 of file foamVtkOutputOptionsI.H.
References Foam::vtk::APPEND_BASE64, and Foam::vtk::APPEND_BINARY.
Referenced by VTKsurfaceFormatCore::formatOptions(), VTPsurfaceFormatCore::formatOptions(), and Foam::vtk::writePointSet().
|
inline |
True if output format does not use an append mode.
Definition at line 114 of file foamVtkOutputOptionsI.H.
References append().
|
inline |
True if output format is ASCII.
Definition at line 120 of file foamVtkOutputOptionsI.H.
Referenced by VTKsurfaceFormatCore::formatOptions(), VTPsurfaceFormatCore::formatOptions(), and vtkWriter::vtkWriter().
|
inline |
Return the ASCII write precision.
Definition at line 126 of file foamVtkOutputOptionsI.H.
Referenced by VTKsurfaceFormatCore::formatOptions(), VTPsurfaceFormatCore::formatOptions(), and VTKedgeFormat::write().
Foam::vtk::outputOptions & ascii | ( | bool | on | ) |
Toggle ASCII mode on/off.
In XML append mode, this switches between base64 and raw binary. In XML inline mode, this switches between ASCII and base64. In legacy mode, this switches between ASCII and binary.
Definition at line 33 of file foamVtkOutputOptions.C.
References Foam::vtk::APPEND_BASE64, Foam::vtk::APPEND_BINARY, Foam::vtk::INLINE_ASCII, Foam::vtk::INLINE_BASE64, Foam::vtk::LEGACY_ASCII, and Foam::vtk::LEGACY_BINARY.
Foam::vtk::outputOptions & append | ( | bool | on | ) |
Toggle append mode on/off.
Definition at line 81 of file foamVtkOutputOptions.C.
References Foam::vtk::APPEND_BASE64, Foam::vtk::APPEND_BINARY, Foam::vtk::INLINE_ASCII, Foam::vtk::INLINE_BASE64, Foam::vtk::LEGACY_ASCII, and Foam::vtk::LEGACY_BINARY.
Foam::vtk::outputOptions & legacy | ( | bool | on | ) |
Toggle legacy mode on/off.
Definition at line 123 of file foamVtkOutputOptions.C.
References Foam::vtk::APPEND_BASE64, Foam::vtk::APPEND_BINARY, Foam::vtk::INLINE_ASCII, Foam::vtk::INLINE_BASE64, Foam::vtk::LEGACY_ASCII, and Foam::vtk::LEGACY_BINARY.
Foam::vtk::outputOptions & precision | ( | unsigned | prec | ) |
Set the write precision to be used for new ASCII formatters.
Definition at line 165 of file foamVtkOutputOptions.C.
Foam::string description | ( | ) | const |
A text description about the output option selected.
Definition at line 172 of file foamVtkOutputOptions.C.
References Foam::vtk::APPEND_BASE64, Foam::vtk::APPEND_BINARY, Foam::vtk::INLINE_ASCII, Foam::vtk::INLINE_BASE64, Foam::vtk::LEGACY_ASCII, and Foam::vtk::LEGACY_BINARY.