Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
AotDispatcher.hpp File Reference

A loaded module's systems, bound once and callable by index. More...

#include <cstdint>
#include <optional>
#include <span>
#include <string>
#include <utility>
#include <vector>
#include "esengine/aot/AotHost.hpp"
#include "esengine/aot/AotModule.hpp"
Include dependency graph for AotDispatcher.hpp:

Go to the source code of this file.

Classes

class  esengine::aot::Dispatcher

Namespaces

namespace  esengine
namespace  esengine::aot

Detailed Description

A loaded module's systems, bound once and callable by index.

AotModule says what a module is and AotHost says how one call goes; between them sits the thing a host actually holds for a frame — the open module, the arena its calls reuse, and each system resolved against this world once instead of per call.

Index, not name. The scheduler asks for the same system every frame and a name lookup there is a strcmp per system per frame on the path AOT exists to make cheap; a caller resolves the index at install.

The lookups are the CALLER's, because who can name a component differs by host: engine components come from the generated table, and a project's own live in the pool the scripting language owns.

Commands come back rather than being applied. A despawn invalidates the rows just handed over, so who applies them decides when — and this class does not know how to remove a component by name anyway.

One arena PER SYSTEM, not one shared: a shared one is overwritten by the next system and nothing can be kept across frames.

Definition in file AotDispatcher.hpp.