载入中...
搜索中...
未找到
eve::dev::IPlayHostRuntime类 参考abstract

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>

Public 成员函数

virtual ~IPlayHostRuntime ()=default
 Releases IPlayHostRuntime resources.
 
virtual bool paused () const =0
 Whether the host clock is paused.
 
virtual std::uint64_t hostFrame () const =0
 Monotonic host-frame counter owned by this runtime (0 if unknown).
 
virtual void pause ()=0
 Pause the host clock.
 
virtual void play ()=0
 Resume free-running host clock.
 
virtual Result< void > stepFrames (std::int64_t count)=0
 Request count host frames then pause.
 
virtual Result< Value > loadContract () const =0
 Load game.agent.json as an owning Value object.
 
virtual Result< Value > observeScriptRoot (std::string_view root, const std::vector< std::string > &fields) const =0
 Project one marked script root without evaluating arbitrary code.
 
virtual Result< Value > capturePng (std::string path)=0
 Capture the last presented frame through IRenderCapture.
 
virtual Result< std::string > captureCheckpoint ()=0
 Capture marked script snapshot JSON.
 
virtual Result< void > restoreCheckpoint (std::string_view json)=0
 Restore a previously captured checkpoint.
 
virtual std::vector< std::string > gameplayDomains () const =0
 Published gameplay-control domain names, sorted.
 
virtual Result< Value > invokeScriptAction (std::string_view id, std::string_view source)=0
 Run one contract-mapped script snippet. Not an open eval surface.
 

详细描述

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

Releases IPlayHostRuntime resources.

成员函数说明

◆ 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.

参数
pathDestination 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.

参数
idAction id declared in game.agent.json.
sourceExact 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.

参数
rootRoot table slot declared in the contract path.
fieldsDotted field paths; empty means the whole root object.

◆ pause()

virtual void eve::dev::IPlayHostRuntime::pause ( )
pure virtual

Pause the host clock.

◆ 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.

参数
jsonSnapshot JSON produced by captureCheckpoint.

◆ stepFrames()

virtual Result< void > eve::dev::IPlayHostRuntime::stepFrames ( std::int64_t  count)
pure virtual

Request count host frames then pause.

参数
countFrames to run; callers must pass a positive value.

该类的文档由以下文件生成: