class FileWriter

Declaration

class FileWriter : public IWritable { /* full declaration omitted */ };

Description

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

Declared at: mcap/include/mcap/writer.hpp:157

Inherits from: IWritable

Member Variables

Inherited from IWritable:

public crcEnabled = false

Method Overview

  • public void end()
  • public void handleWrite(const std::byte * data, uint64_t size)
  • public mcap::Status open(std::string_view filename)
  • public uint64_t size() const
  • public ~FileWriter()

Inherited from IWritable:

Methods

void end()

Description

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

Declared at: mcap/include/mcap/writer.hpp:164

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

Declared at: mcap/include/mcap/writer.hpp:163

Parameters

const std::byte* data
uint64_t size

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

Declared at: mcap/include/mcap/writer.hpp:161

Parameters

std::string_view filename

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:165

~FileWriter()

Declared at: mcap/include/mcap/writer.hpp:159