Loading...
Searching...
No Matches
outputOptions Class Reference

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...

#include <foamVtkOutputOptions.H>

Public Member Functions

 outputOptions () noexcept
 Default construct - XML insitu ASCII format with default precision.
 outputOptions (vtk::formatType fmtType) noexcept
 Construct with specified format and default (ASCII) precision.
 outputOptions (vtk::formatType fmtType, unsigned prec) noexcept
 Construct with specified format and (ASCII) write precision.
autoPtr< formatternewFormatter (std::ostream &os) const
 Return new formatter based on the selected output options.
vtk::formatType fmt () const noexcept
 The output format type.
const wordext (vtk::fileTag contentType) const
 The file extension (legacy or xml) for the given content-type.
bool legacy () const noexcept
 True if writer uses legacy file format.
bool xml () const noexcept
 True if writer uses XML file format (non-legacy).
bool is_hdf () const noexcept
 True if HDF file format was requested [ADVANCED USAGE].
bool append () const noexcept
 True if output format uses an append mode.
bool insitu () const noexcept
 True if output format does not use an append mode.
bool ascii () const noexcept
 True if output format is ASCII.
unsigned precision () const noexcept
 Return the ASCII write precision.
outputOptionsascii (bool on) noexcept
 Toggle ASCII mode on/off.
outputOptionsappend (bool on) noexcept
 Toggle append mode on/off.
outputOptionslegacy (bool on) noexcept
 Toggle legacy mode on/off.
outputOptionsprecision (unsigned prec) noexcept
 Set the write precision to be used for new ASCII formatters.
std::string description () const
 A text description about the output option selected.

Detailed Description

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.

Source files

Definition at line 54 of file foamVtkOutputOptions.H.

Constructor & Destructor Documentation

◆ outputOptions() [1/3]

outputOptions ( )
inlinenoexcept

Default construct - XML insitu ASCII format with default precision.

Definition at line 23 of file foamVtkOutputOptionsI.H.

References Foam::noexcept.

Referenced by append(), ascii(), legacy(), and precision().

Here is the caller graph for this function:

◆ outputOptions() [2/3]

outputOptions ( vtk::formatType fmtType)
inlinenoexcept

Construct with specified format and default (ASCII) precision.

Note
This constructor should remain non-explicit.

Definition at line 30 of file foamVtkOutputOptionsI.H.

References IOstream::defaultPrecision(), and Foam::noexcept.

Here is the call graph for this function:

◆ outputOptions() [3/3]

outputOptions ( vtk::formatType fmtType,
unsigned prec )
inlinenoexcept

Construct with specified format and (ASCII) write precision.

Definition at line 40 of file foamVtkOutputOptionsI.H.

References Foam::noexcept.

Member Function Documentation

◆ newFormatter()

Foam::autoPtr< Foam::vtk::formatter > newFormatter ( std::ostream & os) const
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(), VTKsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), and VTPsurfaceFormat< Face >::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fmt()

Foam::vtk::formatType fmt ( ) const
inlinenoexcept

The output format type.

Definition at line 62 of file foamVtkOutputOptionsI.H.

References Foam::noexcept.

Referenced by vtkWriter::vtkWriter().

Here is the caller graph for this function:

◆ ext()

const Foam::word & ext ( vtk::fileTag contentType) const
inline

The file extension (legacy or xml) for the given content-type.

Definition at line 69 of file foamVtkOutputOptionsI.H.

References Foam::vtk::fileExtension, Foam::vtk::legacy::fileExtension, and legacy().

Here is the call graph for this function:

◆ legacy() [1/2]

bool legacy ( ) const
inlinenoexcept

True if writer uses legacy file format.

Definition at line 86 of file foamVtkOutputOptionsI.H.

References Foam::vtk::LEGACY_ASCII, Foam::vtk::LEGACY_BINARY, and Foam::noexcept.

Referenced by ext(), VTKsurfaceFormatCore::formatOptions(), VTPsurfaceFormatCore::formatOptions(), vtkWriter::vtkWriter(), and xml().

Here is the caller graph for this function:

◆ xml()

bool xml ( ) const
inlinenoexcept

True if writer uses XML file format (non-legacy).

Definition at line 96 of file foamVtkOutputOptionsI.H.

References is_hdf(), legacy(), and Foam::noexcept.

Here is the call graph for this function:

◆ is_hdf()

bool is_hdf ( ) const
inlinenoexcept

True if HDF file format was requested [ADVANCED USAGE].

Definition at line 80 of file foamVtkOutputOptionsI.H.

References Foam::vtk::HDF_FORMAT, and Foam::noexcept.

Referenced by xml().

Here is the caller graph for this function:

◆ append() [1/2]

bool append ( ) const
inlinenoexcept

True if output format uses an append mode.

Definition at line 102 of file foamVtkOutputOptionsI.H.

References Foam::vtk::APPEND_BASE64, Foam::vtk::APPEND_BINARY, and Foam::noexcept.

Referenced by VTKsurfaceFormatCore::formatOptions(), and VTPsurfaceFormatCore::formatOptions().

Here is the caller graph for this function:

◆ insitu()

bool insitu ( ) const
inlinenoexcept

True if output format does not use an append mode.

Definition at line 112 of file foamVtkOutputOptionsI.H.

References append(), and Foam::noexcept.

Here is the call graph for this function:

◆ ascii() [1/2]

bool ascii ( ) const
inlinenoexcept

True if output format is ASCII.

Definition at line 118 of file foamVtkOutputOptionsI.H.

References Foam::noexcept.

Referenced by VTKsurfaceFormatCore::formatOptions(), VTPsurfaceFormatCore::formatOptions(), and vtkWriter::vtkWriter().

Here is the caller graph for this function:

◆ precision() [1/2]

unsigned precision ( ) const
inlinenoexcept

Return the ASCII write precision.

Definition at line 124 of file foamVtkOutputOptionsI.H.

References Foam::noexcept.

Referenced by VTKsurfaceFormatCore::formatOptions(), VTPsurfaceFormatCore::formatOptions(), and VTKedgeFormat::write().

Here is the caller graph for this function:

◆ ascii() [2/2]

outputOptions & ascii ( bool on)
noexcept

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.

Returns
outputOptions for chaining

References outputOptions().

Here is the call graph for this function:

◆ append() [2/2]

outputOptions & append ( bool on)
noexcept

Toggle append mode on/off.

Returns
outputOptions for chaining

References outputOptions().

Here is the call graph for this function:

◆ legacy() [2/2]

outputOptions & legacy ( bool on)
noexcept

Toggle legacy mode on/off.

Returns
outputOptions for chaining

References outputOptions().

Here is the call graph for this function:

◆ precision() [2/2]

outputOptions & precision ( unsigned prec)
noexcept

Set the write precision to be used for new ASCII formatters.

Returns
outputOptions for chaining

References outputOptions().

Here is the call graph for this function:

◆ description()

std::string description ( ) const

A text description about the output option selected.


The documentation for this class was generated from the following files: