Explicit bridge from gameplay:event blocks to one persistent GameEventLog. 更多...
#include <ActionGameEventSink.h>
Public 成员函数 | |
| ActionGameEventSink (eve::game_event::GameEventLog &log, ActionSubjectResolver resolver) | |
| Construct from borrowed event authority and an owning resolver callback. | |
| ~ActionGameEventSink () override | |
| Action game event sink. | |
| void | setEnabled (bool enabled) |
| Opt this adapter into or out of gameplay-event dispatch. | |
| bool | enabled () const |
| Return whether this exact adapter is registered. | |
| Result< void > | emit (const ActionGameplayEventBinding &binding, const ActionNotifyContext &context) override |
| Emit one validated event or return a structured domain failure. | |
| std::optional< eve::game_event::EventSequence > | lastSequence () const noexcept |
| Return the last successfully appended stream-local sequence. | |
Public 成员函数 继承自 eve::action::IActionGameplayEventSink | |
| virtual | ~IActionGameplayEventSink ()=default |
| Releases IActionGameplayEventSink resources. | |
额外继承的成员函数 | |
静态 Public 属性 继承自 eve::action::IActionGameplayEventSink | |
| static constexpr const char * | capabilityName = "eve.action.gameplay-event-sink" |
详细描述
Explicit bridge from gameplay:event blocks to one persistent GameEventLog.
The caller owns the log and subject resolver. This adapter owns no event-domain state; the log remains the only ordering, identity, persistence, and restore authority.
在文件 ActionGameEventSink.h 第 29 行定义.
构造及析构函数说明
◆ ActionGameEventSink()
| eve::action::game_event_adapter::ActionGameEventSink::ActionGameEventSink | ( | eve::game_event::GameEventLog & | log, |
| ActionSubjectResolver | resolver | ||
| ) |
Construct from borrowed event authority and an owning resolver callback.
- 参数
-
log Log that must outlive this adapter. resolver Synchronous stable-subject resolver copied into the adapter. @lifetime The adapter retains a raw pointer to log until destruction.
在文件 ActionGameEventSink.cpp 第 10 行定义.
◆ ~ActionGameEventSink()
|
override |
Action game event sink.
在文件 ActionGameEventSink.cpp 第 13 行定义.
成员函数说明
◆ emit()
|
overridevirtual |
Emit one validated event or return a structured domain failure.
Emit.
实现了 eve::action::IActionGameplayEventSink.
在文件 ActionGameEventSink.cpp 第 29 行定义.
引用了 eve::game_event::GameEventLog::append(), eve::Applied, binding, context, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::SubjectRef::nil(), eve::NotFound, eve::LogicalId::parse(), payload, eve::game_event::GameEvent::payload, eve::game_event::GameEvent::schemaId, eve::game_event::GameEvent::schemaVersion, source, eve::game_event::GameEvent::source, subject, eve::game_event::GameEvent::subject, eve::Status::success(), eve::Result< T >::success(), eve::game_event::GameEvent::tick , 以及 eve::game_event::GameEvent::type.
◆ enabled()
| bool eve::action::game_event_adapter::ActionGameEventSink::enabled | ( | ) | const |
Return whether this exact adapter is registered.
在文件 ActionGameEventSink.cpp 第 15 行定义.
引用了 index.
被这些函数引用 setEnabled().
◆ lastSequence()
|
noexcept |
Return the last successfully appended stream-local sequence.
在文件 ActionGameEventSink.cpp 第 72 行定义.
◆ setEnabled()
| void eve::action::game_event_adapter::ActionGameEventSink::setEnabled | ( | bool | enabled | ) |
Opt this adapter into or out of gameplay-event dispatch.
在文件 ActionGameEventSink.cpp 第 21 行定义.
该类的文档由以下文件生成:
- src/modules/action/game_event/ActionGameEventSink.h
- src/modules/action/game_event/ActionGameEventSink.cpp
Public 成员函数 继承自