Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QQmlJS::Dom::OwningItem Class Referenceabstract

A DomItem that owns other DomItems and is managed through a shared pointer. More...

#include <qqmldomitem_p.h>

Inheritance diagram for QQmlJS::Dom::OwningItem:
Collaboration diagram for QQmlJS::Dom::OwningItem:

Public Member Functions

 OwningItem (const OwningItem &o)
 OwningItem (int derivedFrom=0)
 OwningItem (int derivedFrom, const QDateTime &lastDataUpdateAt)
 OwningItem (const OwningItem &&)=delete
OwningItemoperator= (const OwningItem &&)=delete
Path canonicalPath (const DomItem &self) const override=0
bool iterateDirectSubpaths (const DomItem &self, DirectVisitor) const override
std::shared_ptr< OwningItemmakeCopy (const DomItem &self) const
Path pathFromOwner () const override final
DomItem containingObject (const 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 (const DomItem &self, ErrorMessage &&msg)
void addErrorLocal (ErrorMessage &&msg)
void clearErrors (const ErrorGroups &groups=ErrorGroups({}))
bool iterateErrors (const DomItem &self, function_ref< bool(const DomItem &source, const ErrorMessage &msg)> visitor, const Path &inPath=Path())
QMultiMap< Path, ErrorMessagelocalErrors () const
virtual bool iterateSubOwners (const DomItem &self, function_ref< bool(const DomItem &owner)> visitor)
QBasicMutexmutex () const
Public Member Functions inherited from QQmlJS::Dom::DomBase
virtual ~DomBase ()=default
DomBasedomBase ()
const DomBasedomBase () const
virtual DomType kind () const =0
virtual DomKind domKind () const
virtual void dump (const DomItem &, const Sink &sink, int indent, FilterT filter) const
virtual quintptr id () const
QString typeName () const
virtual QList< QStringfields (const DomItem &self) const
virtual DomItem field (const DomItem &self, QStringView name) const
virtual index_type indexes (const DomItem &self) const
virtual DomItem index (const DomItem &self, index_type index) const
virtual QSet< QString > const keys (const DomItem &self) const
virtual DomItem key (const DomItem &self, const QString &name) const
virtual QString canonicalFilePath (const DomItem &self) const
virtual void writeOut (const DomItem &self, OutWriter &lw) const
virtual QCborValue value () const

Static Public Member Functions

static int nextRevision ()

Protected Member Functions

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

Additional Inherited Members

Public Types inherited from QQmlJS::Dom::DomBase
using FilterT = function_ref<bool(const DomItem &, const PathEls::PathComponent &, const DomItem &)>

Detailed Description

A DomItem that owns other DomItems and is managed through a shared pointer.

This is the unit of update of the Dom model, only OwningItem can be updated after exposed, to update a single element one has to copy its owner, change it, and expose an new one. The non owning contents of an exposed OwiningItem can safely be considered immutable, and pointers to them must remain valid for the whole lifetime of the OwningItem (that is managed with shared_ptr), only the sub OwningItems might be change. The OwningItem has a mutex that controls it access (mainly for the errors, observers, and sub OwningItems), Access to the rest is not controlled, it should either be by a single thread (during construction), or immutable (after pubblication).

Definition at line 1464 of file qqmldomitem_p.h.

Constructor & Destructor Documentation

◆ OwningItem() [1/4]

QQmlJS::Dom::OwningItem::OwningItem ( const OwningItem & o)

Definition at line 3000 of file qqmldomitem.cpp.

References OwningItem(), nextRevision(), and revision().

Referenced by OwningItem().

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

◆ OwningItem() [2/4]

QQmlJS::Dom::OwningItem::OwningItem ( int derivedFrom = 0)

Definition at line 2984 of file qqmldomitem.cpp.

References OwningItem(), and nextRevision().

Referenced by OwningItem(), QQmlJS::Dom::ScriptExpression::ScriptExpression(), and QQmlJS::Dom::ScriptExpression::ScriptExpression().

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

◆ OwningItem() [3/4]

QQmlJS::Dom::OwningItem::OwningItem ( int derivedFrom,
const QDateTime & lastDataUpdateAt )

Definition at line 2992 of file qqmldomitem.cpp.

References OwningItem(), and nextRevision().

Referenced by OwningItem().

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

◆ OwningItem() [4/4]

QQmlJS::Dom::OwningItem::OwningItem ( const OwningItem && )
delete

Member Function Documentation

◆ addError()

void QQmlJS::Dom::OwningItem::addError ( const DomItem & self,
ErrorMessage && msg )
virtual

Reimplemented in QQmlJS::Dom::LoadInfo, and QQmlJS::Dom::QmlFile.

Definition at line 3112 of file qqmldomitem.cpp.

References addErrorLocal().

Here is the call graph for this function:

◆ addErrorLocal()

void QQmlJS::Dom::OwningItem::addErrorLocal ( ErrorMessage && msg)

Definition at line 3117 of file qqmldomitem.cpp.

Referenced by addError(), QQmlJS::Dom::LoadInfo::advanceLoad(), and QQmlJS::Dom::LoadInfo::finishedLoadingDep().

Here is the caller graph for this function:

◆ canonicalPath()

◆ clearErrors()

void QQmlJS::Dom::OwningItem::clearErrors ( const ErrorGroups & groups = ErrorGroups({}))

Definition at line 3126 of file qqmldomitem.cpp.

◆ containingObject()

DomItem QQmlJS::Dom::OwningItem::containingObject ( const DomItem & self) const
overridevirtual

Reimplemented from QQmlJS::Dom::DomBase.

Definition at line 3054 of file qqmldomitem.cpp.

References QQmlJS::Dom::DomItem::DomItem(), QQmlJS::Dom::DomItem::canonicalPath(), QQmlJS::Dom::DomItem::path(), and QQmlJS::Dom::Path::split().

Here is the call graph for this function:

◆ createdAt()

QDateTime QQmlJS::Dom::OwningItem::createdAt ( ) const

Definition at line 3091 of file qqmldomitem.cpp.

◆ derivedFrom()

int QQmlJS::Dom::OwningItem::derivedFrom ( ) const

Definition at line 3065 of file qqmldomitem.cpp.

◆ doCopy()

◆ freeze()

bool QQmlJS::Dom::OwningItem::freeze ( )
virtual

Definition at line 3080 of file qqmldomitem.cpp.

References frozen().

Here is the call graph for this function:

◆ frozen()

bool QQmlJS::Dom::OwningItem::frozen ( ) const
virtual

Definition at line 3075 of file qqmldomitem.cpp.

Referenced by freeze().

Here is the caller graph for this function:

◆ frozenAt()

QDateTime QQmlJS::Dom::OwningItem::frozenAt ( ) const

Definition at line 3101 of file qqmldomitem.cpp.

◆ iterateDirectSubpaths()

bool QQmlJS::Dom::OwningItem::iterateDirectSubpaths ( const DomItem & self,
DirectVisitor visitor ) const
overridevirtual

◆ iterateErrors()

bool QQmlJS::Dom::OwningItem::iterateErrors ( const DomItem & self,
function_ref< bool(const DomItem &source, const ErrorMessage &msg)> visitor,
const Path & inPath = Path() )

Definition at line 3138 of file qqmldomitem.cpp.

References QQmlJS::Dom::Path::length().

Here is the call graph for this function:

◆ iterateSubOwners()

bool QQmlJS::Dom::OwningItem::iterateSubOwners ( const DomItem & self,
function_ref< bool(const DomItem &owner)> visitor )
virtual

Reimplemented in QQmlJS::Dom::ExternalOwningItem.

Definition at line 3156 of file qqmldomitem.cpp.

References QQmlJS::Dom::DomItem::container().

Here is the call graph for this function:

◆ lastDataUpdateAt()

QDateTime QQmlJS::Dom::OwningItem::lastDataUpdateAt ( ) const
virtual

◆ localErrors()

QMultiMap< Path, ErrorMessage > QQmlJS::Dom::OwningItem::localErrors ( ) const
inline

Definition at line 1502 of file qqmldomitem_p.h.

◆ makeCopy()

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

Definition at line 1479 of file qqmldomitem_p.h.

References doCopy().

Here is the call graph for this function:

◆ mutex()

QBasicMutex * QQmlJS::Dom::OwningItem::mutex ( ) const
inline

Definition at line 1509 of file qqmldomitem_p.h.

◆ nextRevision()

int QQmlJS::Dom::OwningItem::nextRevision ( )
static

Definition at line 3020 of file qqmldomitem.cpp.

Referenced by OwningItem(), OwningItem(), and OwningItem().

Here is the caller graph for this function:

◆ operator=()

OwningItem & QQmlJS::Dom::OwningItem::operator= ( const OwningItem && )
delete

◆ pathFromOwner()

Path QQmlJS::Dom::OwningItem::pathFromOwner ( ) const
inlinefinaloverridevirtual

Implements QQmlJS::Dom::DomBase.

Definition at line 1480 of file qqmldomitem_p.h.

References QQmlJS::Dom::Path::Path().

Here is the call graph for this function:

◆ refreshedDataAt()

void QQmlJS::Dom::OwningItem::refreshedDataAt ( QDateTime tNew)
virtual

◆ revision()

int QQmlJS::Dom::OwningItem::revision ( ) const
virtual

Definition at line 3070 of file qqmldomitem.cpp.

Referenced by OwningItem().

Here is the caller graph for this function:

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