载入中...
搜索中...
未找到
ScenarioRecorder.cpp
浏览该文件的文档.
23 eventModule_ = eve::ModuleManager::requireInstance<eve::platform_event::PlatformEvent>("PlatformEvent");
26 eventModule_->setPollObserver([this](const eve::platform_event::Message& m) { onEventConsumed(m); });
A state-driven bug scenario: baseline snapshot + ordered per-frame inputs.
Definition ScenarioRecorder.h:47
void setErrorInfo(const std::string &report, const std::string &site)
Called by DevTool when a script error is dumped during recording.
Definition ScenarioRecorder.cpp:87
bool end(const std::string &path, std::string *err=nullptr)
Stop recording and persist the scenario to a JSON file.
Definition ScenarioRecorder.cpp:62
void cancel()
Abort recording and restore the previous event observer.
Definition ScenarioRecorder.cpp:74
bool begin(HSQUIRRELVM vm, std::string *err=nullptr)
Start recording: capture the baseline snapshot and observe the event queue.
Definition ScenarioRecorder.cpp:36
void detachObserver()
Ensure the event observer is detached (restore previous); safe to call repeatedly.
Definition ScenarioRecorder.cpp:29
void onEventConsumed(const eve::platform_event::Message &msg)
Invoked by the event poll observer for every consumed message.
Definition ScenarioRecorder.cpp:93
static bool save(const std::string &baseline, const std::vector< ScenarioFrame > &frames, const std::string &errorReport, const std::string &errorSite, const std::string &path, std::string *err=nullptr)
Persist a scenario to a JSON file (used for both record and replay paths).
Definition ScenarioRecorder.cpp:151
std::string capture(HSQUIRRELVM vm, std::string *error=nullptr) const
Capture marked roots, or heuristic roots when none marked.
Definition Snapshot.cpp:438
A named event carrying an ordered list of Variant payloads. Pushed messages are heap-allocated; the q...
Definition PlatformEvent.h:77
const std::function< void(const Message &)> & pollObserver() const
Current poll observer, or empty if none.
Definition PlatformEvent.h:149
void setPollObserver(std::function< void(const Message &)> observer)
Sets an observer invoked for every message consumed via poll*().
Definition PlatformEvent.h:142
Definition AgentDevelopmentMcp.cpp:12
One serializable event payload recorded from the event queue.
Definition ScenarioRecorder.h:20
std::vector< std::string > args
String payloads (non-string payloads dropped).
Definition ScenarioRecorder.h:22
std::vector< ScenarioEvent > events
Events consumed that frame, in order.
Definition ScenarioRecorder.h:28
static Variant makeString(std::string v)
Constructs a string variant (takes ownership of the value).
Definition PlatformEvent.h:45