Loading...
Searching...
No Matches
EventDispatcher.h
Go to the documentation of this file.
1// Copyright (c) 2025 Dave R. Smith. All rights reserved.
2// Malena Framework — Proprietary Software. See LICENSE for terms.
3
4//
5// Created by Dave Smith on 3/21/26.
6//
7
8#ifndef MALENA_EVENTDISPATCHER_H
9#define MALENA_EVENTDISPATCHER_H
11#include "Fireable.h"
12#include <optional>
13namespace ml {
14
90
92private:
94 void fire() final override{};
96 bool occurred() final override{return false;};
97
98
99public:
110 void fire(const std::optional<sf::Event> &event) override = 0;
111
123 bool occurred(const std::optional<sf::Event> &event) override = 0;
124
125
126
127};
128
129} // ml
130
131#endif //EVENTDISPATCHER_H
Base class for all per-event dispatchers in the Malena event system.
bool occurred(const std::optional< sf::Event > &event) override=0
Return true when the incoming SFML event should trigger this dispatcher.
void fire(const std::optional< sf::Event > &event) override=0
Deliver this event to all matching registered components.
#define MALENA_API
Definition Component.h:22