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

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 第 414 行定义.

构造及析构函数说明

◆ 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 第 69 行定义.

引用了 result.

◆ isValid()

◆ name()

◆ namespaceName()

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

Returns the namespace component as a view into this object.

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

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

◆ parse()

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

Parses a scoped logical name.

参数
textA name matching [a-z][a-z0-9_.-]*: followed by [A-Za-z0-9][A-Za-z0-9_.-]*.
返回
The logical ID, or empty when the namespace/name grammar is invalid.

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

引用了 LogicalId(), name(), namespaceName() , 以及 text.

被这些函数引用 eve::editor::ActionTimelineWidget::addNotifyAtCursor(), eve::editor::ActionTimelineWidget::addStateAtCursor(), eve::rts::RTS::configureScriptWorld(), eve::action::game_event_adapter::ActionGameEventSink::emit(), eve::editor::exposeActionTimelineScriptBindings(), eve::rts::script_internal::exposeStageBindings(), eve::tactics::faceActionDefinition(), eve::action::ActionCameraCueBinding::fromPayload(), eve::action::ActionParameterCurveBinding::fromPayload(), eve::action::ActionAttackVfxBinding::fromPayload(), eve::action::ScriptActionRuntime::grantAbility(), eve::rpg::ActionEncounter::hit(), eve::rts::RTSCommandLog::importText(), eve::editor::ActionTimelineWidget::inspectSelection(), eve::tactics::makeFaceRequest(), eve::tactics::makeMoveRequest(), eve::editor::ActionTimelineTarget::makeSet(), eve::tactics::makeWaitRequest(), eve::tactics::moveActionDefinition(), eve::DefinitionRef::parse(), eve::parseSnapshotEnvelopeValue(), eve::stylize_action::StylizeAction::play(), eve::tactics::TacticsActionExecutor::prepare(), eve::sensing::SensingWorldCandidateProvider::query(), eve::game_event::GameEventLog::restore(), eve::scriptComponentSnapshotSchema(), eve::editor::ActionTimelineEditor::selectedItemIds(), eve::sensing::SensingWorld::setZones(), eve::physics::snapshot_detail::snapshotSchema(), eve::action::ScriptActionRuntime::submitAction() , 以及 eve::tactics::waitActionDefinition().

友元及相关函数文档

◆ operator==

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

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