Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlJS::Dom::ModuleIndex Class Referencefinal

#include <qqmldommoduleindex_p.h>

+ Inheritance diagram for QQmlJS::Dom::ModuleIndex:
+ Collaboration diagram for QQmlJS::Dom::ModuleIndex:

Public Types

enum class  Status { NotLoaded , Loading , Loaded }
 
- Public Types inherited from QQmlJS::Dom::DomBase
using FilterT = function_ref< bool(DomItem &, const PathEls::PathComponent &, DomItem &)>
 

Public Member Functions

DomType kind () const override
 
 ModuleIndex (QString uri, int majorVersion, int derivedFrom=0, QDateTime lastDataUpdateAt=QDateTime::fromMSecsSinceEpoch(0, QTimeZone::UTC))
 
 ModuleIndex (const ModuleIndex &o)
 
 ~ModuleIndex ()
 
std::shared_ptr< ModuleIndexmakeCopy (DomItem &self) const
 
Path canonicalPath (DomItem &) const override
 
bool iterateDirectSubpaths (DomItem &self, DirectVisitor visitor) override
 
QSet< QStringexportNames (DomItem &self) const
 
QList< DomItemexportsWithNameAndMinorVersion (DomItem &self, QString name, int minorVersion) const
 
QString uri () const
 
int majorVersion () const
 
QList< Pathsources () const
 
QList< int > minorVersions () const
 
ModuleScopeensureMinorVersion (int minorVersion)
 
void mergeWith (std::shared_ptr< ModuleIndex > o)
 
void addQmltypeFilePath (Path p)
 
QList< PathqmldirsToLoad (DomItem &self)
 
QList< PathqmltypesFilesPaths () const
 
QList< PathqmldirPaths () const
 
QList< PathdirectoryPaths () const
 
QList< DomItemautoExports (DomItem &self) const
 
- Public Member Functions inherited from QQmlJS::Dom::OwningItem
 OwningItem (const OwningItem &o)
 
 OwningItem (int derivedFrom=0)
 
 OwningItem (int derivedFrom, QDateTime lastDataUpdateAt)
 
 OwningItem (const OwningItem &&)=delete
 
OwningItemoperator= (const OwningItem &&)=delete
 
Path canonicalPath (DomItem &self) const override=0
 
bool iterateDirectSubpaths (DomItem &self, DirectVisitor) override
 
std::shared_ptr< OwningItemmakeCopy (DomItem &self) const
 
Path pathFromOwner () const
 
Path pathFromOwner (DomItem &) const override final
 
DomItem containingObject (DomItem &self) const override
 
int derivedFrom () const
 
virtual int revision () const
 
QDateTime createdAt () const
 
virtual QDateTime lastDataUpdateAt () const
 
virtual void refreshedDataAt (QDateTime tNew)
 
virtual bool frozen () const
 
virtual bool freeze ()
 
QDateTime frozenAt () const
 
virtual void addError (DomItem &self, ErrorMessage msg)
 
void addErrorLocal (ErrorMessage msg)
 
void clearErrors (ErrorGroups groups=ErrorGroups({}))
 
bool iterateErrors (DomItem &self, function_ref< bool(DomItem source, ErrorMessage msg)> visitor, Path inPath=Path())
 
QMultiMap< Path, ErrorMessagelocalErrors () const
 
virtual bool iterateSubOwners (DomItem &self, function_ref< bool(DomItem &owner)> visitor)
 
QBasicMutexmutex () const
 
- Public Member Functions inherited from QQmlJS::Dom::DomBase
virtual ~DomBase ()=default
 
DomBasedomBase ()
 
virtual DomType kind () const =0
 
virtual DomKind domKind () const
 
virtual Path pathFromOwner (DomItem &self) const =0
 
virtual Path canonicalPath (DomItem &self) const =0
 
virtual bool iterateDirectSubpaths (DomItem &self, DirectVisitor visitor)=0
 
bool iterateDirectSubpathsConst (DomItem &self, DirectVisitor) const
 
virtual DomItem containingObject (DomItem &self) const
 
virtual void dump (DomItem &, Sink sink, int indent, FilterT filter) const
 
virtual quintptr id () const
 
QString typeName () const
 
virtual QList< QStringfields (DomItem &self) const
 
virtual DomItem field (DomItem &self, QStringView name) const
 
virtual index_type indexes (DomItem &self) const
 
virtual DomItem index (DomItem &self, index_type index) const
 
