|
| std::uint64_t | contentState () const noexcept |
| | TextHistory (TextHistoryOptions options={}, WidthPolicy policy={}, TextLimits limits={}) |
| | Create an empty history under immutable text validation settings.
|
|
| ~TextHistory () |
| | Release all owning history storage.
|
|
| TextHistory (const TextHistory &)=delete |
|
TextHistory & | operator= (const TextHistory &)=delete |
| std::expected< PreparedTextHistory, TextHistoryError > | prepareEdit (const TextHistorySnapshot &before, const TextHistorySnapshot &after, TextHistoryKind kind) const |
| | Prepare a whole edit without changing this history.
|
| std::expected< PreparedTextHistory, TextHistoryError > | prepareUndo () const |
| | Stage one undo with restoration segmentation under captured settings.
|
| std::expected< PreparedTextHistory, TextHistoryError > | prepareRedo () const |
| | Stage one redo with restoration segmentation under captured settings.
|
| std::expected< PreparedTextHistory, TextHistoryError > | prepareResetBaseline (const TextHistorySnapshot &baseline) const |
| | Validate a new external baseline and stage clearing every group, even for equal bytes.
|
| std::expected< void, TextHistoryError > | checkPrepared (const PreparedTextHistory &prepared) const noexcept |
| | Check that a prepared value can be committed before publishing its text.
|
| std::expected< void, TextHistoryError > | commit (PreparedTextHistory &&prepared) noexcept |
| | Publish prepared history without allocation or callbacks.
|
|
void | stopGrouping () noexcept |
| | End the open editing group; invalidates outstanding staging without allocation.
|
| bool | canUndo () const noexcept |
| | Query local undo availability; editor eligibility belongs to the external owner.
|
| bool | canRedo () const noexcept |
| | Query local redo availability.
|
| std::size_t | operationCount () const noexcept |
| | Count all retained undo and redo groups.
|
| std::size_t | retainedBytes () const noexcept |
| | Query retained logical memory, excluding documented overhead.
|
Specialized owning text history with allocation-free publication.
Values contain no editor, model, widget, callback or external buffer references. The caller synchronizes operations; editor owners normally use their UI thread. All retained undo and redo groups share one count and logical memory budget. Memory counts sizeof(entry), both string capacities, and an optional pair of content-state tokens per group when tracking is enabled. Container storage, shared ownership control blocks, allocator bookkeeping, the current editor text and temporary staging allocations are excluded; this is not an RSS cap. Staging copies only shared entry handles, never all retained strings. Constructor allocations may throw; prepare methods return NO_MEMORY instead.