载入中...
搜索中...
未找到
eve::weapon::WeaponControl类 参考final

Exposes one weapon through the shared gameplay command protocol. 更多...

#include <WeaponControl.h>

类 eve::weapon::WeaponControl 继承关系图:
eve::IGameplayControlProvider eve::IGameplayInstanceCatalog

Public 成员函数

 WeaponControl (SubjectRef instance, SubjectRef wielder, WeaponDefinition definition, resource::IResourceAccount &account, transaction::ITransactionParticipant &effect)
 Construct a control adapter for one copied definition and borrowed effect authorities.
 
 ~WeaponControl () override
 Unpublish the capability without destroying borrowed authorities.
 
 WeaponControl (const WeaponControl &)=delete
 
WeaponControl & operator= (const WeaponControl &)=delete
 
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"
 

详细描述

Exposes one weapon through the shared gameplay command protocol.

The definition is copied at construction. The resource account and effect participant remain authoritative borrowed collaborators and must outlive this owner-thread-affine adapter. Firing is delegated to WeaponActionAdapter.

在文件 WeaponControl.h 第 30 行定义.

构造及析构函数说明

◆ WeaponControl() [1/2]

eve::weapon::WeaponControl::WeaponControl ( SubjectRef  instance,
SubjectRef  wielder,
WeaponDefinition  definition,
resource::IResourceAccount &  account,
transaction::ITransactionParticipant &  effect 
)

Construct a control adapter for one copied definition and borrowed effect authorities.

参数
instanceStable identity of this weapon-control instance.
wielderStable player-controllable subject identity.
definitionOwning weapon definition copied into the adapter.
accountBorrowed authoritative resource account.
effectBorrowed authoritative weapon-effect transaction participant.

在文件 WeaponControl.cpp 第 47 行定义.

◆ ~WeaponControl()

eve::weapon::WeaponControl::~WeaponControl ( )
override

Unpublish the capability without destroying borrowed authorities.

在文件 WeaponControl.cpp 第 59 行定义.

◆ WeaponControl() [2/2]

eve::weapon::WeaponControl::WeaponControl ( const WeaponControl &  )
delete

成员函数说明

◆ advanceGameplay()

Result< GameplayObservation > eve::weapon::WeaponControl::advanceGameplay ( const GameplaySession &  session,
SubjectRef  instance,
const SimulationStep &  step 
)
overridevirtual

Advance one provider-owned instance using injected deterministic time.

Advance gameplay.

实现了 eve::IGameplayControlProvider.

在文件 WeaponControl.cpp 第 193 行定义.

引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), observeGameplay(), session , 以及 step.

◆ availableGameplayActions()

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

Discover currently legal player-semantic actions for one subject.

Available gameplay actions.

实现了 eve::IGameplayControlProvider.

在文件 WeaponControl.cpp 第 110 行定义.

引用了 eve::Diagnostic::error(), id, observeGameplay(), eve::PreconditionViolation, session , 以及 subject.

◆ gameplayDomain()

std::string_view eve::weapon::WeaponControl::gameplayDomain ( ) const
overridevirtualnoexcept

Stable provider domain used for discovery and routing.

Gameplay domain.

实现了 eve::IGameplayControlProvider.

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

◆ gameplayEvents()

Result< std::vector< GameplayEvent > > eve::weapon::WeaponControl::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.

在文件 WeaponControl.cpp 第 206 行定义.

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

◆ gameplayInstances()

std::vector< SubjectRef > eve::weapon::WeaponControl::gameplayInstances ( ) const
overridevirtual

Instances currently served, in publication order.

Gameplay instances.

实现了 eve::IGameplayInstanceCatalog.

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

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

◆ observeGameplay()

◆ operator=()

WeaponControl & eve::weapon::WeaponControl::operator= ( const WeaponControl &  )
delete

◆ submitGameplay()


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