载入中...
搜索中...
未找到
eve::crowd_editing::CrowdDocumentTarget类 参考final

UI-neutral agent/zone/path document with reversible domain operations. 更多...

#include <CrowdDocument.h>

类 eve::crowd_editing::CrowdDocumentTarget 继承关系图:
eve::editing::EditableTargetState eve::editing::IEditableTarget eve::editing::IDomainOperationTarget eve::editing::IDomainOperationTargetStaging eve::editing::IEditableTarget eve::editing::IEditableTarget

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 &region)
 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 &region)
 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 &region)
 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()

eve::crowd_editing::CrowdDocumentTarget::CrowdDocumentTarget ( std::string  id)
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()

◆ cloneDomainState()

std::unique_ptr< IDomainOperationTarget > eve::crowd_editing::CrowdDocumentTarget::cloneDomainState ( ) const
overridevirtual

Clones domain state.

实现了 eve::editing::IDomainOperationTargetStaging.

在文件 CrowdDocument.cpp 第 197 行定义.

◆ commitDomainState()

Result< void > eve::crowd_editing::CrowdDocumentTarget::commitDomainState ( std::unique_ptr< IDomainOperationTarget >  candidate)
overridevirtual

Commits domain state.

实现了 eve::editing::IDomainOperationTargetStaging.

在文件 CrowdDocument.cpp 第 198 行定义.

◆ describe()

◆ editorCapabilityId()

static CapabilityId eve::crowd_editing::CrowdDocumentTarget::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

Plan reversible agent deletion.

在文件 CrowdDocument.cpp 第 217 行定义.

引用了 found, operation , 以及 value.

◆ makeDeletePath()

Result< DomainOperation > eve::crowd_editing::CrowdDocumentTarget::makeDeletePath ( const StableId &  id) const

Plan reversible path deletion when no agent references it.

在文件 CrowdDocument.cpp 第 255 行定义.

引用了 found, operation , 以及 value.

◆ makeDeleteZone()

Result< DomainOperation > eve::crowd_editing::CrowdDocumentTarget::makeDeleteZone ( const StableId &  id) const

Plan reversible zone deletion.

在文件 CrowdDocument.cpp 第 236 行定义.

引用了 found, operation , 以及 value.

◆ 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()

◆ paths()

std::vector< CrowdPathRecord > eve::crowd_editing::CrowdDocumentTarget::paths ( ) const

Enumerate paths in stable-id order.

在文件 CrowdDocument.cpp 第 208 行定义.

引用了 values.

被这些函数引用 loadSnapshot() , 以及 snapshotValue().

◆ queryCapability()

void * eve::crowd_editing::CrowdDocumentTarget::queryCapability ( const CapabilityId &  capability)
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

Capture deterministic schema-version-one authoring data.

在文件 CrowdDocument.cpp 第 291 行定义.

引用了 agents(), paths(), value , 以及 zones().

◆ targetId()

TargetId eve::crowd_editing::CrowdDocumentTarget::targetId ( ) const
inlineoverridevirtual

Target id.

实现了 eve::editing::IEditableTarget.

在文件 CrowdDocument.h 第 90 行定义.

◆ 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().


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