Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::timeline::ClipContentCases< Fs > Struct Template Reference

Overload set for visiting a ClipContent with no generic fallback. More...

#include <clip.hpp>

Detailed Description

template<class... Fs>
struct pulp::timeline::ClipContentCases< Fs >

Overload set for visiting a ClipContent with no generic fallback.

What a clip is decides whether it renders audio, contributes notes, owns ItemIds that must be remapped, or survives a save. Every one of those decisions is a per-alternative dispatch, and none of them has a defensible default: a content kind nobody wrote a branch for is not "nothing", it is a clip whose data was dropped. Consumers that dispatch through a generic lambda ([](const auto&), or an if/if constexpr chain that falls through) keep compiling when the variant grows and then quietly treat the new alternative as absent — a clip that renders silence, an export manifest that reports no loss while losing data, a remap that leaves stale ItemIds behind. Visiting through this type makes a new alternative a compile error at every call site until someone decides what it means.

std::visit(ClipContentCases{
               [&](const EmptyContent&) { ... },
               [&](const MediaRef& media) { ... },
               [&](const MidiContent& notes) { ... },
               [&](const RegisteredContent& registered) { ... },
               [&](const OpaqueContent& opaque) { ... },
           },
           clip.content()); 

The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/timeline/include/pulp/timeline/clip.hpp