Public Member Functions | Private Attributes | List of all members
mcap::StreamWriter Class Referencefinal

Implements the IWritable interface used by McapWriter by wrapping a std::ostream stream. More...

#include <writer.hpp>

Inheritance diagram for mcap::StreamWriter:
Inheritance graph
[legend]

Public Member Functions

void end () override
 Called when the writer is finished writing data to the output MCAP file. More...
 
void handleWrite (const std::byte *data, uint64_t size) override
 
uint64_t size () const override
 Returns the current size of the file in bytes. This must be equal to the sum of all size parameters passed to write(). More...
 
 StreamWriter (std::ostream &stream)
 
- 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

uint64_t size_ = 0
 
std::ostream & stream_
 

Additional Inherited Members

- Public Attributes inherited from mcap::IWritable
bool crcEnabled = false
 

Detailed Description

Implements the IWritable interface used by McapWriter by wrapping a std::ostream stream.

Definition at line 174 of file writer.hpp.

Constructor & Destructor Documentation

◆ StreamWriter()

mcap::StreamWriter::StreamWriter ( std::ostream &  stream)

Member Function Documentation

◆ end()

void mcap::StreamWriter::end ( )
overridevirtual

Called when the writer is finished writing data to the output MCAP file.

Implements mcap::IWritable.

◆ handleWrite()

void mcap::StreamWriter::handleWrite ( const std::byte *  data,
uint64_t  size 
)
overridevirtual

Implements mcap::IWritable.

◆ size()

uint64_t mcap::StreamWriter::size ( ) const
overridevirtual

Returns the current size of the file in bytes. This must be equal to the sum of all size parameters passed to write().

Implements mcap::IWritable.

Member Data Documentation

◆ size_

uint64_t mcap::StreamWriter::size_ = 0
private

Definition at line 184 of file writer.hpp.

◆ stream_

std::ostream& mcap::StreamWriter::stream_
private

Definition at line 183 of file writer.hpp.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:52