Host-neutral adapter joining shop, quest-reward and world-loot transactions. 更多...
#include <ProductControl.h>
Public 成员函数 | |
| ProductControl (SubjectRef instance, GameState &gameState, Tracker &tracker, inventory::Bag &bag) | |
| Construct over borrowed product-loop authorities and a stable instance identity. | |
| ~ProductControl () override | |
| Unpublish the capability without destroying borrowed authorities. | |
| ProductControl (const ProductControl &)=delete | |
| ProductControl & | operator= (const ProductControl &)=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" |
详细描述
Host-neutral adapter joining shop, quest-reward and world-loot transactions.
GameState, Tracker and Bag remain independent authoritative owners. This caller-owned adapter retains only borrowed pointers, an optimistic observation fingerprint and owning event projections. Destroy it before any participant.
在文件 ProductControl.h 第 29 行定义.
构造及析构函数说明
◆ ProductControl() [1/2]
| eve::rpg::ProductControl::ProductControl | ( | SubjectRef | instance, |
| GameState & | gameState, | ||
| Tracker & | tracker, | ||
| inventory::Bag & | bag | ||
| ) |
Construct over borrowed product-loop authorities and a stable instance identity.
在文件 ProductControl.cpp 第 80 行定义.
◆ ~ProductControl()
|
override |
Unpublish the capability without destroying borrowed authorities.
在文件 ProductControl.cpp 第 87 行定义.
◆ ProductControl() [2/2]
|
delete |
成员函数说明
◆ advanceGameplay()
|
overridevirtual |
Advance one provider-owned instance using injected deterministic time.
Advance gameplay.
实现了 eve::IGameplayControlProvider.
在文件 ProductControl.cpp 第 313 行定义.
引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), observeGameplay(), session , 以及 step.
◆ availableGameplayActions()
|
overridevirtual |
Discover currently legal player-semantic actions for one subject.
Available gameplay actions.
实现了 eve::IGameplayControlProvider.
在文件 ProductControl.cpp 第 170 行定义.
引用了 eve::Diagnostic::error(), observeGameplay(), eve::PreconditionViolation, session , 以及 subject.
◆ gameplayDomain()
|
overridevirtualnoexcept |
Stable provider domain used for discovery and routing.
Gameplay domain.
实现了 eve::IGameplayControlProvider.
在文件 ProductControl.cpp 第 92 行定义.
◆ gameplayEvents()
|
overridevirtual |
Return events strictly newer than an instance-local sequence cursor.
Gameplay events.
实现了 eve::IGameplayControlProvider.
在文件 ProductControl.cpp 第 326 行定义.
引用了 eve::Applied, eve::NoOp, observeGameplay(), eve::GameplayEvent::sequence, session , 以及 eve::Status::success().
◆ gameplayInstances()
|
overridevirtual |
Instances currently served, in publication order.
Gameplay instances.
实现了 eve::IGameplayInstanceCatalog.
在文件 ProductControl.cpp 第 94 行定义.
◆ observeGameplay()
|
overridevirtual |
Observe one provider-owned gameplay instance without mutation.
Observe gameplay.
实现了 eve::IGameplayControlProvider.
在文件 ProductControl.cpp 第 149 行定义.
引用了 eve::GameplayObservation::domain, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::GameplayObservation::instance, eve::SubjectRef::isValid(), eve::NotFound, eve::PreconditionViolation, eve::GameplayObservation::revision, revision, session, eve::GameplayObservation::state, state, eve::Result< T >::success() , 以及 eve::GameplayObservation::tick.
被这些函数引用 advanceGameplay(), availableGameplayActions() , 以及 gameplayEvents().
◆ operator=()
|
delete |
◆ submitGameplay()
|
overridevirtual |
Validate authority and atomically submit one domain command.
Submit gameplay.
实现了 eve::IGameplayControlProvider.
在文件 ProductControl.cpp 第 211 行定义.
引用了 eve::GameplayCommandReceipt::acceptedTick, eve::GameplayCommand::action, eve::Applied, eve::rpg::ShopTransaction::buyOffer(), eve::rpg::QuestReward::claim(), eve::rpg::WorldInteraction::collectLoot(), eve::GameplayCommandReceipt::commandId, eve::Conflict, eve::GameplayCommandReceipt::details, eve::Diagnostic::error(), eve::GameplayCommandReceipt::executionId, eve::GameplayCommand::expectedRevision, eve::Result< T >::failure(), eve::GameplayCommand::id, eve::InvalidArgument, eve::NotFound, eve::GameplayCommand::observedTick, operation, eve::GameplayCommand::parameters, eve::PreconditionViolation, request, eve::GameplayCommandReceipt::resultingRevision, eve::rpg::ShopTransaction::sellOffer(), session, status, eve::GameplayCommand::subject, eve::Status::success(), eve::Result< T >::success(), target , 以及 eve::Unsupported.
该类的文档由以下文件生成:
- src/modules/rpg/ProductControl.h
- src/modules/rpg/ProductControl.cpp
Public 成员函数 继承自