dune-grid 2.9.0
|
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 More... | |
DataArrayWriter * | make (const std::string &name, unsigned ncomps, unsigned nitems, const Indent &indent, Precision prec) |
create a DataArrayWriter More... | |
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.
|
inline |
create a DataArrayWriterFactory
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.
|
inline |
query encoding string for appended data
|
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.
|
inline |
create a DataArrayWriter
T | Type of the data to write. |
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.