载入中...
搜索中...
未找到
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 >

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 >
static Result< OwnedProviderLease< I > > eve::cap::OwnedProviderRegistry< I >::acquire ( const OwnedProviderHandle &  handle)
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 >
static Result< OwnedProviderLease< I > > eve::cap::OwnedProviderRegistry< I >::acquire ( std::string_view  id)
inlinestatic

Acquire the current generation published under id.

在文件 CapabilityOwned.h 第 184 行定义.

引用了 found , 以及 slots.

◆ provide()

template<class I >
static Result< OwnedProviderHandle > eve::cap::OwnedProviderRegistry< I >::provide ( std::string  id,
std::shared_ptr< I >  provider 
)
inlinestatic

Publish an owning provider under id, replacing only after explicit unload.

参数
idNon-empty stable provider id within capability I.
providerNon-null shared ownership of the implementation.
返回
Generation-qualified handle, or Conflict when id is already published.

在文件 CapabilityOwned.h 第 134 行定义.

引用了 generations, handle, id , 以及 slots.

◆ unload()

template<class I >
static Result< void > eve::cap::OwnedProviderRegistry< I >::unload ( const OwnedProviderHandle &  handle)
inlinestatic

Unpublish one exact provider generation and clear the borrowed slot when it matches.

在文件 CapabilityOwned.h 第 200 行定义.

引用了 borrowed, found, handle , 以及 slots.


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