8#ifndef MALENA_UNSUBSCRIBABLE_H
9#define MALENA_UNSUBSCRIBABLE_H
65 template<
typename EnumType>
68 static_assert(std::is_enum_v<EnumType>,
69 "[Malena] unsubscribe — argument must be an enum value.");
87 void doUnsubscribe(
const std::string& key);
99 Core* _selfCore =
nullptr;
Virtual base class for all Malena framework objects.
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.