载入中...
搜索中...
未找到
ProviderRegistry.h
浏览该文件的文档.
66 Diagnostic::error(DiagnosticCode::InvalidArgument, "Provider requires id and implementation", "id"));
std::vector< std::unique_ptr< ScriptClimbingEventSink > > retired
Definition ClimbingServices.cpp:188
Move-only, checked operation results for the common layer.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
static Status success(StatusCode code=StatusCode::Ok)
Construct a successful status with an explicit non-error outcome.
Definition Status.cpp:19
Instance-owned publication mechanism shared by capability and domain registries. @ownership The regis...
Definition ProviderRegistry.h:38
Result< Record > acquire(std::string_view id) const
Acquire the current id.
Definition ProviderRegistry.h:96
Result< OwnedProviderHandle > publish(std::string id, std::shared_ptr< I > provider, Metadata metadata={})
Publish a unique id.
Definition ProviderRegistry.h:62
ProviderRegistry(const ProviderRegistry &)=delete
Result< Record > withdraw(const OwnedProviderHandle &handle)
Withdraw an exact generation; retained leases stay valid.
Definition ProviderRegistry.h:106
~ProviderRegistry()
Unpublish before releasing implementations; destructor reentry sees an empty, closing registry.
Definition ProviderRegistry.h:52
ProviderRegistry & operator=(const ProviderRegistry &)=delete
ProviderRegistry()=default
Construct an empty registry with its own generation namespace.
std::vector< Record > snapshot() const
Copy owning dispatch records in id order; later mutations affect the next snapshot....
Definition ProviderRegistry.h:125
Result< Record > acquire(const OwnedProviderHandle &handle) const
Acquire an exact generation.
Definition ProviderRegistry.h:85
Definition Capability.cpp:9
@ InvalidArgument
@ Unsupported
@ Conflict
@ Applied
Owning identity of one publication; generations are local to its registry.
Definition ProviderRegistry.h:19
friend bool operator==(const OwnedProviderHandle &, const OwnedProviderHandle &)=default
Compare publication identities.
Owning lease and immutable-at-publication metadata for a generation.
Definition ProviderRegistry.h:45
OwnedProviderHandle handle
Definition ProviderRegistry.h:46
std::shared_ptr< I > provider
Definition ProviderRegistry.h:47