![]() |
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 &groupsgroups=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 &sinksink, int indent, FilterT filterfilter) const |
| virtual quintptr | id () const |
| QString | typeName () const |
| virtual QList< QString > | fields (const DomItem &self) const |
| virtual DomItem | field (const DomItem &self, FieldName namename) const |
| virtual index_type | indexes (const DomItem &self) const |
| virtual DomItem | index (const DomItem &self, index_type indexindex) const |
| virtual QSet< QString > const | keys (const DomItem &self) const |
| virtual DomItem | key (const DomItem &self, const QString &namename) 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 1391 of file qqmldomitem_p.h.
| QQmlJS::Dom::OwningItem::OwningItem | ( | const OwningItem & | o | ) |
Definition at line 2827 of file qqmldomitem.cpp.
References OwningItem(), nextRevision(), and revision().
Referenced by OwningItem().
| QQmlJS::Dom::OwningItem::OwningItem | ( | int | derivedFrom = 0 | ) |
Definition at line 2811 of file qqmldomitem.cpp.
References OwningItem(), and nextRevision().
Referenced by QQmlJS::Dom::DomTop::DomTop(), OwningItem(), QQmlJS::Dom::ScriptExpression::ScriptExpression(), and QQmlJS::Dom::ScriptExpression::ScriptExpression().
| QQmlJS::Dom::OwningItem::OwningItem | ( | int | derivedFrom, |
| const QDateTime & | lastDataUpdateAt ) |
Definition at line 2819 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 2936 of file qqmldomitem.cpp.
References addErrorLocal().
| void QQmlJS::Dom::OwningItem::addErrorLocal | ( | ErrorMessage && | msg | ) |
Definition at line 2941 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, and QQmlJS::Dom::ScriptExpression.
| void QQmlJS::Dom::OwningItem::clearErrors | ( | const ErrorGroups & | groups = ErrorGroups({}) | ) |
Definition at line 2950 of file qqmldomitem.cpp.
Reimplemented from QQmlJS::Dom::DomBase.
Definition at line 2878 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 2915 of file qqmldomitem.cpp.
| int QQmlJS::Dom::OwningItem::derivedFrom | ( | ) | const |
Definition at line 2889 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::QmlFile, and QQmlJS::Dom::ScriptExpression.
Referenced by QQmlJS::Dom::ExternalItemInfoBase::makeCopy(), QQmlJS::Dom::ExternalItemPairBase::makeCopy(), and makeCopy().
|
virtual |
Definition at line 2904 of file qqmldomitem.cpp.
References frozen().
|
virtual |
Definition at line 2899 of file qqmldomitem.cpp.
Referenced by freeze().
| QDateTime QQmlJS::Dom::OwningItem::frozenAt | ( | ) | const |
Definition at line 2925 of file qqmldomitem.cpp.
|
overridevirtual |
Implements QQmlJS::Dom::DomBase.
Reimplemented in QQmlJS::Dom::QmlFile, and QQmlJS::Dom::ScriptExpression.
Definition at line 2853 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 2962 of file qqmldomitem.cpp.
References QQmlJS::Dom::Path::length().
|
virtual |
Reimplemented in QQmlJS::Dom::ExternalOwningItem.
Definition at line 2980 of file qqmldomitem.cpp.
References QQmlJS::Dom::DomItem::container().
|
virtual |
Reimplemented in QQmlJS::Dom::ExternalItemInfoBase, and QQmlJS::Dom::ExternalItemPairBase.
Definition at line 2920 of file qqmldomitem.cpp.
|
inline |
Definition at line 1429 of file qqmldomitem_p.h.
|
inline |
Definition at line 1406 of file qqmldomitem_p.h.
References doCopy().
|
inline |
Definition at line 1436 of file qqmldomitem_p.h.
|
static |
Definition at line 2847 of file qqmldomitem.cpp.
Referenced by OwningItem(), OwningItem(), and OwningItem().
|
delete |
|
inlinefinaloverridevirtual |
Implements QQmlJS::Dom::DomBase.
Definition at line 1407 of file qqmldomitem_p.h.
References QQmlJS::Dom::Path::Path().
Reimplemented in QQmlJS::Dom::ExternalItemInfoBase, and QQmlJS::Dom::ExternalItemPairBase.
Definition at line 2930 of file qqmldomitem.cpp.
|
virtual |
Definition at line 2894 of file qqmldomitem.cpp.
Referenced by OwningItem().