载入中...
搜索中...
未找到
eve::cap::OwnedProviderRegistry< I > 模板类 参考
Thread-safe owned-provider table keyed by capability name + provider id. 更多...
#include <CapabilityOwned.h>
静态 Public 成员函数 | |
| static Result< OwnedProviderHandle > | provide (std::string id, std::shared_ptr< I > provider) |
Publish an owning provider under id, replacing only after explicit unload. | |
| static Result< OwnedProviderLease< I > > | acquire (const OwnedProviderHandle &handle) |
| Acquire an owning lease for an exact handle generation. | |
| static Result< OwnedProviderLease< I > > | acquire (std::string_view id) |
Acquire the current generation published under id. | |
| static Result< void > | unload (const OwnedProviderHandle &handle) |
| Unpublish one exact provider generation and clear the borrowed slot when it matches. | |
详细描述
template<class I>
class eve::cap::OwnedProviderRegistry< I >
class eve::cap::OwnedProviderRegistry< I >
Thread-safe owned-provider table keyed by capability name + provider id.
@cost Register/acquire/unload take the owned-registry mutex; keep out of hot paths.
在文件 CapabilityOwned.h 第 126 行定义.
成员函数说明
◆ acquire() [1/2]
template<class I >
|
inlinestatic |
Acquire an owning lease for an exact handle generation.
- 返回
- Unsupported when absent, Conflict when the generation is stale.
在文件 CapabilityOwned.h 第 161 行定义.
引用了 found, generations, handle , 以及 slots.
◆ acquire() [2/2]
template<class I >
|
inlinestatic |
Acquire the current generation published under id.
在文件 CapabilityOwned.h 第 184 行定义.
◆ provide()
template<class I >
|
inlinestatic |
Publish an owning provider under id, replacing only after explicit unload.
- 参数
-
id Non-empty stable provider id within capability I.provider Non-null shared ownership of the implementation.
- 返回
- Generation-qualified handle, or Conflict when
idis already published.
在文件 CapabilityOwned.h 第 134 行定义.
引用了 generations, handle, id , 以及 slots.
◆ unload()
template<class I >
|
inlinestatic |
该类的文档由以下文件生成:
- src/engine/common/CapabilityOwned.h