An in-memory IChunkWriter implementation backed by a growable buffer. More...
#include <writer.hpp>
Public Member Functions | |
const std::byte * | compressedData () const override |
Returns a pointer to the compressed data. This will only be called after end() . More... | |
uint64_t | compressedSize () const override |
Returns the size in bytes of the compressed data. This will only be called after end() . More... | |
const std::byte * | data () const override |
Returns a pointer to the uncompressed data. More... | |
bool | empty () const override |
Returns true if write() has never been called since initialization or the last call to clear() . More... | |
void | end () override |
Called when the writer wants to close the current output Chunk. After this call, data() and size() should return the data and size of the compressed data. More... | |
void | handleClear () override |
void | handleWrite (const std::byte *data, uint64_t size) override |
uint64_t | size () const override |
Returns the size in bytes of the uncompressed data. More... | |
Public Member Functions inherited from mcap::IChunkWriter | |
void | clear () |
Clear the internal state of the writer, discarding any input or output buffers. More... | |
virtual | ~IChunkWriter () override=default |
Public Member Functions inherited from mcap::IWritable | |
uint32_t | crc () |
Returns the CRC32 of the uncompressed data. More... | |
IWritable () noexcept | |
void | resetCrc () |
Resets the CRC32 calculation. More... | |
void | write (const std::byte *data, uint64_t size) |
Called whenever the writer needs to write data to the output MCAP file. More... | |
virtual | ~IWritable ()=default |
Private Attributes | |
std::vector< std::byte > | buffer_ |
Additional Inherited Members | |
Public Attributes inherited from mcap::IWritable | |
bool | crcEnabled = false |
An in-memory IChunkWriter implementation backed by a growable buffer.
Definition at line 239 of file writer.hpp.
|
overridevirtual |
Returns a pointer to the compressed data. This will only be called after end()
.
Implements mcap::IChunkWriter.
|
overridevirtual |
Returns the size in bytes of the compressed data. This will only be called after end()
.
Implements mcap::IChunkWriter.
|
overridevirtual |
Returns a pointer to the uncompressed data.
Implements mcap::IChunkWriter.
|
overridevirtual |
Returns true if write()
has never been called since initialization or the last call to clear()
.
Implements mcap::IChunkWriter.
|
overridevirtual |
Called when the writer wants to close the current output Chunk. After this call, data()
and size()
should return the data and size of the compressed data.
Implements mcap::IChunkWriter.
|
overridevirtual |
Implements mcap::IChunkWriter.
|
overridevirtual |
Implements mcap::IWritable.
|
overridevirtual |
Returns the size in bytes of the uncompressed data.
Implements mcap::IChunkWriter.
|
private |
Definition at line 251 of file writer.hpp.