|
Peano
|
Read a Peano patch file with binary quantities. More...
#include <PeanoBinaryPatchFileReader.h>


Protected Member Functions | |
| void | readValues (std::istream &in, int numberOfValues, std::vector< double > &values) const override |
| Read the quantities of one patch. | |
| Format | getFormat () const override |
| Format this reader supports. | |
Additional Inherited Members | |
Public Types inherited from tarch::reader::PeanoTextPatchFileReader | |
| enum class | Format { ASCII , Binary } |
Public Member Functions inherited from tarch::reader::PeanoTextPatchFileReader | |
| virtual | ~PeanoTextPatchFileReader ()=default |
| Content | read (const std::string &fileName) const |
| Read the whole file. | |
Static Public Member Functions inherited from tarch::reader::PeanoTextPatchFileReader | |
| static Header | readHeader (const std::string &fileName) |
| Read only the header of a file. | |
Read a Peano patch file with binary quantities.
Counterpart of tarch::plotter::griddata::blockstructured::PeanoBinaryPatchFileWriter. All lines of the file are text as in a file with format ASCII. Only the line between begin cell-values and end cell-values is replaced by the raw doubles of the patch followed by one line break. The reader therefore knows how many bytes to read from the metadata and the dimensions, and the bytes may hold any value, including line breaks.
The doubles are stored in the byte order of the machine that wrote them. The reader assumes that it runs on a machine with the same byte order.
Definition at line 28 of file PeanoBinaryPatchFileReader.h.
|
overrideprotectedvirtual |
Format this reader supports.
Reimplemented from tarch::reader::PeanoTextPatchFileReader.
|
overrideprotectedvirtual |
Read the quantities of one patch.
The routine is called after the line begin cell-values has been read. It has to leave the stream such that the next line to be read is the line end cell-values.
| in | Stream of the file, opened in binary mode. |
| numberOfValues | Number of doubles the patch holds. Derived from the cell metadata and the dimensions. |
| values | Output. Is cleared first. |
Reimplemented from tarch::reader::PeanoTextPatchFileReader.