Loading...
Searching...
No Matches
FrameDispatcher.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/22/26.
6//
7
8#ifndef MALENA_FRAMEDISPATCHER_H
9#define MALENA_FRAMEDISPATCHER_H
12#include <optional>
13
14namespace ml {
15
90public:
91 FrameDispatcher() : Fireable(DispatchType::FRAME) {}
92
102 bool occurred() override = 0;
103
111 void fire() override = 0;
112
113private:
115 void fire(const std::optional<sf::Event>& event) final override {}
117 bool occurred(const std::optional<sf::Event>& event) final override { return false; }
118};
119
120} // namespace ml
121
122
123
124#endif //FRAMEDISPATCHER_H
void fire() override=0
Deliver the per-frame callback to all matching components.
bool occurred() override=0
Return true when this dispatcher should fire this frame.
#define MALENA_API
Definition Component.h:22