UI-neutral map structure document with reversible domain operations. 更多...
#include <MapDocument.h>
Public 成员函数 | |
| MapDocumentTarget (std::string id) | |
| Map 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< MapLayerRecord > | mapLayers () const override |
| Map layers. | |
| std::vector< MapRoadRecord > | mapRoads () const override |
| Map roads. | |
| std::vector< MapPlacementRecord > | mapPlacements () const override |
| Map placements. | |
| Result< DomainOperation > | makeCreateLayer (const MapLayerRecord &layer) const override |
| Make create layer. | |
| Result< DomainOperation > | makeDeleteLayer (const StableId &layer) const override |
| Make delete layer. | |
| Result< DomainOperation > | makeSetLayer (const MapLayerRecord &layer) const override |
| Make set layer. | |
| Result< DomainOperation > | makeSetRoad (const MapRoadRecord &road) const override |
| Make set road. | |
| Result< DomainOperation > | makeDeleteRoad (const StableId &road) const override |
| Make delete road. | |
| Result< DomainOperation > | makeSetPlacement (const MapPlacementRecord &placement) const override |
| Make set placement. | |
| Result< DomainOperation > | makeDeletePlacement (const StableId &placement) const override |
| Make delete placement. | |
| std::vector< EditorDiagnostic > | validate () const |
| Validate layers, spline geometry and placement references. | |
| MapRoadPreviewResult | previewRoad (const StableId &road, int triangleBudget=10000) const |
| Build a deterministic XZ road strip for viewport preview and budget diagnostics. | |
| EditorValue | snapshotValue () const |
| Capture deterministic map structure data. | |
| Result< void > | loadSnapshot (const EditorValue &snapshot) |
| Atomically load schema-version-one map structure 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. | |
| virtual void * | queryCapability (const CapabilityId &capability) |
| Query an optional stable capability. | |
| 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 成员函数 继承自 eve::map_editing::IMapStructureEditTarget | |
| virtual | ~IMapStructureEditTarget ()=default |
| Releases IMapStructureEditTarget resources. | |
额外继承的成员函数 | |
静态 Public 成员函数 继承自 eve::map_editing::IMapStructureEditTarget | |
| static CapabilityId | editorCapabilityId () |
| Stable capability id for map structure operations. | |
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 map structure document with reversible domain operations.
在文件 MapDocument.h 第 129 行定义.
构造及析构函数说明
◆ MapDocumentTarget()
|
explicit |
Map document target.
在文件 MapDocument.cpp 第 182 行定义.
成员函数说明
◆ applyDomainOperation()
|
overridevirtual |
Applies domain operation.
实现了 eve::editing::IDomainOperationTarget.
在文件 MapDocument.cpp 第 198 行定义.
引用了 eve::editing::EditableTargetState::bumpRevision(), current, id, layer, eve::editing::DomainOperation::payload, eve::editing::DomainOperation::target, eve::editing::DomainOperation::type , 以及 eve::editing::EditableTargetState::widenDirty().
被这些函数引用 loadSnapshot().
◆ cloneDomainState()
|
overridevirtual |
Clones domain state.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 MapDocument.cpp 第 327 行定义.
◆ commitDomainState()
|
overridevirtual |
Commits domain state.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 MapDocument.cpp 第 331 行定义.
引用了 eve::editing::EditableTargetState::setDirtyRegion() , 以及 eve::editing::EditableTargetState::setRevision().
◆ describe()
|
overridevirtual |
Describe.
重载 eve::editing::IEditableTarget .
在文件 MapDocument.cpp 第 184 行定义.
引用了 eve::editing::TargetDescriptor::capabilities, eve::map_editing::IMapStructureEditTarget::editorCapabilityId(), eve::editing::TargetDescriptor::id, eve::editing::TargetDescriptor::revision, eve::editing::EditableTargetState::revisionValue() , 以及 eve::editing::TargetDescriptor::type.
◆ loadSnapshot()
| Result< void > eve::map_editing::MapDocumentTarget::loadSnapshot | ( | const EditorValue & | snapshot | ) |
Atomically load schema-version-one map structure data.
在文件 MapDocument.cpp 第 660 行定义.
引用了 applyDomainOperation(), eve::editing::EditableTargetState::bumpRevision(), eve::editing::IEditableTarget::clearDirtyRegion(), layer, makeCreateLayer(), makeSetPlacement(), makeSetRoad(), eve::Result< void >::ok() , 以及 value.
◆ makeCreateLayer()
|
overridevirtual |
Make create layer.
实现了 eve::map_editing::IMapStructureEditTarget.
在文件 MapDocument.cpp 第 374 行定义.
引用了 current, id, layer , 以及 operation.
被这些函数引用 loadSnapshot().
◆ makeDeleteLayer()
|
overridevirtual |
◆ makeDeletePlacement()
|
overridevirtual |
Make delete placement.
实现了 eve::map_editing::IMapStructureEditTarget.
在文件 MapDocument.cpp 第 508 行定义.
◆ makeDeleteRoad()
|
overridevirtual |
◆ makeSetLayer()
|
overridevirtual |
◆ makeSetPlacement()
|
overridevirtual |
Make set placement.
实现了 eve::map_editing::IMapStructureEditTarget.
在文件 MapDocument.cpp 第 486 行定义.
引用了 found, eve::map_editing::MapPlacementRecord::id, eve::map_editing::MapPlacementRecord::layer, layer , 以及 operation.
被这些函数引用 loadSnapshot() , 以及 eve::map_editing::MapObjectImporter::plan().
◆ makeSetRoad()
|
overridevirtual |
Make set road.
实现了 eve::map_editing::IMapStructureEditTarget.
在文件 MapDocument.cpp 第 452 行定义.
引用了 found, eve::map_editing::MapRoadRecord::id, eve::map_editing::MapRoadRecord::layer, layer , 以及 operation.
被这些函数引用 loadSnapshot().
◆ mapLayers()
|
overridevirtual |
Map layers.
实现了 eve::map_editing::IMapStructureEditTarget.
在文件 MapDocument.cpp 第 344 行定义.
引用了 id, layer, left , 以及 right.
被这些函数引用 snapshotValue().
◆ mapPlacements()
|
overridevirtual |
Map placements.
实现了 eve::map_editing::IMapStructureEditTarget.
在文件 MapDocument.cpp 第 365 行定义.
引用了 id.
被这些函数引用 eve::map_editing::MapObjectImporter::plan() , 以及 snapshotValue().
◆ mapRoads()
|
overridevirtual |
Map roads.
实现了 eve::map_editing::IMapStructureEditTarget.
在文件 MapDocument.cpp 第 356 行定义.
引用了 id.
被这些函数引用 snapshotValue().
◆ previewRoad()
| MapRoadPreviewResult eve::map_editing::MapDocumentTarget::previewRoad | ( | const StableId & | road, |
| int | triangleBudget = 10000 |
||
| ) | const |
Build a deterministic XZ road strip for viewport preview and budget diagnostics.
在文件 MapDocument.cpp 第 563 行定义.
引用了 eve::map_editing::MapRoadPreviewResult::centerlineLength, eve::map_editing::MapRoadRecord::closed, eve::map_editing::MapRoadPreviewResult::diagnostics, eve::map_editing::MapRoadPreviewResult::documentRevision, dx, dy, dz, first, found, halfWidth, index, indices, eve::InvalidArgument, eve::InvariantViolation, length, eve::map_editing::MapRoadRecord::materialAsset, eve::map_editing::MapRoadPreviewResult::mesh, eve::NotFound, point, eve::map_editing::MapRoadRecord::points, eve::PreconditionViolation, previous, eve::editing::EditableTargetState::revisionValue(), eve::map_editing::MapRoadPreviewResult::road, eve::editing::ruleDiagnostic(), eve::map_editing::MapRoadPreviewResult::status, eve::UuidIdAdapter< Tag >::value(), value, vertices, eve::map_editing::MapSplinePointRecord::x, eve::map_editing::MapSplinePointRecord::y , 以及 eve::map_editing::MapSplinePointRecord::z.
◆ queryCapability()
|
override |
Query an optional target capability.
- 返回
- Borrowed pointer owned by this target, or null. @lifetime Valid until this target is destroyed or mutated.
在文件 MapDocument.cpp 第 193 行定义.
引用了 eve::editing::IEditableTarget::capability() , 以及 eve::map_editing::IMapStructureEditTarget::editorCapabilityId().
◆ snapshotValue()
| EditorValue eve::map_editing::MapDocumentTarget::snapshotValue | ( | ) | const |
Capture deterministic map structure data.
在文件 MapDocument.cpp 第 647 行定义.
引用了 layer, mapLayers(), mapPlacements() , 以及 mapRoads().
◆ targetId()
|
inlineoverridevirtual |
◆ validate()
| std::vector< EditorDiagnostic > eve::map_editing::MapDocumentTarget::validate | ( | ) | const |
Validate layers, spline geometry and placement references.
在文件 MapDocument.cpp 第 521 行定义.
引用了 dx, dy, dz, id, index, eve::InvariantViolation, layer, eve::PreconditionViolation, eve::editing::ruleDiagnostic() , 以及 value.
该类的文档由以下文件生成:
- src/modules/map/editing/MapDocument.h
- src/modules/map/editing/MapDocument.cpp
Public 成员函数 继承自