5#ifndef MOLYBDEN_EVENT_HPP
6#define MOLYBDEN_EVENT_HPP
10#include <unordered_map>
12#include "molybden/base/internal/event_impl.hpp"
44 std::shared_ptr<Subscription>
operator+=(std::function<Signature> observer);
47 void notify(
const T& args);
50 internal::EventImpl<T> impl_;
51 friend class ObservableOwner;
56 std::function<Signature> observer) {
57 return impl_ += observer;
66void Event<T>::reset() {
Events allow you to be notified when something happens in Molybden.
Definition event.hpp:25
std::shared_ptr< Subscription > operator+=(std::function< Signature > observer)
Subscribes to receiving a notification when the event occurs.
Definition event.hpp:55
void(const T &e) Signature
The observer's signature.
Definition event.hpp:30