8#ifndef MALENA_UNSUBSCRIBABLE_H
9#define MALENA_UNSUBSCRIBABLE_H
64 template<
typename EnumType>
67 static_assert(std::is_enum_v<EnumType>,
68 "[Malena] unsubscribe — argument must be an enum value.");
86 void doUnsubscribe(
const std::string& key);
Trait that gives components the ability to unsubscribe from events.
void unsubscribe(EnumType event)
Unsubscribe from a single event by enum value.
void unsubscribeAll()
Remove all event subscriptions for this component.
virtual ~Unsubscribable()=default
static std::string get(EnumType value)
Generate a unique string key for an enum value.