virtual QSet< QString > const keys (DomItem &self) const
 
virtual DomItem key (DomItem &self, QString name) const
 
virtual QString canonicalFilePath (DomItem &self) const
 
virtual void writeOut (DomItem &self, OutWriter &lw) const
 
virtual QCborValue value () const
 

Static Public Attributes

static constexpr DomType kindValue = DomType::ModuleIndex
 

Protected Member Functions

std::shared_ptr< OwningItemdoCopy (DomItem &self) const override
 
virtual std::shared_ptr< OwningItemdoCopy (DomItem &self) const =0
 

Additional Inherited Members

- Static Public Member Functions inherited from QQmlJS::Dom::OwningItem
static int nextRevision ()
 

Detailed Description

Definition at line 52 of file qqmldommoduleindex_p.h.

Member Enumeration Documentation

◆ Status

Enumerator
NotLoaded 
Loading 
Loaded 

Definition at line 60 of file qqmldommoduleindex_p.h.

Constructor & Destructor Documentation

◆ ModuleIndex() [1/2]

QQmlJS::Dom::ModuleIndex::ModuleIndex ( QString  uri,
int  majorVersion,
int  derivedFrom = 0,
QDateTime  lastDataUpdateAt = QDateTime::fromMSecsSinceEpoch(0, QTimeZone::UTC) 
)
inline

Definition at line 64 of file qqmldommoduleindex_p.h.

◆ ModuleIndex() [2/2]

QQmlJS::Dom::ModuleIndex::ModuleIndex ( const ModuleIndex o)

Definition at line 81 of file qqmldommoduleindex.cpp.

References QMap< Key, T >::begin(), QMap< Key, T >::end(), ensureMinorVersion(), it, and o.

+ Here is the call graph for this function:

◆ ~ModuleIndex()

QQmlJS::Dom::ModuleIndex::~ModuleIndex ( )

Definition at line 100 of file qqmldommoduleindex.cpp.

References QMap< Key, T >::begin(), QMap< Key, T >::end(), it, and QQmlJS::Dom::OwningItem::mutex().

+ Here is the call graph for this function:

Member Function Documentation

◆ addQmltypeFilePath()

void QQmlJS::Dom::ModuleIndex::addQmltypeFilePath ( Path  p)
inline

Definition at line 102 of file qqmldommoduleindex_p.h.

References mutex.

◆ autoExports()

QList< DomItem > QQmlJS::Dom::ModuleIndex::autoExports ( DomItem self) const

Definition at line 164 of file qqmldommoduleindex.cpp.

References QQmlJS::Dom::RefCacheEntry::addForPath(), QQmlJS::Dom::RefCacheEntry::All, QList< T >::append(), autoExports(), QQmlJS::Dom::RefCacheEntry::cached, canonicalPath(), QQmlJS::Dom::RefCacheEntry::canonicalPaths, QListSpecialMethodsBase< T >::contains(), QSet< T >::contains(), QQmlJS::Dom::Path::field(), QQmlJS::Dom::RefCacheEntry::First, QQmlJS::Dom::RefCacheEntry::forPath(), i, QSet< T >::insert(), QList< T >::isEmpty(), QQmlJS::Dom::RefCacheEntry::None, QQmlJS::Dom::DomItem::path(), qWarning, and sources().

Referenced by autoExports(), and iterateDirectSubpaths().

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

◆ canonicalPath()

Path QQmlJS::Dom::ModuleIndex::canonicalPath ( DomItem ) const
inlineoverridevirtual

Implements QQmlJS::Dom::OwningItem.

Definition at line 79 of file qqmldommoduleindex_p.h.

Referenced by autoExports().

+ Here is the caller graph for this function:

◆ directoryPaths()

QList< Path > QQmlJS::Dom::ModuleIndex::directoryPaths ( ) const
inline

Definition at line 120 of file qqmldommoduleindex_p.h.

References mutex.

◆ doCopy()

std::shared_ptr< OwningItem > QQmlJS::Dom::ModuleIndex::doCopy ( DomItem self) const
overrideprotectedvirtual

Implements QQmlJS::Dom::OwningItem.

Definition at line 76 of file qqmldommoduleindex.cpp.

◆ ensureMinorVersion()

ModuleScope * QQmlJS::Dom::ModuleIndex::ensureMinorVersion ( int  minorVersion)

Definition at line 293 of file qqmldommoduleindex.cpp.

