struct RecordOffset

Declaration

struct RecordOffset { /* full declaration omitted */ };

Description

The position of a record in an MCAP file. A record inside a chunk is identified by its offset within the decompressed chunk contents together with the file offset of the chunk record; a record outside any chunk is identified by its file offset alone.

RecordOffsets are totally ordered by position in the file. Records are ordered by the file offset of the chunk that contains them (or their own file offset when not chunked); a plain file offset that names the start of a chunk sorts before every record inside that chunk; and records in the same chunk are ordered by their offset within it.

Declared at: mcap/include/mcap/types.hpp:365

Member Variables

public mcap::ByteOffset offset
public std::optional<ByteOffset> chunkOffset

Method Overview

Methods

RecordOffset()

Declared at: mcap/include/mcap/types.hpp:369

RecordOffset(mcap::ByteOffset offset_)

Declared at: mcap/include/mcap/types.hpp:370

Parameters

mcap::ByteOffset offset_

RecordOffset(mcap::ByteOffset offset_,
             mcap::ByteOffset chunkOffset_)

Declared at: mcap/include/mcap/types.hpp:372

Parameters

mcap::ByteOffset offset_
mcap::ByteOffset chunkOffset_

int compare(const mcap::RecordOffset& other) const

Description

Three-way comparison: negative if this record precedes `other` in the file, zero if they name the same record, positive if this record follows `other`.

Declared at: mcap/include/mcap/types.hpp:380

Parameters

const mcap::RecordOffset& other