class IWritable
Declaration
class IWritable { /* full declaration omitted */ };
Description
An abstract interface for writing MCAP data.
Declared at: mcap/include/mcap/writer.hpp:112
Member Variables
- public bool crcEnabled = false
Method Overview
- public IWritable() noexcept
- public uint32_t crc()
- public virtual void end()
- public virtual void flush()
- protected virtual void handleWrite(const std::byte * data, uint64_t size)
- public void resetCrc()
- public virtual uint64_t size() const
- public void write(const std::byte * data, uint64_t size)
- public virtual ~IWritable()
Methods
¶IWritable() noexcept
IWritable() noexcept
Declared at: mcap/include/mcap/writer.hpp:116
¶uint32_t crc()
uint32_t crc()
Description
Returns the CRC32 of the uncompressed data.
Declared at: mcap/include/mcap/writer.hpp:140
¶virtual void end()
virtual void end()
Description
Called when the writer is finished writing data to the output MCAP file.
Declared at: mcap/include/mcap/writer.hpp:131
¶virtual void flush()
virtual void flush()
Description
flushes any buffered data to the output. This is called by McapWriter after every completed chunk. Callers may also retain a reference to the writer and call flush() at their own cadence. Defaults to a no-op.
Declared at: mcap/include/mcap/writer.hpp:151
¶virtual void handleWrite(const std::byte* data,
uint64_t size)
virtual void handleWrite(const std::byte* data,
uint64_t size)
Declared at: mcap/include/mcap/writer.hpp:154
Parameters
- const std::byte* data
- uint64_t size
¶void resetCrc()
void resetCrc()
Description
Resets the CRC32 calculation.
Declared at: mcap/include/mcap/writer.hpp:144
¶virtual uint64_t size() const
virtual uint64_t size() const
Description
Returns the current size of the file in bytes. This must be equal to the sum of all `size` parameters passed to `write()`.
Declared at: mcap/include/mcap/writer.hpp:136
¶void write(const std::byte* data, uint64_t size)
void write(const std::byte* data, uint64_t size)
Description
Called whenever the writer needs to write data to the output MCAP file.
Declared at: mcap/include/mcap/writer.hpp:126
Parameters
- const std::byte* data
- A pointer to the data to write.
- uint64_t size
- Size of the data in bytes.
¶virtual ~IWritable()
virtual ~IWritable()
Declared at: mcap/include/mcap/writer.hpp:117