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);
49 internal::EventImpl<T> impl_;
50 friend class ObservableOwner;
55 std::function<Signature> observer) {
56 return impl_ += observer;
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:54
void(const T &e) Signature
The observer's signature.
Definition event.hpp:30