Dune Core Modules (2.5.0)

Dune::VTK::DataArrayWriter< T > Class Template Referenceabstract

base class for data array writers More...

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

Public Member Functions

virtual void write (T data)=0
 write one data element
 
virtual bool writeIsNoop () const
 whether calls to write may be skipped
 
virtual ~DataArrayWriter ()
 virtual destructor
 

Detailed Description

template<class T>
class Dune::VTK::DataArrayWriter< T >

base class for data array writers

Template Parameters
TType of the data elements to write

This is an abstract 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>".


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 23, 23:29, 2024)