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
QQmlTypeNameCache Class Referencefinal

#include <qqmltypenamecache_p.h>

+ Inheritance diagram for QQmlTypeNameCache:
+ Collaboration diagram for QQmlTypeNameCache:

Classes

struct  Result
 

Public Types

enum class  QueryNamespaced { No , Yes }
 

Public Member Functions

 QQmlTypeNameCache (const QQmlRefPointer< QQmlImports > &imports)
 
 ~QQmlTypeNameCache ()
 
bool isEmpty () const
 
void add (const QHashedString &name, int sciptIndex=-1, const QHashedString &nameSpace=QHashedString())
 
void add (const QHashedString &name, const QUrl &url, const QHashedString &nameSpace=QHashedString())
 
template<QQmlImport::RecursionRestriction recursionRestriction = QQmlImport::PreventRecursion>
Result query (const QHashedStringRef &key, QQmlTypeLoader *typeLoader) const
 
template<QueryNamespaced queryNamespaced = QueryNamespaced::Yes>
Result query (const QHashedStringRef &key, const QQmlImportRef *importNamespace, QQmlTypeLoader *typeLoader) const
 
template<QQmlImport::RecursionRestriction recursionRestriction = QQmlImport::PreventRecursion>
Result query (const QV4::String *key, QQmlTypeLoader *typeLoader) const
 
template<QueryNamespaced queryNamespaced = QueryNamespaced::Yes>
Result query (const QV4::String *key, const QQmlImportRef *importNamespace, QQmlTypeLoader *typeLoader) const
 
- Public Member Functions inherited from QQmlRefCounted< QQmlTypeNameCache >
void release () const
 
- Public Member Functions inherited from QQmlRefCount
 QQmlRefCount ()
 
void addref () const
 
int count () const
 

Friends

class QQmlImports
 

Additional Inherited Members

- Protected Member Functions inherited from QQmlRefCounted< QQmlTypeNameCache >
 ~QQmlRefCounted ()
 

Detailed Description

Definition at line 48 of file qqmltypenamecache_p.h.

Member Enumeration Documentation

◆ QueryNamespaced

Enumerator
No 
Yes 

Definition at line 72 of file qqmltypenamecache_p.h.

Constructor & Destructor Documentation

◆ QQmlTypeNameCache()

QQmlTypeNameCache::QQmlTypeNameCache ( const QQmlRefPointer< QQmlImports > & imports)
inline

Definition at line 51 of file qqmltypenamecache_p.h.

◆ ~QQmlTypeNameCache()

QQmlTypeNameCache::~QQmlTypeNameCache ( )
inline

Definition at line 52 of file qqmltypenamecache_p.h.

Member Function Documentation

◆ add() [1/2]

QT_BEGIN_NAMESPACE void QQmlTypeNameCache::add ( const QHashedString & name,
const QUrl & url,
const QHashedString & nameSpace = QHashedString() )

Definition at line 8 of file qqmltypenamecache.cpp.

References QStringHash< T >::contains(), i, QStringHash< T >::insert(), Q_ASSERT, QString::size(), url, and QStringHash< T >::value().

+ Here is the call graph for this function:

◆ add() [2/2]

void QQmlTypeNameCache::add ( const QHashedString & name,
int sciptIndex = -1,
const QHashedString & nameSpace = QHashedString() )

Definition at line 23 of file qqmltypenamecache.cpp.

References QStringHash< T >::contains(), i, QStringHash< T >::insert(), QMap< Key, T >::insert(), Q_ASSERT, QQmlImportRef::scriptIndex, QString::size(), and QStringHash< T >::value().

Referenced by QQmlScriptBlob::done(), and QQmlTypeData::done().

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

◆ isEmpty()

bool QQmlTypeNameCache::isEmpty ( ) const
inline

Definition at line 269 of file qqmltypenamecache_p.h.

References QStringHash< T >::isEmpty().

+ Here is the call graph for this function:

◆ query() [1/4]

template<QueryNamespaced queryNamespaced = QueryNamespaced::Yes>
Result QQmlTypeNameCache::query ( const QHashedStringRef & key,
const QQmlImportRef * importNamespace,
QQmlTypeLoader * typeLoader ) const
inline

Definition at line 83 of file qqmltypenamecache_p.h.

◆ query() [2/4]

template<QQmlImport::RecursionRestriction recursionRestriction = QQmlImport::PreventRecursion>
Result QQmlTypeNameCache::query ( const QHashedStringRef & key,
QQmlTypeLoader * typeLoader ) const
inline

Definition at line 77 of file qqmltypenamecache_p.h.

Referenced by QQmlBindPrivate::decodeBinding(), and QQmlCustomParser::evaluateEnum().

+ Here is the caller graph for this function:

◆ query() [3/4]

template<QueryNamespaced queryNamespaced = QueryNamespaced::Yes>
Result QQmlTypeNameCache::query ( const QV4::String * key,
const QQmlImportRef * importNamespace,
QQmlTypeLoader * typeLoader ) const
inline

Definition at line 96 of file qqmltypenamecache_p.h.

◆ query() [4/4]

template<QQmlImport::RecursionRestriction recursionRestriction = QQmlImport::PreventRecursion>
Result QQmlTypeNameCache::query ( const QV4::String * key,
QQmlTypeLoader * typeLoader ) const
inline

Definition at line 90 of file qqmltypenamecache_p.h.

Friends And Related Symbol Documentation

◆ QQmlImports

friend class QQmlImports
friend

Definition at line 103 of file qqmltypenamecache_p.h.


The documentation for this class was generated from the following files: