VRS
A file format for sensor data.
Loading...
Searching...
No Matches
vrs::DirectWriteRecordData Class Referenceabstract

Class to hold data that is written directly in the file at the end of a record. Record data held by DataSource is copied in an internal buffer when the record is created, so it might be compressed, and the source buffers, including datalayouts, reused/modified, without risk of corrupting the record's data, at the expense of a memory copy. By using DirectWriteRecordData, you can avoid that copy, with the following limitations: More...

#include <DataSource.h>

Public Member Functions

virtual size_t getDataSize () const =0
 Get the total amount of data that will be written to disk. This value may not change.
virtual int write (WriteFileHandler &file) const =0

Detailed Description

Class to hold data that is written directly in the file at the end of a record. Record data held by DataSource is copied in an internal buffer when the record is created, so it might be compressed, and the source buffers, including datalayouts, reused/modified, without risk of corrupting the record's data, at the expense of a memory copy. By using DirectWriteRecordData, you can avoid that copy, with the following limitations:

  • that data is written at the end of the record, after the data provided using a DataSource object. If you want to assemble your DataContentBlocks differently, you need to own that logic.
  • none of record's data can be compressed by VRS, leading to potentially much larger files.

Member Function Documentation

◆ write()

virtual int vrs::DirectWriteRecordData::write ( WriteFileHandler & file) const
pure virtual
Parameters
fileFile to write the data to.

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