References it, QQmlJS::Dom::Version::Latest, majorVersion(), QQmlJS::Dom::OwningItem::mutex(), and qScopeGuard().

Referenced by ModuleIndex(), iterateDirectSubpaths(), and mergeWith().

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

◆ exportNames()

QSet< QString > QQmlJS::Dom::ModuleIndex::exportNames ( DomItem self) const

Definition at line 153 of file qqmldommoduleindex.cpp.

References QList< T >::at(), i, QList< T >::size(), and sources().

+ Here is the call graph for this function:

◆ exportsWithNameAndMinorVersion()

◆ iterateDirectSubpaths()

bool QQmlJS::Dom::ModuleIndex::iterateDirectSubpaths ( DomItem self,
DirectVisitor  visitor 
)
overridevirtual

Implements QQmlJS::Dom::DomBase.

Definition at line 116 of file qqmldommoduleindex.cpp.

References autoExports(), Qt::CaseInsensitive, QString::compare(), el, ensureMinorVersion(), QQmlJS::Dom::DomBase::field(), QString::isEmpty(), QList< T >::isEmpty(), QQmlJS::Dom::Version::Latest, majorVersion(), map, minorVersions(), QString::number(), ok, QQmlJS::Dom::OwningItem::pathFromOwner(), sources(), QString::toInt(), and uri().

+ Here is the call graph for this function:

◆ kind()

DomType QQmlJS::Dom::ModuleIndex::kind ( ) const
inlineoverridevirtual

Implements QQmlJS::Dom::DomBase.

Definition at line 62 of file qqmldommoduleindex_p.h.

◆ majorVersion()

int QQmlJS::Dom::ModuleIndex::majorVersion ( ) const
inline

Definition at line 92 of file qqmldommoduleindex_p.h.

Referenced by ensureMinorVersion(), exportsWithNameAndMinorVersion(), iterateDirectSubpaths(), and qmldirsToLoad().

+ Here is the caller graph for this function:

◆ makeCopy()

std::shared_ptr< ModuleIndex > QQmlJS::Dom::ModuleIndex::makeCopy ( DomItem self) const
inline

Definition at line 74 of file qqmldommoduleindex_p.h.

◆ mergeWith()

void QQmlJS::Dom::ModuleIndex::mergeWith ( std::shared_ptr< ModuleIndex o)

Definition at line 320 of file qqmldommoduleindex.cpp.

References QMap< Key, T >::begin(), QMap< Key, T >::end(), ensureMinorVersion(), it, QQmlJS::Dom::OwningItem::mutex(), and o.

+ Here is the call graph for this function:

◆ minorVersions()

QList< int > QQmlJS::Dom::ModuleIndex::minorVersions ( ) const
inline

Definition at line 95 of file qqmldommoduleindex_p.h.

References mutex.

Referenced by iterateDirectSubpaths().

+ Here is the caller graph for this function:

◆ qmldirPaths()

QList< Path > QQmlJS::Dom::ModuleIndex::qmldirPaths ( ) const
inline

Definition at line 115 of file qqmldommoduleindex_p.h.

References mutex.

Referenced by qmldirsToLoad().

+ Here is the caller graph for this function:

◆ qmldirsToLoad()

QList< Path > QQmlJS::Dom::ModuleIndex::qmldirsToLoad ( DomItem self)

◆ qmltypesFilesPaths()

QList< Path > QQmlJS::Dom::ModuleIndex::qmltypesFilesPaths ( ) const
inline

Definition at line 110 of file qqmldommoduleindex_p.h.

References mutex.

◆ sources()

QList< Path > QQmlJS::Dom::ModuleIndex::sources ( ) const

Definition at line 281 of file qqmldommoduleindex.cpp.

References QQmlJS::Dom::OwningItem::mutex().

Referenced by autoExports(), exportNames(), exportsWithNameAndMinorVersion(), and iterateDirectSubpaths().

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

◆ uri()

QString QQmlJS::Dom::ModuleIndex::uri ( ) const
inline

Definition at line 91 of file qqmldommoduleindex_p.h.

Referenced by exportsWithNameAndMinorVersion(), iterateDirectSubpaths(), and qmldirsToLoad().

+ Here is the caller graph for this function:

Member Data Documentation

◆ kindValue

constexpr DomType QQmlJS::Dom::ModuleIndex::kindValue = DomType::ModuleIndex
staticconstexpr

Definition at line 61 of file qqmldommoduleindex_p.h.


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