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()
|
default |
Constructs an empty, invalid logical ID.
被这些函数引用 fromParts() , 以及 parse().
成员函数说明
◆ format()
|
inlinenoexcept |
Returns the canonical namespace:name representation.
在文件 Identity.h 第 436 行定义.
被这些函数引用 eve::SnapshotMigrationChain::add(), eve::combat::CombatLoopRuntime::advance(), eve::action::ActionNotifyRegistry::dispatch(), eve::action::ActionNotifyRegistry::dispatchSample(), eve::action::ActionNotifyRegistry::dispatchUpdate(), eve::weapon::encodeCarrierRecipe(), eve::action::AbilityRuntime::grant(), eve::editor::ActionTimelineWidget::inspectSelection(), eve::SnapshotMigrationChain::migrate(), eve::stylize::AttackVfxRuntime::play(), eve::editor::ActionTimelineTarget::read(), eve::stylize::AttackVfxRuntime::registerRecipe(), eve::stylize::AttackVfxRuntime::registerSkin(), eve::tactics::BattleSystem::roll(), eve::combat::CombatEnemyIntentSource::setLightAction(), eve::snapshotEnvelopeValue(), eve::rts::SupplyConvoySystem::step(), eve::rts::SupplySystem::step(), eve::card::CardControl::submitGameplay(), eve::dialogue::DialogueControl::submitGameplay(), eve::economy::EconomyControl::submitGameplay(), eve::inventory::InventoryControl::submitGameplay(), eve::rpg::BattleControl::submitGameplay(), eve::rts::RTS::submitGameplay(), eve::tactics::Tactics::submitGameplay(), eve::action::ActionParameterCurveBinding::toPayload(), eve::combat::ComboGraphEdge::validate() , 以及 eve::action::ActionNotifyRegistry::validate().
◆ fromParts()
|
static |
Builds a logical ID from separate namespace and name components.
- 参数
-
namespaceName The stable owner namespace. name The name within that namespace.
- 返回
- The logical ID, or empty when either component is invalid.
在文件 Identity.cpp 第 48 行定义.
引用了 LogicalId(), name(), namespaceName() , 以及 value.
被这些函数引用 eve::rts::RTSProductionActionAdapter::build(), eve::rts::RTS::castScriptAbility(), eve::vehicle::VehicleDefinitionRuntime::create(), eve::weapon::WeaponDefinitionRuntime::create(), eve::rpg::SkillDefinitionRuntime::create(), eve::action::ActionTimeline::fromValue(), eve::rts::RTSProjectileSystem::launch(), eve::editor::ActionTimelineWidget::layout(), eve::weapon::parseWeaponDefinition(), eve::procgen::ArtifactPublisher::restore(), eve::game_event::GameEventLog::restore() , 以及 eve::procgen::ArtifactPublisher::snapshot().
◆ hash()
|
noexcept |
Returns a stable non-cryptographic hash for hash tables.
- 返回
- A deterministic 64-bit hash of the canonical text.
在文件 Identity.cpp 第 68 行定义.
◆ isValid()
|
inlinenoexcept |
Returns whether this value contains a valid namespace and name.
在文件 Identity.h 第 433 行定义.
被这些函数引用 eve::SnapshotMigrationChain::add(), eve::tactics::BattleSystem::addObjective(), eve::game_event::GameEventLog::append(), eve::rts::RTS::castScriptAbility(), eve::rts::RTS::configureScriptAI(), eve::definition::InstanceIdentity::create(), eve::rts::RTS::heal(), eve::definition::DefinitionHandle::isValid(), eve::definition::InstanceIdentity::isValid(), eve::rts::RTSCommandLog::queue(), eve::rts::RTS::queueScriptReinforcement(), eve::rts::RTS::queueScriptUnit(), eve::rts::RTSProjectileSystem::restore(), eve::tactics::BattleSystem::roll(), eve::rts::RTS::scriptContact(), eve::rts::RTS::startScriptConstruction(), eve::rts::AISystem::step() , 以及 eve::action::ActionTimeline::validate().
◆ name()
|
noexcept |
Returns the name component as a view into this object.
在文件 Identity.cpp 第 63 行定义.
被这些函数引用 eve::card::CardDefinitionRuntime::applyTo(), eve::effects::EffectDefinitionRuntime::applyTo(), eve::vehicle::VehicleDefinitionRuntime::applyTo(), eve::rts::RTS::configureScriptAI(), fromParts(), parse(), eve::rts::RTS::queueScriptReinforcement(), eve::rts::RTS::queueScriptUnit() , 以及 eve::rts::RTS::startScriptConstruction().
◆ namespaceName()
|
noexcept |
Returns the namespace component as a view into this object.
在文件 Identity.cpp 第 58 行定义.
被这些函数引用 fromParts() , 以及 parse().
◆ parse()
|
static |
Parses a scoped logical name.
- 参数
-
text A 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 第 36 行定义.
引用了 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::tactics::faceActionDefinition(), eve::action::ActionCameraCueBinding::fromPayload(), eve::action::ActionParameterCurveBinding::fromPayload(), eve::action::ActionAttackVfxBinding::fromPayload(), 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::editor::ActionTimelineEditor::selectedItemIds(), eve::sensing::SensingWorld::setZones() , 以及 eve::tactics::waitActionDefinition().
友元及相关函数文档
◆ operator==
该类的文档由以下文件生成:
- src/engine/common/Identity.h
- src/engine/common/Identity.cpp