dune-grid 2.9.0
Public Member Functions | List of all members
Dune::VTK::DataArrayWriter Class Referenceabstract

base class for data array writers More...

#include <dune/grid/io/file/vtk/dataarraywriter.hh>

Inheritance diagram for Dune::VTK::DataArrayWriter:
Inheritance graph

Public Member Functions

 DataArrayWriter (Precision _prec)
 construct a data array writer More...
 
template<class T >
void write (T data)
 write one element of data More...
 
virtual bool writeIsNoop () const
 whether calls to write may be skipped More...
 
virtual ~DataArrayWriter ()
 virtual destructor More...
 

Detailed Description

base class for data array writers

This is the base class; for an actual implementation look at VTKAsciiDataArrayWriter, VTKBinaryDataArrayWriter, or VTKBinaryAppendedDataArrayWriter.

To create an actual DataArrayWriter, one would usually use an object of class DataArrayWriterFactory.

In the constructor, the actual writer implementation will prepare the stream for writing the data. This usually means writing a "<DataArray>" header to the stream. In the write() method it will write a data element to the stream (this is not true for binaryappended mode however: in this mode write just counts the number of bytes that would be written, the actual writing has to happen later independent of the writer). Finally, in the destructor, the stream is put back in a sane state. That usually means writing something line "</DataArray>".

Constructor & Destructor Documentation

◆ DataArrayWriter()

Dune::VTK::DataArrayWriter::DataArrayWriter ( Precision  _prec)
inline

construct a data array writer

construct a data array writer

Parameters
precthe precision type with which to write the data

◆ ~DataArrayWriter()

virtual Dune::VTK::DataArrayWriter::~DataArrayWriter ( )
inlinevirtual

virtual destructor

Member Function Documentation

◆ write()

template<class T >
void Dune::VTK::DataArrayWriter::write ( data)
inline

write one element of data

◆ writeIsNoop()

virtual bool Dune::VTK::DataArrayWriter::writeIsNoop ( ) const
inlinevirtual

whether calls to write may be skipped

Reimplemented in Dune::VTK::AppendedRawDataArrayWriter, and Dune::VTK::AppendedBase64DataArrayWriter.


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