Link Class


The Link class creates a Context for a Snapshot. More...

Header: #include <Link>

Public Functions

Link(const Snapshot &snapshot, const ViewerContext &vContext, const LibraryInfo &builtins)
ContextPtr operator()(QHash<QString, QList<DiagnosticMessage> > *messages = 0)
ContextPtr operator()(const Document::Ptr &doc, QList<DiagnosticMessage> *messages)

Detailed Description

The Link class creates a Context for a Snapshot.

Initializes a context by resolving imports. This is an expensive operation.

Instead of making a fresh context, consider reusing the one maintained in the QmlJSEditor::SemanticInfo of a QmlJSEditor::QmlJSEditorDocument.

See also Context and Snapshot.

Member Function Documentation

Default constructs an instance of Link.

Destroys the instance of Link.

ContextPtr Link::operator()(QHash<QString, QList<DiagnosticMessage> > *messages = 0)

ContextPtr Link::operator()(const Document::Ptr &doc, QList<DiagnosticMessage> *messages)