Class IWritable
Defined in File writer.hpp
Inheritance Relationships
Derived Types
public mcap::FileWriter(Class FileWriter)public mcap::IChunkWriter(Class IChunkWriter)public mcap::StreamWriter(Class StreamWriter)
Class Documentation
-
class IWritable
An abstract interface for writing MCAP data.
Subclassed by mcap::FileWriter, mcap::IChunkWriter, mcap::StreamWriter
Public Functions
-
IWritable() noexcept
-
virtual ~IWritable() = default
-
void write(const std::byte *data, uint64_t size)
Called whenever the writer needs to write data to the output MCAP file.
- Parameters:
data – A pointer to the data to write.
size – Size of the data in bytes.
-
virtual void end() = 0
Called when the writer is finished writing data to the output MCAP file.
-
virtual uint64_t size() const = 0
Returns the current size of the file in bytes. This must be equal to the sum of all
sizeparameters passed towrite().
-
uint32_t crc()
Returns the CRC32 of the uncompressed data.
-
void resetCrc()
Resets the CRC32 calculation.
Public Members
-
bool crcEnabled = false
Protected Functions
-
virtual void handleWrite(const std::byte *data, uint64_t size) = 0
-
IWritable() noexcept