Link Class | Extending Qt Creator Manual

Extending Qt Creator Manual | Link

Extending Qt Creator Manual 4.4.1

# Link Class

(QmlJS::Link)

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

Header: | #include <Link>

- List of all members, including inherited members

## Public Functions

| Link(const Snapshot &snapshot, const ViewerContext &vContext, const LibraryInfo &builtins)
| ~Link()
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

### Link::Link(const Snapshot &snapshot, const ViewerContext &vContext, const LibraryInfo &builtins)

Default constructs an instance of Link.

### Link::~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)