Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQmlJS::ContextualTypes Struct Reference

#include <qqmljscontextualtypes_p.h>

+ Collaboration diagram for QQmlJS::ContextualTypes:

Public Types

enum  CompileContext { INTERNAL , QML }
 

Public Member Functions

 ContextualTypes (CompileContext context, const QHash< QString, ImportedScope< QQmlJSScope::ConstPtr > > types, const QQmlJSScope::ConstPtr &arrayType)
 
CompileContext context () const
 
QQmlJSScope::ConstPtr arrayType () const
 
bool hasType (const QString &name) const
 
ImportedScope< QQmlJSScope::ConstPtrtype (const QString &name) const
 
QString name (const QQmlJSScope::ConstPtr &type) const
 
void setType (const QString &name, const ImportedScope< QQmlJSScope::ConstPtr > &type)
 
void clearType (const QString &name)
 
bool isNullType (const QString &name) const
 
void addTypes (ContextualTypes &&types)
 
void addTypes (const ContextualTypes &types)
 
const QHash< QString, ImportedScope< QQmlJSScope::ConstPtr > > & types () const
 
void clearTypes ()
 

Detailed Description

Maps type names to types and the compile context of the types. The context can be INTERNAL (for c++ and synthetic jsrootgen types) or QML (for qml types).

Definition at line 28 of file qqmljscontextualtypes_p.h.

Member Enumeration Documentation

◆ CompileContext

Enumerator
INTERNAL 
QML 

Definition at line 30 of file qqmljscontextualtypes_p.h.

Constructor & Destructor Documentation

◆ ContextualTypes()

QQmlJS::ContextualTypes::ContextualTypes ( CompileContext context,
const QHash< QString, ImportedScope< QQmlJSScope::ConstPtr > > types,
const QQmlJSScope::ConstPtr & arrayType )
inline

Definition at line 32 of file qqmljscontextualtypes_p.h.

Member Function Documentation

◆ addTypes() [1/2]

void QQmlJS::ContextualTypes::addTypes ( const ContextualTypes & types)
inline

Definition at line 77 of file qqmljscontextualtypes_p.h.

References Q_ASSERT.

◆ addTypes() [2/2]

void QQmlJS::ContextualTypes::addTypes ( ContextualTypes && types)
inline

Definition at line 70 of file qqmljscontextualtypes_p.h.

References Q_ASSERT.

Referenced by QQmlJSImportVisitor::visit().

+ Here is the caller graph for this function:

◆ arrayType()

QQmlJSScope::ConstPtr QQmlJS::ContextualTypes::arrayType ( ) const
inline

Definition at line 42 of file qqmljscontextualtypes_p.h.

◆ clearType()

void QQmlJS::ContextualTypes::clearType ( const QString & name)
inline

Definition at line 55 of file qqmljscontextualtypes_p.h.

References it.

◆ clearTypes()

void QQmlJS::ContextualTypes::clearTypes ( )
inline

Definition at line 86 of file qqmljscontextualtypes_p.h.

Referenced by QQmlJSTypeResolver::init().

+ Here is the caller graph for this function:

◆ context()

CompileContext QQmlJS::ContextualTypes::context ( ) const
inline

Definition at line 41 of file qqmljscontextualtypes_p.h.

◆ hasType()

bool QQmlJS::ContextualTypes::hasType ( const QString & name) const
inline

Definition at line 44 of file qqmljscontextualtypes_p.h.

Referenced by QQmlJSImportVisitor::endVisit(), and QQmlJSImportVisitor::visit().

+ Here is the caller graph for this function:

◆ isNullType()

bool QQmlJS::ContextualTypes::isNullType ( const QString & name) const
inline

Definition at line 64 of file qqmljscontextualtypes_p.h.

References it.

Referenced by QQmlJSImportVisitor::isImportPrefix().

+ Here is the caller graph for this function:

◆ name()

QString QQmlJS::ContextualTypes::name ( const QQmlJSScope::ConstPtr & type) const
inline

Definition at line 47 of file qqmljscontextualtypes_p.h.

◆ setType()

void QQmlJS::ContextualTypes::setType ( const QString & name,
const ImportedScope< QQmlJSScope::ConstPtr > & type )
inline

Definition at line 49 of file qqmljscontextualtypes_p.h.

Referenced by QQmlJSImportVisitor::visit().

+ Here is the caller graph for this function:

◆ type()

ImportedScope< QQmlJSScope::ConstPtr > QQmlJS::ContextualTypes::type ( const QString & name) const
inline

Definition at line 46 of file qqmljscontextualtypes_p.h.

Referenced by QQmlJSImportVisitor::endVisit(), QQmlJSTypeResolver::typeFromAST(), and QQmlJSImportVisitor::visit().

+ Here is the caller graph for this function:

◆ types()

const QHash< QString, ImportedScope< QQmlJSScope::ConstPtr > > & QQmlJS::ContextualTypes::types ( ) const
inline

Definition at line 84 of file qqmljscontextualtypes_p.h.

Referenced by QQmlJSImportVisitor::breakInheritanceCycles().

+ Here is the caller graph for this function:

The documentation for this struct was generated from the following file: