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 () | |
Default construct - XML insitu ASCII format with default precision. More... | |
outputOptions (enum vtk::formatType fmtType) | |
Construct with specified format and default (ASCII) precision. More... | |
outputOptions (enum vtk::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... | |
vtk::formatType | fmt () const noexcept |
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 noexcept |
True if writer uses legacy file format. More... | |
bool | xml () const noexcept |
True if writer uses XML file format (non-legacy) More... | |
bool | append () const noexcept |
True if output format uses an append mode. More... | |
bool | insitu () const noexcept |
True if output format does not use an append mode. More... | |
bool | ascii () const noexcept |
True if output format is ASCII. More... | |
unsigned | precision () const noexcept |
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 55 of file foamVtkOutputOptions.H.
|
inline |
Default construct - XML insitu ASCII format with default precision.
Definition at line 23 of file foamVtkOutputOptionsI.H.
References Foam::vtk::INLINE_ASCII.
|
inline |
Construct with specified format and default (ASCII) precision.
Definition at line 31 of file foamVtkOutputOptionsI.H.
|
inline |
Construct with specified format and (ASCII) write precision.
Definition at line 41 of file foamVtkOutputOptionsI.H.
|
inline |
Return new formatter based on the selected output options.
Definition at line 54 of file foamVtkOutputOptionsI.H.
References Foam::vtk::newFormatter(), and os().
Referenced by VTKsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), and Foam::vtk::writePointSet().
|
inlinenoexcept |
The output format type.
Definition at line 62 of file foamVtkOutputOptionsI.H.
Referenced by vtkWriter::vtkWriter().
|
inline |
The file extension (legacy or xml) for the given content-type.
Definition at line 68 of file foamVtkOutputOptionsI.H.
References Foam::vtk::fileExtension, and Foam::vtk::legacy::fileExtension.
Referenced by patchMeshWriter::ext(), internalMeshWriter::ext(), and polyWriter::ext().
|
inlinenoexcept |
True if writer uses legacy file format.
Definition at line 79 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().
|
inlinenoexcept |
True if writer uses XML file format (non-legacy)
Definition at line 89 of file foamVtkOutputOptionsI.H.
|
inlinenoexcept |
True if output format uses an append mode.
Definition at line 95 of file foamVtkOutputOptionsI.H.
References Foam::vtk::APPEND_BASE64, and Foam::vtk::APPEND_BINARY.
Referenced by VTKsurfaceFormatCore::formatOptions(), VTPsurfaceFormatCore::formatOptions(), and Foam::vtk::writePointSet().
|
inlinenoexcept |
True if output format does not use an append mode.
Definition at line 105 of file foamVtkOutputOptionsI.H.
References append().
|
inlinenoexcept |
True if output format is ASCII.
Definition at line 111 of file foamVtkOutputOptionsI.H.
Referenced by VTKsurfaceFormatCore::formatOptions(), VTPsurfaceFormatCore::formatOptions(), and vtkWriter::vtkWriter().
|
inlinenoexcept |
Return the ASCII write precision.
Definition at line 117 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 26 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 74 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 116 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 158 of file foamVtkOutputOptions.C.
Foam::string description | ( | ) | const |
A text description about the output option selected.
Definition at line 165 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.