Extending Qt Creator Manual | Bind

Extending Qt Creator Manual 4.4.0

# Bind Class

(QmlJS::Bind)

The Bind class collects information about a single Document. More...

Header: | #include <Bind>

- List of all members, including inherited members

## Public Functions

| Bind(Document *doc, QList<DiagnosticMessage> *messages, bool isJsLibrary, const QList<ImportInfo> &jsImports)
| ~Bind()
ObjectValue * | findAttachedJSScope(AST::Node *node) const
ObjectValue * | findQmlObject(AST::Node *node) const
ObjectValue * | idEnvironment() const
QList<ImportInfo> | imports() const
bool | isGroupedPropertyBinding(AST::Node *node) const
bool | isJsLibrary() const
ObjectValue * | rootObjectValue() const
bool | usesQmlPrototype(ObjectValue *prototype, const ContextPtr &context) const

## Protected Functions

void | accept(AST::Node *node)
ObjectValue * | bindObject(AST::UiQualifiedId *qualifiedTypeNameId, AST::UiObjectInitializer *initializer)
ObjectValue * | switchObjectValue(ObjectValue *newObjectValue)
bool | visit(AST::UiProgram *ast) override
bool | visit(AST::Program *ast) override
bool | visit(AST::UiImport *ast) override
bool | visit(AST::UiPublicMember *ast) override
bool | visit(AST::UiObjectDefinition *ast) override
bool | visit(AST::UiObjectBinding *ast) override
bool | visit(AST::UiScriptBinding *ast) override
bool | visit(AST::UiArrayBinding *ast) override
bool | visit(AST::FunctionDeclaration *ast) override
bool | visit(AST::FunctionExpression *ast) override
bool | visit(AST::VariableDeclaration *ast) override

## Detailed Description

The Bind class collects information about a single Document.

Each Document owns an instance of Bind. It provides access to data that can be derived by looking at the document in isolation. If you need information that goes beyond that, you need to use a Context.

The document's imports are classified and available through imports().

This class makes the structural information found in the AST available for analysis through Value instances. See findQmlObject(), idEnvironment(), rootObjectValue() and findAttachedJSScope().

See also Document and Context.

## Member Function Documentation

### Bind::Bind(Document *doc, QList<DiagnosticMessage> *messages, bool isJsLibrary, const QList<ImportInfo> &jsImports)

Default constructs an instance of Bind.

### Bind::~Bind()

Destroys the instance of Bind.

### `[protected]` void Bind::accept(AST::Node *node)

### `[protected]` ObjectValue *Bind::bindObject(AST::UiQualifiedId *qualifiedTypeNameId, AST::UiObjectInitializer *initializer)

### ObjectValue *Bind::findAttachedJSScope(AST::Node *node) const

### ObjectValue *Bind::findQmlObject(AST::Node *node) const

### ObjectValue *Bind::idEnvironment() const

### QList<ImportInfo> Bind::imports() const

### bool Bind::isGroupedPropertyBinding(AST::Node *node) const

### bool Bind::isJsLibrary() const

### ObjectValue *Bind::rootObjectValue() const

### `[protected]` ObjectValue *Bind::switchObjectValue(ObjectValue *newObjectValue)

### bool Bind::usesQmlPrototype(ObjectValue *prototype, const ContextPtr &context) const

### `[protected]` bool Bind::visit(AST::UiProgram *ast)

### `[protected]` bool Bind::visit(AST::Program *ast)

### `[protected]` bool Bind::visit(AST::UiImport *ast)

### `[protected]` bool Bind::visit(AST::UiPublicMember *ast)

### `[protected]` bool Bind::visit(AST::UiObjectDefinition *ast)

### `[protected]` bool Bind::visit(AST::UiObjectBinding *ast)

### `[protected]` bool Bind::visit(AST::UiScriptBinding *ast)

### `[protected]` bool Bind::visit(AST::UiArrayBinding *ast)

### `[protected]` bool Bind::visit(AST::FunctionDeclaration *ast)

### `[protected]` bool Bind::visit(AST::FunctionExpression *ast)

### `[protected]` bool Bind::visit(AST::VariableDeclaration *ast)