|
|
| DocumentState () |
| | Create a new empty document state.
|
| | DocumentState (std::shared_ptr< Registry > registry) |
| | Wrap an existing shared registry.
|
|
Registry & | registry () |
| | Get the underlying ECS registry.
|
|
const Registry & | registry () const |
| | Get the underlying ECS registry.
|
|
std::shared_ptr< Registry > | sharedRegistry () const |
| | Get the shared registry retained by this state.
|
| const std::shared_ptr< xml::components::XMLSourceStoreHolder > & | sourceStoreHolder () const |
| | The holder of the XML source store of a document built on an XML tree, or null for one built without an XML tree.
|
| void | setSourceStoreHolder (std::shared_ptr< xml::components::XMLSourceStoreHolder > sourceStoreHolder) |
| | Records the holder of the document's source store.
|
|
DocumentReadAccess | read () |
| | Acquire read access to the document.
|
|
DocumentWriteAccess | write () |
| | Acquire write access to the document.
|
|
std::optional< DocumentWriteAccess > | tryWrite () |
| | Try to acquire write access without waiting.
|
|
std::uint64_t | revision () const |
| | Current document mutation revision.
|
|
std::uint64_t | mutationSequence () const |
| | Latest mutation-log sequence number.
|
| DocumentMutationLogSnapshot | mutationRecordsSince (std::uint64_t afterSequence) const |
| | Return mutation records after a previously observed sequence.
|
|
DocumentAccessDiagnostics | accessDiagnostics () const |
| | Current document access diagnostics.
|
| void | resetAccessDiagnostics () |
| | Reset cumulative access diagnostics.
|
|
bool | currentThreadHasWriteAccess () const |
| | Returns true if this thread currently holds write access to this document.
|
|
bool | currentThreadHasAccess () const |
| | Returns true if this thread currently holds read or write access to this document.
|
|
void | bumpMutationRevision () |
| | Mark the document as mutated.
|
|
DetachedNodeState & | detachedNodeState () |
| | Detached-node collection state for this document.
|
|
const DetachedNodeState & | detachedNodeState () const |
| | Detached-node collection state for this document.
|
|
DetachedNodeCollectionDeferral | deferDetachedNodeCollection () |
| | Defer detached-node collection while a render snapshot or observer epoch may use it.
|
|
bool | hasActiveDetachedNodeCollectionDeferral () const |
| | Returns true when a render snapshot or observer epoch is deferring collection.
|
|
std::uint64_t | activeDetachedNodeCollectionEpoch () const |
| | Current detached-node collection epoch high-water.
|
|
ThreadingMode | threadingMode () const |
| | Current DOM threading policy.
|
| void | setThreadingMode (ThreadingMode mode) |
| | Set the DOM threading policy.
|
Shared mutable state behind SVGDocument and SVGElement facades.
This currently owns the ECS registry and a mutation revision. It is intentionally a thin indirection layer so later phases can add reader/writer guards and render snapshots without changing the public DOM handles again.
The holder of the XML source store of a document built on an XML tree, or null for one built without an XML tree.
The holder's store is null while the document has no source text.
The holder's own home is the registry context, but finding it there reads the context's map, which a thread holding the document's write access, a render worker preparing a frame, can be reshaping at the same moment. This copy lives outside the registry, so a thread that only reads the source can reach the store without document access. It is the holder rather than the store because xml::XMLDocument::setSource replaces the store inside the holder.