Injected runtime used by Play Host. Tests supply a fake; MCP uses the engine adapter. Implementations must not retain request pointers and must not invoke unknown callbacks. @thread Owner simulation / game-loop thread only.
更多...
#include <PlayHost.h>
Injected runtime used by Play Host. Tests supply a fake; MCP uses the engine adapter. Implementations must not retain request pointers and must not invoke unknown callbacks. @thread Owner simulation / game-loop thread only.
在文件 PlayHost.h 第 25 行定义.
◆ ~IPlayHostRuntime()
| virtual eve::dev::IPlayHostRuntime::~IPlayHostRuntime |
( |
| ) |
|
|
virtualdefault |
◆ captureCheckpoint()
| virtual Result< std::string > eve::dev::IPlayHostRuntime::captureCheckpoint |
( |
| ) |
|
|
pure virtual |
Capture marked script snapshot JSON.
◆ capturePng()
| virtual Result< Value > eve::dev::IPlayHostRuntime::capturePng |
( |
std::string |
path | ) |
|
|
pure virtual |
Capture the last presented frame through IRenderCapture.
- 参数
-
| path | Destination PNG path. |
- 返回
- Object with path/width/height, or Unsupported when capture is absent.
◆ gameplayDomains()
| virtual std::vector< std::string > eve::dev::IPlayHostRuntime::gameplayDomains |
( |
| ) |
const |
|
pure virtual |
Published gameplay-control domain names, sorted.
◆ hostFrame()
| virtual std::uint64_t eve::dev::IPlayHostRuntime::hostFrame |
( |
| ) |
const |
|
pure virtual |
Monotonic host-frame counter owned by this runtime (0 if unknown).
◆ invokeScriptAction()
| virtual Result< Value > eve::dev::IPlayHostRuntime::invokeScriptAction |
( |
std::string_view |
id, |
|
|
std::string_view |
source |
|
) |
| |
|
pure virtual |
Run one contract-mapped script snippet. Not an open eval surface.
- 参数
-
| id | Action id declared in game.agent.json. |
| source | Exact snippet from the contract map; implementations must not substitute caller-supplied script. |
◆ loadContract()
| virtual Result< Value > eve::dev::IPlayHostRuntime::loadContract |
( |
| ) |
const |
|
pure virtual |
Load game.agent.json as an owning Value object.
- 返回
- The contract object, or NotFound / ParseError / Failed.
◆ observeScriptRoot()
| virtual Result< Value > eve::dev::IPlayHostRuntime::observeScriptRoot |
( |
std::string_view |
root, |
|
|
const std::vector< std::string > & |
fields |
|
) |
| const |
|
pure virtual |
Project one marked script root without evaluating arbitrary code.
- 参数
-
| root | Root table slot declared in the contract path. |
| fields | Dotted field paths; empty means the whole root object. |
◆ pause()
| virtual void eve::dev::IPlayHostRuntime::pause |
( |
| ) |
|
|
pure virtual |
◆ paused()
| virtual bool eve::dev::IPlayHostRuntime::paused |
( |
| ) |
const |
|
pure virtual |
Whether the host clock is paused.
◆ play()
| virtual void eve::dev::IPlayHostRuntime::play |
( |
| ) |
|
|
pure virtual |
Resume free-running host clock.
◆ restoreCheckpoint()
| virtual Result< void > eve::dev::IPlayHostRuntime::restoreCheckpoint |
( |
std::string_view |
json | ) |
|
|
pure virtual |
Restore a previously captured checkpoint.
- 参数
-
| json | Snapshot JSON produced by captureCheckpoint. |
◆ stepFrames()
| virtual Result< void > eve::dev::IPlayHostRuntime::stepFrames |
( |
std::int64_t |
count | ) |
|
|
pure virtual |
Request count host frames then pause.
- 参数
-
| count | Frames to run; callers must pass a positive value. |
该类的文档由以下文件生成: