Capability listener that may consume one emergence action kind. 更多...
#include <IEmergenceActionHandler.h>
Public 成员函数 | |
| virtual | ~IEmergenceActionHandler ()=default |
| Releases IEmergenceActionHandler resources. | |
| virtual eve::Result< bool > | tryHandle (std::string_view kind, const eve::Value &args)=0 |
| Attempt to execute one deferred emergence action. | |
静态 Public 属性 | |
| static constexpr const char * | capabilityName = "IEmergenceActionHandler" |
详细描述
Capability listener that may consume one emergence action kind.
Providers register with eve::cap::addListener<IEmergenceActionHandler>(...). The emergence engine invokes listeners in priority order until one returns success(true) (consumed). Built-in fact.set / economy.* never reach here.
@thread Owning simulation thread of the RuleEngine that is draining. @reentrancy Handlers must not call back into the draining RuleEngine; enqueue work for a later drain instead. @lifetime Registered instances must outlive their registry entries.
在文件 IEmergenceActionHandler.h 第 27 行定义.
构造及析构函数说明
◆ ~IEmergenceActionHandler()
|
virtualdefault |
Releases IEmergenceActionHandler resources.
成员函数说明
◆ tryHandle()
|
pure virtual |
Attempt to execute one deferred emergence action.
- 参数
-
kind Stable action kind (for example quest.notify).args Owning argument object owned by the activation; do not retain.
- 返回
success(true)when consumed,success(false)to continue, or a structured failure that aborts the remaining handlers for this action.
类成员变量说明
◆ capabilityName
|
staticconstexpr |
在文件 IEmergenceActionHandler.h 第 29 行定义.
该类的文档由以下文件生成:
- src/engine/common/IEmergenceActionHandler.h