le2d v0.4.7
2D game engine framework
 
Loading...
Searching...
No Matches
junction.hpp
Go to the documentation of this file.
1#pragma once
4#include <span>
5
6namespace le::console {
8class Junction {
9 public:
12 explicit Junction(gsl::not_null<ITerminal*> terminal, gsl::not_null<input::Router*> router) : m_terminal(terminal), m_router(router) {}
13
16 void dispatch(std::span<Event const> events, glm::ivec2 framebuffer_size) const;
17
18 private:
19 gsl::not_null<ITerminal*> m_terminal;
20 gsl::not_null<input::Router*> m_router;
21};
22} // namespace le::console
Dispatch events to terminal if active else to input router.
Definition junction.hpp:8
Junction(gsl::not_null< ITerminal * > terminal, gsl::not_null< input::Router * > router)
Definition junction.hpp:12
void dispatch(std::span< Event const > events, glm::ivec2 framebuffer_size) const
Definition junction.hpp:6