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

Implements the IWritable interface used by McapWriter by wrapping a FILE* pointer created by fopen(). More...

#include <writer.hpp>

Inheritance diagram for mcap::FileWriter:
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
 
Status open (std::string_view filename)
 
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...
 
 ~FileWriter () override
 
- 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::FILE * file_ = nullptr
 
uint64_t size_ = 0
 

Additional Inherited Members

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

Detailed Description

Implements the IWritable interface used by McapWriter by wrapping a FILE* pointer created by fopen().

Definition at line 155 of file writer.hpp.

Constructor & Destructor Documentation

◆ ~FileWriter()

mcap::FileWriter::~FileWriter ( )
override

Member Function Documentation

◆ end()

void mcap::FileWriter::end ( )
overridevirtual

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

Implements mcap::IWritable.

◆ handleWrite()

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

Implements mcap::IWritable.

◆ open()

Status mcap::FileWriter::open ( std::string_view  filename)

◆ size()

uint64_t mcap::FileWriter::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

◆ file_

std::FILE* mcap::FileWriter::file_ = nullptr
private

Definition at line 166 of file writer.hpp.

◆ size_

uint64_t mcap::FileWriter::size_ = 0
private

Definition at line 167 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