class StreamWriter
Declaration
class StreamWriter : public IWritable { /* full declaration omitted */ };
Description
Implements the IWritable interface used by McapWriter by wrapping a std::ostream stream.
Declared at: mcap/include/mcap/writer.hpp:176
Inherits from: IWritable
Member Variables
Inherited from IWritable:
- public crcEnabled = false
Method Overview
- public StreamWriter(std::ostream & stream)
- public void end()
- public void handleWrite(const std::byte * data, uint64_t size)
- public uint64_t size() const
Inherited from IWritable:
Methods
¶StreamWriter(std::ostream& stream)
StreamWriter(std::ostream& stream)
Declared at: mcap/include/mcap/writer.hpp:178
Parameters
- std::ostream& stream
¶void end()
void end()
Description
Called when the writer is finished writing data to the output MCAP file.
Declared at: mcap/include/mcap/writer.hpp:181
¶void handleWrite(const std::byte* data,
uint64_t size)
void handleWrite(const std::byte* data,
uint64_t size)
Declared at: mcap/include/mcap/writer.hpp:180
Parameters
- const std::byte* data
- uint64_t size
¶uint64_t size() const
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:182