载入中...
搜索中...
未找到
eve::card::CardPlayParticipant类 参考final

Transaction participant that publishes one CardData play. 更多...

#include <CardPlay.h>

类 eve::card::CardPlayParticipant 继承关系图:
eve::transaction::ITransactionParticipant

Public 成员函数

 CardPlayParticipant (CardData &card)
 Bind one card effect whose state transition is played.
 
std::string_view name () const noexcept override
 Stable transaction diagnostic name.
 
eve::Result< void > prepare (const eve::transaction::TransactionContext &context) override
 Validate and stage local changes for the transaction.
 
eve::Result< void > commit (const eve::transaction::TransactionContext &context) override
 Publish this participant's staged changes.
 
eve::Result< void > rollback (const eve::transaction::TransactionContext &context) override
 Discard a prepared but not committed stage.
 
eve::Result< void > compensate (const eve::transaction::TransactionContext &context) override
 Undo an already committed external effect by compensation.
 
- Public 成员函数 继承自 eve::transaction::ITransactionParticipant
virtual ~ITransactionParticipant ()=default
 Releases ITransactionParticipant resources.
 

详细描述

Transaction participant that publishes one CardData play.

The card state remains owned by CardData. This participant only stages the phase transition and restores it on rollback/compensation; it never owns a card or an account. The card is borrowed for the synchronous transaction call and must remain live on the owner thread.

在文件 CardPlay.h 第 111 行定义.

构造及析构函数说明

◆ CardPlayParticipant()

eve::card::CardPlayParticipant::CardPlayParticipant ( CardData &  card)
explicit

Bind one card effect whose state transition is played.

在文件 CardPlay.cpp 第 263 行定义.

成员函数说明

◆ commit()

eve::Result< void > eve::card::CardPlayParticipant::commit ( const eve::transaction::TransactionContext &  context)
overridevirtual

Publish this participant's staged changes.

参数
contextShared borrowed transaction context.
返回
Success when the participant is committed, otherwise diagnostics.

Commits .

实现了 eve::transaction::ITransactionParticipant.

在文件 CardPlay.cpp 第 277 行定义.

引用了 eve::Applied, context, eve::card::Played, state, eve::Status::success() , 以及 eve::Result< T >::success().

◆ compensate()

eve::Result< void > eve::card::CardPlayParticipant::compensate ( const eve::transaction::TransactionContext &  context)
overridevirtual

Undo an already committed external effect by compensation.

参数
contextShared borrowed transaction context.
返回
Success when compensation completes, Unsupported when impossible, or another failure with diagnostics.

Compensate.

实现了 eve::transaction::ITransactionParticipant.

在文件 CardPlay.cpp 第 298 行定义.

引用了 eve::Applied, context, state, eve::Status::success() , 以及 eve::Result< T >::success().

◆ name()

std::string_view eve::card::CardPlayParticipant::name ( ) const
inlineoverridevirtualnoexcept

Stable transaction diagnostic name.

重载 eve::transaction::ITransactionParticipant .

在文件 CardPlay.h 第 117 行定义.

◆ prepare()

eve::Result< void > eve::card::CardPlayParticipant::prepare ( const eve::transaction::TransactionContext &  context)
overridevirtual

Validate and stage local changes for the transaction.

参数
contextShared borrowed transaction context.
返回
Success when this participant is prepared, otherwise diagnostics.

Prepare.

实现了 eve::transaction::ITransactionParticipant.

在文件 CardPlay.cpp 第 265 行定义.

引用了 eve::Applied, context, eve::card::Disabled, eve::card::Discarded, eve::card::Played, state, eve::Status::success() , 以及 eve::Result< T >::success().

◆ rollback()

eve::Result< void > eve::card::CardPlayParticipant::rollback ( const eve::transaction::TransactionContext &  context)
overridevirtual

Discard a prepared but not committed stage.

参数
contextShared borrowed transaction context.
返回
Success when provisional state is discarded, otherwise diagnostics.

Rollback.

实现了 eve::transaction::ITransactionParticipant.

在文件 CardPlay.cpp 第 290 行定义.

引用了 eve::Applied, context, eve::Status::success() , 以及 eve::Result< T >::success().


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