![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
A DomItem that owns other DomItems and is managed through a shared pointer. More...
#include <qqmldomitem_p.h>
Public Member Functions | |
| OwningItem (const OwningItem &o) | |
| OwningItem (int derivedFrom=0) | |
| OwningItem (int derivedFrom, const QDateTime &lastDataUpdateAt) | |
| OwningItem (const OwningItem &&)=delete | |
| OwningItem & | operator= (const OwningItem &&)=delete |
| Path | canonicalPath (const DomItem &self) const override=0 |
| bool | iterateDirectSubpaths (const DomItem &self, DirectVisitor) const override |
| std::shared_ptr< OwningItem > | makeCopy (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, ErrorMessage > | localErrors () const |
| virtual bool | iterateSubOwners (const DomItem &self, function_ref< bool(const DomItem &owner)> visitor) |
| QBasicMutex * | mutex () const |
| Public Member Functions inherited from QQmlJS::Dom::DomBase | |
| virtual | ~DomBase ()=default |
| DomBase * | domBase () |
| const DomBase * | domBase () 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< QString > | fields (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< OwningItem > | doCopy (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 &)> |
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 1401 of file qqmldomitem_p.h.
| QQmlJS::Dom::OwningItem::OwningItem | ( | const OwningItem & | o | ) |
Definition at line 2862 of file qqmldomitem.cpp.
References OwningItem(), nextRevision(), and revision().
Referenced by OwningItem().
| QQmlJS::Dom::OwningItem::OwningItem | ( | int | derivedFrom = 0 | ) |
Definition at line 2846 of file qqmldomitem.cpp.
References OwningItem(), and nextRevision().
Referenced by OwningItem(), QQmlJS::Dom::ScriptExpression::ScriptExpression(), and QQmlJS::Dom::ScriptExpression::ScriptExpression().
| QQmlJS::Dom::OwningItem::OwningItem | ( | int | derivedFrom, |
| const QDateTime & | lastDataUpdateAt ) |
Definition at line 2854 of file qqmldomitem.cpp.
References OwningItem(), and nextRevision().
Referenced by OwningItem().
|
delete |
|
virtual |
Reimplemented in QQmlJS::Dom::LoadInfo, and QQmlJS::Dom::QmlFile.
Definition at line 2974 of file qqmldomitem.cpp.
References addErrorLocal().
| void QQmlJS::Dom::OwningItem::addErrorLocal | ( | ErrorMessage && | msg | ) |
Definition at line 2979 of file qqmldomitem.cpp.
Referenced by addError(), QQmlJS::Dom::LoadInfo::advanceLoad(), and QQmlJS::Dom::LoadInfo::finishedLoadingDep().
Implements QQmlJS::Dom::DomBase.
Implemented in QQmlJS::Dom::AstComments, QQmlJS::Dom::DomEnvironment, QQmlJS::Dom::DomTop, QQmlJS::Dom::DomUniverse, QQmlJS::Dom::ExternalItemInfoBase, QQmlJS::Dom::ExternalItemPairBase, QQmlJS::Dom::ExternalOwningItem, QQmlJS::Dom::FileLocations::Node, QQmlJS::Dom::LoadInfo, QQmlJS::Dom::MockOwner, and QQmlJS::Dom::ScriptExpression.
| void QQmlJS::Dom::OwningItem::clearErrors | ( | const ErrorGroups & | groups = ErrorGroups({}) | ) |
Definition at line 2988 of file qqmldomitem.cpp.
Reimplemented from QQmlJS::Dom::DomBase.
Definition at line 2916 of file qqmldomitem.cpp.
References QQmlJS::Dom::DomItem::DomItem(), QQmlJS::Dom::DomItem::canonicalPath(), QQmlJS::Dom::DomItem::path(), and QQmlJS::Dom::Path::split().
| QDateTime QQmlJS::Dom::OwningItem::createdAt | ( | ) | const |
Definition at line 2953 of file qqmldomitem.cpp.
| int QQmlJS::Dom::OwningItem::derivedFrom | ( | ) | const |
Definition at line 2927 of file qqmldomitem.cpp.
|
protectedpure virtual |
Implemented in QQmlJS::Dom::AstComments, QQmlJS::Dom::DomEnvironment, QQmlJS::Dom::DomUniverse, QQmlJS::Dom::ExternalItemInfo< T >, QQmlJS::Dom::ExternalItemPair< T >, QQmlJS::Dom::FileLocations::Node, QQmlJS::Dom::JsFile, QQmlJS::Dom::LoadInfo, QQmlJS::Dom::MockOwner, QQmlJS::Dom::QmlFile, and QQmlJS::Dom::ScriptExpression.
Referenced by QQmlJS::Dom::ExternalItemInfoBase::makeCopy(), QQmlJS::Dom::ExternalItemPairBase::makeCopy(), and makeCopy().
|
virtual |
Definition at line 2942 of file qqmldomitem.cpp.
References frozen().
|
virtual |
Definition at line 2937 of file qqmldomitem.cpp.
Referenced by freeze().
| QDateTime QQmlJS::Dom::OwningItem::frozenAt | ( | ) | const |
Definition at line 2963 of file qqmldomitem.cpp.
|
overridevirtual |
Implements QQmlJS::Dom::DomBase.
Reimplemented in QQmlJS::Dom::QmlFile, and QQmlJS::Dom::ScriptExpression.
Definition at line 2888 of file qqmldomitem.cpp.
| 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 3000 of file qqmldomitem.cpp.
References QQmlJS::Dom::Path::length().
|
virtual |
Reimplemented in QQmlJS::Dom::ExternalOwningItem.
Definition at line 3018 of file qqmldomitem.cpp.
References QQmlJS::Dom::DomItem::container().
|
virtual |
Reimplemented in QQmlJS::Dom::ExternalItemInfoBase, and QQmlJS::Dom::ExternalItemPairBase.
Definition at line 2958 of file qqmldomitem.cpp.
|
inline |
Definition at line 1439 of file qqmldomitem_p.h.
|
inline |
Definition at line 1416 of file qqmldomitem_p.h.
References doCopy().
|
inline |
Definition at line 1446 of file qqmldomitem_p.h.
|
static |
Definition at line 2882 of file qqmldomitem.cpp.
Referenced by OwningItem(), OwningItem(), and OwningItem().
|
delete |
|
inlinefinaloverridevirtual |
Implements QQmlJS::Dom::DomBase.
Definition at line 1417 of file qqmldomitem_p.h.
References QQmlJS::Dom::Path::Path().
Reimplemented in QQmlJS::Dom::ExternalItemInfoBase, and QQmlJS::Dom::ExternalItemPairBase.
Definition at line 2968 of file qqmldomitem.cpp.
|
virtual |
Definition at line 2932 of file qqmldomitem.cpp.
Referenced by OwningItem().