Document Class

(QmlJS::Document)

The Document class creates a QML or JavaScript document. More...

Header: #include <Document>

Detailed Description

Documents are usually created by the ModelManagerInterface and stored in a Snapshot. They allow access to data such as the file path, source code, abstract syntax tree and the Bind instance for the document.

To make sure unused and outdated documents are removed correctly, Document instances are usually accessed through a shared pointer, see Document::Ptr.

Documents in a Snapshot are immutable: They, or anything reachable through them, must not be changed. This allows Documents to be shared freely among threads without extra synchronization.

See also Snapshot.