载入中...
搜索中...
未找到
eve::rts::ServiceLink< Tag > 模板类 参考

Strong key link to an external module-owned service object. 更多...

#include <RTSTypes.h>

Public 成员函数

bool isBound () const noexcept
 Whether the link contains a provider key.
 
bool isStale () const noexcept
 Whether the key is empty and therefore cannot resolve.
 
const std::string & key () const noexcept
 Return the stable provider key.
 
void reset () noexcept
 Clear the relationship after source-side destruction.
 

静态 Public 成员函数

static Result< ServiceLink > bind (std::string_view key)
 Bind a non-empty provider key.
 
static ServiceLink fromKeyForRestore (std::string_view key)
 Rehydrate a provider key during restore/import.
 

详细描述

template<typename Tag>
class eve::rts::ServiceLink< Tag >

Strong key link to an external module-owned service object.

A service link retains only a stable logical key, never a provider pointer. The provider owns stale detection for its key; the RTS component remains valid when the optional provider is absent.

ServiceLink public API.

在文件 RTSTypes.h 第 240 行定义.

成员函数说明

◆ bind()

template<typename Tag >
static Result< ServiceLink > eve::rts::ServiceLink< Tag >::bind ( std::string_view  key)
inlinestatic

Bind a non-empty provider key.

Failure.

Success.

在文件 RTSTypes.h 第 243 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::rts::ServiceLink< Tag >::key() , 以及 eve::Result< T >::success().

◆ fromKeyForRestore()

template<typename Tag >
static ServiceLink eve::rts::ServiceLink< Tag >::fromKeyForRestore ( std::string_view  key)
inlinestatic

Rehydrate a provider key during restore/import.

在文件 RTSTypes.h 第 256 行定义.

引用了 eve::rts::ServiceLink< Tag >::key().

◆ isBound()

template<typename Tag >
bool eve::rts::ServiceLink< Tag >::isBound ( ) const
inlinenoexcept

Whether the link contains a provider key.

在文件 RTSTypes.h 第 263 行定义.

◆ isStale()

template<typename Tag >
bool eve::rts::ServiceLink< Tag >::isStale ( ) const
inlinenoexcept

Whether the key is empty and therefore cannot resolve.

在文件 RTSTypes.h 第 265 行定义.

◆ key()

template<typename Tag >
const std::string & eve::rts::ServiceLink< Tag >::key ( ) const
inlinenoexcept

Return the stable provider key.

在文件 RTSTypes.h 第 267 行定义.

被这些函数引用 eve::rts::ServiceLink< Tag >::bind() , 以及 eve::rts::ServiceLink< Tag >::fromKeyForRestore().

◆ reset()

template<typename Tag >
void eve::rts::ServiceLink< Tag >::reset ( )
inlinenoexcept

Clear the relationship after source-side destruction.

在文件 RTSTypes.h 第 269 行定义.


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