Skip to content

C++: Replace the many parameters of rerun::spawn with a struct #4142

@kyle-figure

Description

@kyle-figure

Describe the annoyance
Overriding one default parameter in RecordingStream::spawn requires passing in all previous parameters:

// Spawn viewer with flush timeout of 10 seconds:
rec->spawn(9876, "75%", "rerun", std::nullopt, 10.0F).exit_on_failure();

Expected behavior
Be able to override a single default parameter without providing all previous default values.

Your goals
It would be nice to define the configs in a struct with defaults and pass it into the function that way. With this, we would be able to do:

// Spawn viewer with flush timeout of 10 seconds:
rec->spawn({.flush_timeout_sec=10.0}).exit_on_failure();

Desktop (please complete the following information):

  • OS: Ubuntu 22.04 x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    sdk-cppC/C++ API specific🏎️ Quick IssueCan be fixed in a few hours or less😤 annoyingSomething in the UI / SDK is annoying to use

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions