Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QQmlJSScope::ContextualTypes Struct Reference

#include <qqmljsscope_p.h>

+ Collaboration diagram for QQmlJSScope::ContextualTypes:

Public Types

enum  CompileContext { INTERNAL , QML }
 

Public Member Functions

 ContextualTypes (CompileContext context, const QHash< QString, ImportedScope< ConstPtr > > types, const QQmlJSScope::ConstPtr &arrayType)
 
CompileContext context () const
 
ConstPtr arrayType () const
 
bool hasType (const QString &name) const
 
ImportedScope< ConstPtrtype (const QString &name) const
 
void setType (const QString &name, const ImportedScope< 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< 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 208 of file qqmljsscope_p.h.

Member Enumeration Documentation

◆ CompileContext

Enumerator
INTERNAL 
QML 

Definition at line 210 of file qqmljsscope_p.h.

Constructor & Destructor Documentation

◆ ContextualTypes()

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

Definition at line 212 of file qqmljsscope_p.h.

Member Function Documentation

◆ addTypes() [1/2]

void QQmlJSScope::ContextualTypes::addTypes ( const ContextualTypes types)
inline

Definition at line 247 of file qqmljsscope_p.h.

References Q_ASSERT.

◆ addTypes() [2/2]

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

Definition at line 241 of file qqmljsscope_p.h.

References Q_ASSERT.

Referenced by QQmlJSImportVisitor::visit().

+ Here is the caller graph for this function:

◆ arrayType()

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

Definition at line 222 of file qqmljsscope_p.h.

Referenced by QQmlJSScope::resolveTypes().

+ Here is the caller graph for this function:

◆ clearType()

void QQmlJSScope::ContextualTypes::clearType ( const QString name)
inline

Definition at line 230 of file qqmljsscope_p.h.

◆ clearTypes()

void QQmlJSScope::ContextualTypes::clearTypes ( )
inline

Definition at line 255 of file qqmljsscope_p.h.

Referenced by QQmlJSTypeResolver::init().

+ Here is the caller graph for this function:

◆ context()

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

Definition at line 221 of file qqmljsscope_p.h.

Referenced by QQmlJSScope::findType().

+ Here is the caller graph for this function:

◆ hasType()

bool QQmlJSScope::ContextualTypes::hasType ( const QString name) const
inline

Definition at line 224 of file qqmljsscope_p.h.

Referenced by QQmlJSImportVisitor::endVisit(), QQmlSA::PassManager::hasImportedModule(), and QQmlJSImportVisitor::visit().

+ Here is the caller graph for this function:

◆ isNullType()

bool QQmlJSScope::ContextualTypes::isNullType ( const QString name) const
inline

Definition at line 235 of file qqmljsscope_p.h.

References QSet< T >::constEnd(), QSet< T >::constFind(), and it.

Referenced by QQmlJSImportVisitor::isImportPrefix().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setType()

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

Definition at line 226 of file qqmljsscope_p.h.

Referenced by QQmlJSImportVisitor::visit().

+ Here is the caller graph for this function:

◆ type()

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

Definition at line 225 of file qqmljsscope_p.h.

Referenced by QQmlJSTypeResolver::QQmlJSTypeResolver(), QQmlJSImportVisitor::endVisit(), QQmlSA::GenericPass::resolveBuiltinType(), QQmlSA::GenericPass::resolveType(), QQmlSA::GenericPass::resolveTypeInFileScope(), QQmlJSTypeResolver::typeFromAST(), and QQmlJSImportVisitor::visit().

+ Here is the caller graph for this function:

◆ types()

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

Definition at line 253 of file qqmljsscope_p.h.

Referenced by QQmlJSImportVisitor::breakInheritanceCycles(), QQmlJSScope::findType(), and qFindInlineComponents().

+ Here is the caller graph for this function:

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