DUNE PDELab (git)
a factory for DataArrayWriters More...
#include <dune/grid/io/file/vtk/dataarraywriter.hh>
Public Member Functions | |
DataArrayWriterFactory (OutputType type_, std::ostream &stream_) | |
create a DataArrayWriterFactory More... | |
bool | beginAppended () |
signal start of the appended section More... | |
const std::string & | appendedEncoding () const |
query encoding string for appended data | |
DataArrayWriter * | make (const std::string &name, unsigned ncomps, unsigned nitems, const Indent &indent, Precision prec) |
create a DataArrayWriter More... | |
Detailed Description
a factory for DataArrayWriters
Some types of DataArrayWriters need to communicate data sauch as byte counts between different instances which write to the same stream. This factory will manage that data.
Constructor & Destructor Documentation
◆ DataArrayWriterFactory()
|
inline |
create a DataArrayWriterFactory
- Parameters
-
type_ Type of DataArrayWriters to create stream_ The stream that the DataArrayWriters will write to.
Better avoid having multiple active factories on the same stream at the same time. Having an inactive factory (one whose make() method is not called anymore before destruction) around at the same time as an active one should be OK however.
Member Function Documentation
◆ beginAppended()
|
inline |
signal start of the appended section
This method should be called after the main section has been written, but before the appended section has been started. After this method has been called, a call to make will produce DataArrayWriters suitable for the appended section. The return value of this method signals whether a appended section should be written at all: true means write an appended section, false means don't write an appended section. If an appended section is not needed, the method make() may not be called after a call to this method.
References Dune::VTK::appendedbase64, Dune::VTK::appendedraw, Dune::VTK::ascii, Dune::VTK::base64, and DUNE_THROW.
Referenced by Dune::VTK::VTUWriter::beginAppended().
◆ make()
|
inline |
create a DataArrayWriter
- Template Parameters
-
T Type of the data to write.
- Parameters
-
name Name of the array to write. ncomps Number of components of the vectors in to array. nitems Number of vectors in the array. indent Indentation to use. This is use as-is for the header and trailer lines, but increase by one level for the actual data. prec the precision type of the output
The should never be more than one DataArrayWriter on the same stream around. The returned object should be freed with delete.
References Dune::VTK::appendedbase64, Dune::VTK::appendedraw, Dune::VTK::ascii, Dune::VTK::base64, and DUNE_THROW.
Referenced by Dune::VTK::VTUWriter::makeArrayWriter().
The documentation for this class was generated from the following file:
- dune/grid/io/file/vtk/dataarraywriter.hh