5#ifndef UNSUBSCRIBABLE_H
6#define UNSUBSCRIBABLE_H
60 template<
typename EnumType>
63 static_assert(std::is_enum_v<EnumType>,
64 "[Malena] unsubscribe — argument must be an enum value.");
82 void doUnsubscribe(
const std::string& key);
86#include "../../../src/Traits/Unsubscribable.tpp"
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.