Single owner of source author graph, shared definitions, bindings and bounded undo history. Synchronous owner-thread only, callback-free; all inputs are owning copies. Resolved networks are derived values. 更多...
#include <RoadPresetDocument.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| ~RoadPresetDocument () | |
| Release document and all author history; outstanding tokens cannot target another document. | |
| RoadPresetDocument (const RoadPresetDocument &)=delete | |
| RoadPresetDocument & | operator= (const RoadPresetDocument &)=delete |
| RoadPresetDraft | beginEdit () const |
| Begin an owning edit builder; modifying it cannot change the live document. @cost Linear copy of current author data, amortized per edit transaction. | |
| eve::Result< PreparedRoadPresetEdit > | prepare (RoadPresetDraft draft) const |
| Validate and resolve an owning builder without publishing it. | |
| eve::Result< void > | commit (PreparedRoadPresetEdit edit) |
| Publish a validated token if its owner/revision still matches; reject stale, foreign or consumed tokens. | |
| const procgen::road::RoadNetwork & | network () const |
| Return an immutable resolved graph for direct bakeRoadNetwork consumption. @ownership Borrowed from this document; valid until commit, undo, redo or destruction. @thread Owner-thread synchronous scope only; do not retain across edits. | |
| eve::Result< void > | undo () |
| Restore the prior complete author/derived state as a new document revision. | |
| eve::Result< void > | redo () |
| Restore the next complete author/derived state as a new document revision. | |
| eve::Result< eve::Value > | capture () const |
| Capture canonical author history and cursor; derived networks and runtime tokens are not serialized. @cost Linear in retained author history; bounded to 8 MiB of JSON, amortized per save boundary. | |
| eve::Result< PreparedRoadPresetEdit > | prepareRestore (const eve::Value &value) const |
| Decode, migrate and resolve every history frame privately before issuing a commit token. | |
静态 Public 成员函数 | |
| static eve::Result< std::unique_ptr< RoadPresetDocument > > | create (RoadPresetDraft draft) |
| Build a document after validating its complete author state. | |
详细描述
Single owner of source author graph, shared definitions, bindings and bounded undo history. Synchronous owner-thread only, callback-free; all inputs are owning copies. Resolved networks are derived values.
在文件 RoadPresetDocument.h 第 131 行定义.
构造及析构函数说明
◆ ~RoadPresetDocument()
|
default |
Release document and all author history; outstanding tokens cannot target another document.
◆ RoadPresetDocument()
|
delete |
成员函数说明
◆ beginEdit()
| RoadPresetDraft eve::procgen_editing::RoadPresetDocument::beginEdit | ( | ) | const |
Begin an owning edit builder; modifying it cannot change the live document. @cost Linear copy of current author data, amortized per edit transaction.
在文件 RoadPresetDocument.cpp 第 589 行定义.
◆ capture()
| eve::Result< eve::Value > eve::procgen_editing::RoadPresetDocument::capture | ( | ) | const |
Capture canonical author history and cursor; derived networks and runtime tokens are not serialized. @cost Linear in retained author history; bounded to 8 MiB of JSON, amortized per save boundary.
在文件 RoadPresetDocument.cpp 第 664 行定义.
引用了 eve::Result< T >::failure(), state, eve::Result< T >::success(), eve::editing::toPresentationValue() , 以及 value.
◆ commit()
| eve::Result< void > eve::procgen_editing::RoadPresetDocument::commit | ( | PreparedRoadPresetEdit | edit | ) |
Publish a validated token if its owner/revision still matches; reject stale, foreign or consumed tokens.
- 返回
- Success or diagnostic; failure preserves state and redo history. @cost At most 128 shared history references; no graph resolution or baking at commit.
在文件 RoadPresetDocument.cpp 第 631 行定义.
引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::PreconditionViolation , 以及 eve::Result< T >::success().
◆ create()
|
static |
Build a document after validating its complete author state.
- 返回
- Owning document or diagnostic; no partial state escapes. @cost Graph-sized validation and definition resolution, amortized at author document creation.
在文件 RoadPresetDocument.cpp 第 581 行定义.
◆ network()
| const RoadNetwork & eve::procgen_editing::RoadPresetDocument::network | ( | ) | const |
Return an immutable resolved graph for direct bakeRoadNetwork consumption. @ownership Borrowed from this document; valid until commit, undo, redo or destruction. @thread Owner-thread synchronous scope only; do not retain across edits.
在文件 RoadPresetDocument.cpp 第 590 行定义.
◆ operator=()
|
delete |
◆ prepare()
| eve::Result< PreparedRoadPresetEdit > eve::procgen_editing::RoadPresetDocument::prepare | ( | RoadPresetDraft | draft | ) | const |
Validate and resolve an owning builder without publishing it.
- 返回
- Instance/revision-bound opaque commit token or diagnostic. @cost Definition traversal and graph copies plus bound-edge validation, amortized per author transaction.
在文件 RoadPresetDocument.cpp 第 591 行定义.
引用了 binding, draft, eve::Result< T >::failure(), impl, nodeId, previous, state , 以及 eve::Result< T >::success().
◆ prepareRestore()
| eve::Result< PreparedRoadPresetEdit > eve::procgen_editing::RoadPresetDocument::prepareRestore | ( | const eve::Value & | value | ) | const |
Decode, migrate and resolve every history frame privately before issuing a commit token.
- 返回
- Prepared restore or diagnostic; unknown object fields ignored, unknown schema/version rejected. @cost Linear history decoding plus graph resolution, amortized per explicit load boundary.
在文件 RoadPresetDocument.cpp 第 679 行定义.
引用了 cursor, draft, eve::Result< T >::failure(), frame, eve::procgen::road::Linear, eve::procgen::road::MaximumIntervals, state, eve::Result< T >::success(), eve::editing::toEditingValue(), eve::Value::toJson(), type, value , 以及 version.
◆ redo()
| eve::Result< void > eve::procgen_editing::RoadPresetDocument::redo | ( | ) |
Restore the next complete author/derived state as a new document revision.
在文件 RoadPresetDocument.cpp 第 658 行定义.
◆ undo()
| eve::Result< void > eve::procgen_editing::RoadPresetDocument::undo | ( | ) |
Restore the prior complete author/derived state as a new document revision.
在文件 RoadPresetDocument.cpp 第 652 行定义.
该类的文档由以下文件生成:
- src/modules/procgen/editing/RoadPresetDocument.h
- src/modules/procgen/editing/RoadPresetDocument.cpp