载入中...
搜索中...
未找到

Human-readable, scoped identifier in the form namespace:name. 更多...

#include <Identity.h>

Public 成员函数

 LogicalId ()=default
 Constructs an empty, invalid logical ID.
 
bool isValid () const noexcept
 Returns whether this value contains a valid namespace and name.
 
const std::string & format () const noexcept
 Returns the canonical namespace:name representation.
 
std::string_view namespaceName () const noexcept
 Returns the namespace component as a view into this object.
 
std::string_view name () const noexcept
 Returns the name component as a view into this object.
 
std::uint64_t hash () const noexcept
 Returns a stable non-cryptographic hash for hash tables.
 

静态 Public 成员函数

static std::optional< LogicalId > parse (std::string_view text)
 Parses a scoped logical name.
 
static std::optional< LogicalId > fromParts (std::string_view namespaceName, std::string_view name)
 Builds a logical ID from separate namespace and name components.
 

友元

bool operator== (const LogicalId &, const LogicalId &) noexcept=default
 

详细描述

Human-readable, scoped identifier in the form namespace:name.

LogicalId is not a persistent instance identity. It names a definition, recipe, policy or action and may be reused by many runtime instances. The namespace is canonical lower-case ASCII ([a-z][a-z0-9_.-]*); the name is case-sensitive ASCII ([A-Za-z0-9][A-Za-z0-9_.-]*). This prevents modules from inventing incompatible namespace spellings at a persistence boundary.

在文件 Identity.h 第 411 行定义.

构造及析构函数说明

◆ LogicalId()

eve::LogicalId::LogicalId ( )
default

Constructs an empty, invalid logical ID.

被这些函数引用 fromParts() , 以及 parse().

成员函数说明

◆ format()

◆ fromParts()

std::optional< LogicalId > eve::LogicalId::fromParts ( std::string_view  namespaceName,
std::string_view  name 
)
static

◆ hash()

std::uint64_t eve::LogicalId::hash ( ) const
noexcept

Returns a stable non-cryptographic hash for hash tables.

返回
A deterministic 64-bit hash of the canonical text.

在文件 Identity.cpp 第 68 行定义.

◆ isValid()

◆ name()

◆ namespaceName()

std::string_view eve::LogicalId::namespaceName ( ) const
noexcept

Returns the namespace component as a view into this object.

在文件 Identity.cpp 第 58 行定义.

被这些函数引用 fromParts() , 以及 parse().

◆ parse()

std::optional< LogicalId > eve::LogicalId::parse ( std::string_view  text)
static

友元及相关函数文档

◆ operator==

bool operator== ( const LogicalId &  ,
const LogicalId &   
)
friend

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