载入中...
搜索中...
未找到
Event.h
浏览该文件的文档.
Definition Module.h:43
Definition Event.h:70
void push(Message *msg)
Queues a message. Thread-safe: workers may push completions for the main loop to poll.
Definition Event.cpp:31
virtual void wakeWaiters()
Wake a platform-specific blocking wait after a message is queued.
Definition Event.h:107
virtual void pump()=0
Platform hook: pumps the native event queue into this module.
std::string pollName()
Script helper: pops one message and returns its name, or "" if none.
Definition Event.cpp:58
Module_REG(Event)
void pushData(std::string name, std::string data="")
Script helper: pushes an event with an optional string payload.
Definition Event.cpp:42
std::string pollData()
Pops one message and returns its first string arg (or ""). Name is discarded — use pollName when you ...
Definition Event.cpp:76
std::string getLastData() const
First string arg of the message most recently returned by pollName/pollData.
Definition Event.cpp:74
virtual Message * wait()=0
Platform hook: blocks until a message is available, then polls it.
Message * poll()
Pops the oldest message, or nullptr if the queue is empty (caller must delete).
Definition Event.cpp:49
A named event carrying an ordered list of Variant payloads. Pushed messages are heap-allocated; the q...
Definition Event.h:56
Definition Build.cpp:11
EVEngine ECS 集成层:底层实现使用 sunxfancy/ECS.hpp https://github.com/sunxfancy/ECS.hpp
Definition ECS.h:12
Definition Event.h:19
static Variant makePtr(void *v)
Constructs a pointer variant (borrowed, not owned).
Definition Event.h:43
static Variant makeString(std::string v)
Constructs a string variant (takes ownership of the value).
Definition Event.h:36