Authoritative subscription registry on the responder side. More...
#include <midi_ci_pe.hpp>
Public Member Functions | |
| std::string | subscribe (std::string_view resource, MUID subscriber) |
| NOT RT-safe — allocates a new PeSubscription (two std::strings), pushes onto subs_, and builds the returned subscription id via std::to_string. | |
| bool | unsubscribe (std::string_view subscription_id) |
| NOT RT-safe — linear scan + std::vector::erase. | |
| std::vector< PeSubscription > | subscribers_of (std::string_view resource) const |
| NOT RT-safe — allocates the result std::vector<PeSubscription>, even when the call ends up empty (the return value still owns a 0-capacity vector header). | |
| const std::vector< PeSubscription > & | all () const |
| Non-owning live view of the registry. | |
Authoritative subscription registry on the responder side.
Lifecycle:
RT-safety contract: every mutating method allocates; subscribers_of() allocates a fresh result vector even when nothing matches. Drive the manager from the same non-RT thread that drives PE message dispatch.
|
inline |
Non-owning live view of the registry.
No allocation, but not RT-safe: callers must use it from the same non-audio thread that owns subscription mutation.
| std::string pulp::midi::PeSubscriptionManager::subscribe | ( | std::string_view | resource, |
| MUID | subscriber ) |
NOT RT-safe — allocates a new PeSubscription (two std::strings), pushes onto subs_, and builds the returned subscription id via std::to_string.
| std::vector< PeSubscription > pulp::midi::PeSubscriptionManager::subscribers_of | ( | std::string_view | resource | ) | const |
NOT RT-safe — allocates the result std::vector<PeSubscription>, even when the call ends up empty (the return value still owns a 0-capacity vector header).
Use it from the same non-audio thread that drives PE message dispatch.
| bool pulp::midi::PeSubscriptionManager::unsubscribe | ( | std::string_view | subscription_id | ) |
NOT RT-safe — linear scan + std::vector::erase.