载入中...
搜索中...
未找到
eve::rpg::BattleControl类 参考final

Explicit stable-identity adapter over one caller-owned RPG battle. 更多...

#include <BattleControl.h>

类 eve::rpg::BattleControl 继承关系图:
eve::IGameplayControlProvider eve::IGameplayInstanceCatalog

Public 成员函数

 BattleControl (Battle &battle, SubjectRef instance)
 Construct an adapter over a borrowed battle and stable instance identity.
 
 ~BattleControl () override
 Unpublish the capability without destroying the borrowed battle.
 
 BattleControl (const BattleControl &)=delete
 
BattleControl & operator= (const BattleControl &)=delete
 
Result< void > bindParticipant (SubjectRef subject, RPGActor *actor)
 Bind a stable subject to an existing battle participant.
 
std::string_view gameplayDomain () const noexcept override
 Stable provider domain used for discovery and routing.
 
std::vector< SubjectRef > gameplayInstances () const override
 Instances currently served, in publication order.
 
Result< GameplayObservation > observeGameplay (const GameplaySession &session, SubjectRef instance) const override
 Observe one provider-owned gameplay instance without mutation.
 
Result< std::vector< GameplayActionDescriptor > > availableGameplayActions (const GameplaySession &session, SubjectRef instance, SubjectRef subject) const override
 Discover currently legal player-semantic actions for one subject.
 
Result< GameplayCommandReceipt > submitGameplay (const GameplaySession &session, SubjectRef instance, const GameplayCommand &command) override
 Validate authority and atomically submit one domain command.
 
Result< GameplayObservation > advanceGameplay (const GameplaySession &session, SubjectRef instance, const SimulationStep &step) override
 Advance one provider-owned instance using injected deterministic time.
 
Result< std::vector< GameplayEvent > > gameplayEvents (const GameplaySession &session, SubjectRef instance, std::uint64_t afterSequence) const override
 Return events strictly newer than an instance-local sequence cursor.
 
- Public 成员函数 继承自 eve::IGameplayControlProvider
virtual ~IGameplayControlProvider ()=default
 Releases IGameplayControlProvider resources.
 
- Public 成员函数 继承自 eve::IGameplayInstanceCatalog
virtual ~IGameplayInstanceCatalog ()=default
 Releases IGameplayInstanceCatalog resources.
 

额外继承的成员函数

- 静态 Public 属性 继承自 eve::IGameplayControlProvider
static constexpr const char * capabilityName = "IGameplayControlProvider"
 
- 静态 Public 属性 继承自 eve::IGameplayInstanceCatalog
static constexpr const char * capabilityName = "IGameplayInstanceCatalog"
 

详细描述

Explicit stable-identity adapter over one caller-owned RPG battle.

Battle remains the only mutable combat authority. The caller owns this adapter and must destroy it before the borrowed Battle or any bound actor. Binding is explicit because legacy RPGActor instances do not themselves own persistent IDs. Registration and calls are confined to the battle's simulation thread.

在文件 BattleControl.h 第 28 行定义.

构造及析构函数说明

◆ BattleControl() [1/2]

eve::rpg::BattleControl::BattleControl ( Battle &  battle,
SubjectRef  instance 
)

Construct an adapter over a borrowed battle and stable instance identity.

在文件 BattleControl.cpp 第 31 行定义.

◆ ~BattleControl()

eve::rpg::BattleControl::~BattleControl ( )
override

Unpublish the capability without destroying the borrowed battle.

在文件 BattleControl.cpp 第 37 行定义.

◆ BattleControl() [2/2]

eve::rpg::BattleControl::BattleControl ( const BattleControl &  )
delete

成员函数说明

◆ advanceGameplay()

◆ availableGameplayActions()

Result< std::vector< GameplayActionDescriptor > > eve::rpg::BattleControl::availableGameplayActions ( const GameplaySession &  session,
SubjectRef  instance,
SubjectRef  subject 
) const
overridevirtual

Discover currently legal player-semantic actions for one subject.

Available gameplay actions.

实现了 eve::IGameplayControlProvider.

在文件 BattleControl.cpp 第 131 行定义.

引用了 eve::Diagnostic::error(), eve::rpg::Battle::isActorAlive(), eve::rpg::Battle::isFinished(), eve::NotFound, eve::PreconditionViolation, session , 以及 subject.

◆ bindParticipant()

Result< void > eve::rpg::BattleControl::bindParticipant ( SubjectRef  subject,
RPGActor *  actor 
)

◆ gameplayDomain()

std::string_view eve::rpg::BattleControl::gameplayDomain ( ) const
overridevirtualnoexcept

Stable provider domain used for discovery and routing.

Gameplay domain.

实现了 eve::IGameplayControlProvider.

在文件 BattleControl.cpp 第 64 行定义.

◆ gameplayEvents()

Result< std::vector< GameplayEvent > > eve::rpg::BattleControl::gameplayEvents ( const GameplaySession &  session,
SubjectRef  instance,
std::uint64_t  afterSequence 
) const
overridevirtual

Return events strictly newer than an instance-local sequence cursor.

Gameplay events.

实现了 eve::IGameplayControlProvider.

在文件 BattleControl.cpp 第 254 行定义.

引用了 eve::Applied, eve::NoOp, observeGameplay(), session , 以及 eve::Status::success().

◆ gameplayInstances()

std::vector< SubjectRef > eve::rpg::BattleControl::gameplayInstances ( ) const
overridevirtual

Instances currently served, in publication order.

Gameplay instances.

实现了 eve::IGameplayInstanceCatalog.

在文件 BattleControl.cpp 第 66 行定义.

引用了 eve::SubjectRef::isValid().

◆ observeGameplay()

◆ operator=()

BattleControl & eve::rpg::BattleControl::operator= ( const BattleControl &  )
delete

◆ submitGameplay()


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