malena
Why malena
Quick start
Tutorials
API docs
GitHub
GitHub
Tutorials
Loading...
Searching...
No Matches
Engine
Events
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
10
#include <
Malena/Core/malena_export.h
>
11
#include <
Malena/Engine/Events/Fireable.h
>
12
#include <optional>
13
14
namespace
ml
{
15
89
class
MALENA_API
FrameDispatcher
:
public
Fireable
{
90
public
:
91
FrameDispatcher
() :
Fireable
(DispatchType::FRAME) {}
92
102
bool
occurred
()
override
= 0;
103
111
void
fire
()
override
= 0;
112
113
private
:
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
Fireable.h
ml::Fireable
Definition
Fireable.h:58
ml::FrameDispatcher::fire
void fire() override=0
Deliver the per-frame callback to all matching components.
ml::FrameDispatcher::occurred
bool occurred() override=0
Return true when this dispatcher should fire this frame.
ml::FrameDispatcher::FrameDispatcher
FrameDispatcher()
Definition
FrameDispatcher.h:91
malena_export.h
MALENA_API
#define MALENA_API
Definition
malena_export.h:18
ml
Definition
Component.h:22