UI-neutral agent/zone/path document with reversible domain operations. 更多...
#include <CrowdDocument.h>
Public 成员函数 | |
| CrowdDocumentTarget (std::string id) | |
| Crowd document target. | |
| TargetId | targetId () const override |
| Target id. | |
| TargetDescriptor | describe () const override |
| Describe. | |
| void * | queryCapability (const CapabilityId &capability) override |
| Query an optional target capability. | |
| Result< void > | applyDomainOperation (const DomainOperation &operation) override |
| Applies domain operation. | |
| std::unique_ptr< IDomainOperationTarget > | cloneDomainState () const override |
| Clones domain state. | |
| Result< void > | commitDomainState (std::unique_ptr< IDomainOperationTarget > candidate) override |
| Commits domain state. | |
| std::vector< CrowdAgentRecord > | agents () const |
| Enumerate agents in stable-id order. | |
| std::vector< CrowdZoneRecord > | zones () const |
| Enumerate zones in stable-id order. | |
| std::vector< CrowdPathRecord > | paths () const |
| Enumerate paths in stable-id order. | |
| Result< DomainOperation > | makeSetAgent (const CrowdAgentRecord &record) const |
| Plan reversible agent creation or replacement. | |
| Result< DomainOperation > | makeDeleteAgent (const StableId &id) const |
| Plan reversible agent deletion. | |
| Result< DomainOperation > | makeSetZone (const CrowdZoneRecord &record) const |
| Plan reversible zone creation or replacement. | |
| Result< DomainOperation > | makeDeleteZone (const StableId &id) const |
| Plan reversible zone deletion. | |
| Result< DomainOperation > | makeSetPath (const CrowdPathRecord &record) const |
| Plan reversible path creation or replacement. | |
| Result< DomainOperation > | makeDeletePath (const StableId &id) const |
| Plan reversible path deletion when no agent references it. | |
| std::vector< EditorDiagnostic > | validate () const |
| Validate geometry, numeric limits and cross references. | |
| CrowdOverlayResult | overlay (int primitiveBudget=100000) const |
| Produce deterministic path, zone and agent overlay primitives. | |
| EditorValue | snapshotValue () const |
| Capture deterministic schema-version-one authoring data. | |
| Result< void > | loadSnapshot (const EditorValue &snapshot) |
| Atomically load validated authoring data. | |
Public 成员函数 继承自 eve::editing::EditableTargetState | |
| EditableTargetState (Revision initial=1) | |
| Constructs the shared state with an explicit initial revision. | |
| EditRegion | dirtyRegion () const override |
| Return the accumulated dirty region. | |
| void | clearDirtyRegion () override |
| Discard the dirty region; the revision does not change. | |
| std::uint64_t | revision () const override |
| Return the current revision. | |
| Revision | revisionValue () const noexcept |
| Return the revision as the shared protocol revision type. | |
Public 成员函数 继承自 eve::editing::IEditableTarget | |
| virtual | ~IEditableTarget ()=default |
| Releases IEditableTarget resources. | |
| template<class C > | |
| eve::OptionalRef< C > | capability () |
| Query a capability through its interface-owned stable identity. | |
| template<class C > | |
| eve::OptionalRef< const C > | capability () const |
| Capability. | |
| template<class C > | |
| C * | query () |
| Queries query. | |
| template<class C > | |
| const C * | query () const |
| Queries query. | |
Public 成员函数 继承自 eve::editing::IDomainOperationTarget | |
| ~IDomainOperationTarget () override=default | |
| Releases IDomainOperationTarget resources. | |
Public 成员函数 继承自 eve::editing::IDomainOperationTargetStaging | |
| virtual | ~IDomainOperationTargetStaging ()=default |
| Releases IDomainOperationTargetStaging resources. | |
静态 Public 成员函数 | |
| static CapabilityId | editorCapabilityId () |
| Stable capability id for crowd agent, zone and path editing. | |
额外继承的成员函数 | |
Protected 成员函数 继承自 eve::editing::EditableTargetState | |
| void | widenDirty (int x, int y) |
| Widen the dirty region without advancing the revision. | |
| void | widenDirty (const EditRegion ®ion) |
| Widen the dirty region without advancing the revision. | |
| void | widenDirty () |
| Mark an unknown area dirty without advancing the revision. | |
| void | bumpRevision () |
| Advance the revision without touching the dirty region. | |
| void | setRevision (Revision revision) |
| Adopt a revision observed elsewhere, without advancing it. | |
| void | setDirtyRegion (const EditRegion ®ion) |
| Replace the dirty region wholesale, without advancing the revision. | |
| void | markDirty (int x, int y) |
| Include one cell in the dirty region and advance the revision. | |
| void | markDirty (const EditRegion ®ion) |
| Include a whole region and advance the revision. | |
| void | markDirty () |
| Mark an unknown area dirty and advance the revision. | |
详细描述
UI-neutral agent/zone/path document with reversible domain operations.
在文件 CrowdDocument.h 第 80 行定义.
构造及析构函数说明
◆ CrowdDocumentTarget()
|
explicit |
Crowd document target.
在文件 CrowdDocument.cpp 第 157 行定义.
成员函数说明
◆ agents()
| std::vector< CrowdAgentRecord > eve::crowd_editing::CrowdDocumentTarget::agents | ( | ) | const |
Enumerate agents in stable-id order.
在文件 CrowdDocument.cpp 第 206 行定义.
引用了 values.
被这些函数引用 loadSnapshot() , 以及 snapshotValue().
◆ applyDomainOperation()
|
overridevirtual |
Applies domain operation.
实现了 eve::editing::IDomainOperationTarget.
在文件 CrowdDocument.cpp 第 170 行定义.
引用了 eve::editing::EditableTargetState::bumpRevision(), eve::Result< T >::failure(), id, payload, eve::editing::DomainOperation::payload, eve::editing::DomainOperation::target, type, eve::editing::DomainOperation::type, value , 以及 eve::editing::EditableTargetState::widenDirty().
◆ cloneDomainState()
|
overridevirtual |
Clones domain state.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 CrowdDocument.cpp 第 197 行定义.
◆ commitDomainState()
|
overridevirtual |
Commits domain state.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 CrowdDocument.cpp 第 198 行定义.
◆ describe()
|
overridevirtual |
Describe.
重载 eve::editing::IEditableTarget .
在文件 CrowdDocument.cpp 第 159 行定义.
引用了 eve::editing::TargetDescriptor::capabilities, editorCapabilityId(), eve::editing::TargetDescriptor::id, eve::editing::TargetDescriptor::revision, eve::editing::EditableTargetState::revisionValue() , 以及 eve::editing::TargetDescriptor::type.
◆ editorCapabilityId()
|
inlinestatic |
Stable capability id for crowd agent, zone and path editing.
在文件 CrowdDocument.h 第 86 行定义.
被这些函数引用 describe() , 以及 queryCapability().
◆ loadSnapshot()
| Result< void > eve::crowd_editing::CrowdDocumentTarget::loadSnapshot | ( | const EditorValue & | snapshot | ) |
Atomically load validated authoring data.
在文件 CrowdDocument.cpp 第 296 行定义.
引用了 agents(), eve::editing::EditableTargetState::bumpRevision(), paths(), validate(), value, eve::editing::EditableTargetState::widenDirty() , 以及 zones().
◆ makeDeleteAgent()
| Result< DomainOperation > eve::crowd_editing::CrowdDocumentTarget::makeDeleteAgent | ( | const StableId & | id | ) | const |
◆ makeDeletePath()
| Result< DomainOperation > eve::crowd_editing::CrowdDocumentTarget::makeDeletePath | ( | const StableId & | id | ) | const |
Plan reversible path deletion when no agent references it.
在文件 CrowdDocument.cpp 第 255 行定义.
◆ makeDeleteZone()
| Result< DomainOperation > eve::crowd_editing::CrowdDocumentTarget::makeDeleteZone | ( | const StableId & | id | ) | const |
◆ makeSetAgent()
| Result< DomainOperation > eve::crowd_editing::CrowdDocumentTarget::makeSetAgent | ( | const CrowdAgentRecord & | record | ) | const |
Plan reversible agent creation or replacement.
在文件 CrowdDocument.cpp 第 210 行定义.
引用了 found, eve::crowd_editing::CrowdAgentRecord::id, operation , 以及 eve::UuidIdAdapter< Tag >::value().
◆ makeSetPath()
| Result< DomainOperation > eve::crowd_editing::CrowdDocumentTarget::makeSetPath | ( | const CrowdPathRecord & | record | ) | const |
Plan reversible path creation or replacement.
在文件 CrowdDocument.cpp 第 244 行定义.
引用了 found, eve::crowd_editing::CrowdPathRecord::id, operation , 以及 eve::UuidIdAdapter< Tag >::value().
◆ makeSetZone()
| Result< DomainOperation > eve::crowd_editing::CrowdDocumentTarget::makeSetZone | ( | const CrowdZoneRecord & | record | ) | const |
Plan reversible zone creation or replacement.
在文件 CrowdDocument.cpp 第 225 行定义.
引用了 found, eve::crowd_editing::CrowdZoneRecord::id, operation , 以及 eve::UuidIdAdapter< Tag >::value().
◆ overlay()
| CrowdOverlayResult eve::crowd_editing::CrowdDocumentTarget::overlay | ( | int | primitiveBudget = 100000 | ) | const |
Produce deterministic path, zone and agent overlay primitives.
在文件 CrowdDocument.cpp 第 277 行定义.
引用了 a, b, eve::crowd_editing::CrowdOverlayResult::diagnostics, id, eve::InvalidArgument, path, eve::PreconditionViolation, eve::crowd_editing::CrowdOverlayResult::primitives, eve::crowd_editing::CrowdOverlayResult::revision, eve::editing::EditableTargetState::revisionValue(), eve::editing::ruleDiagnostic(), eve::crowd_editing::CrowdOverlayResult::status , 以及 validate().
◆ paths()
| std::vector< CrowdPathRecord > eve::crowd_editing::CrowdDocumentTarget::paths | ( | ) | const |
Enumerate paths in stable-id order.
在文件 CrowdDocument.cpp 第 208 行定义.
引用了 values.
被这些函数引用 loadSnapshot() , 以及 snapshotValue().
◆ queryCapability()
|
overridevirtual |
Query an optional target capability.
- 返回
- Borrowed pointer owned by this target, or null. @lifetime Valid until this target is destroyed or mutated.
重载 eve::editing::IEditableTarget .
在文件 CrowdDocument.cpp 第 166 行定义.
引用了 eve::editing::IEditableTarget::capability() , 以及 editorCapabilityId().
◆ snapshotValue()
| EditorValue eve::crowd_editing::CrowdDocumentTarget::snapshotValue | ( | ) | const |
◆ targetId()
|
inlineoverridevirtual |
◆ validate()
| std::vector< EditorDiagnostic > eve::crowd_editing::CrowdDocumentTarget::validate | ( | ) | const |
Validate geometry, numeric limits and cross references.
在文件 CrowdDocument.cpp 第 270 行定义.
引用了 eve::NotFound, path, eve::PreconditionViolation, eve::editing::ruleDiagnostic() , 以及 value.
被这些函数引用 loadSnapshot() , 以及 overlay().
◆ zones()
| std::vector< CrowdZoneRecord > eve::crowd_editing::CrowdDocumentTarget::zones | ( | ) | const |
Enumerate zones in stable-id order.
在文件 CrowdDocument.cpp 第 207 行定义.
引用了 values.
被这些函数引用 loadSnapshot() , 以及 snapshotValue().
该类的文档由以下文件生成:
- src/modules/crowd/editing/CrowdDocument.h
- src/modules/crowd/editing/CrowdDocument.cpp
Public 成员函数 继承自