载入中...
搜索中...
未找到
Event.cpp
浏览该文件的文档.
10Message::Message(const std::string& name, const std::vector<Variant>& vargs) : name(name), args(vargs) {}
EVEngine assertion entry point, backed by zeroerr.
#define EV_PARAM_CHECK(cond,...)
Validate a function parameter / public API precondition.
Definition Assert.h:30
virtual std::string getName() const =0
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
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
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
Message(const std::string &name, const std::vector< Variant > &vargs={})
Creates an event message.
Definition Event.cpp:10
Definition Event.h:12
Definition Event.cpp:8
static Variant makeString(std::string v)
Constructs a string variant (takes ownership of the value).
Definition Event.h:36