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>.
|
Attached info creates a tree to attach extra info to DomItems. More...
#include <qqmldomattachedinfo_p.h>
Public Types | |
enum class | PathType { Relative , Canonical } |
using | Ptr = std::shared_ptr<AttachedInfo> |
Public Types inherited from QQmlJS::Dom::DomBase | |
using | FilterT = function_ref<bool(const DomItem &, const PathEls::PathComponent &, const DomItem &)> |
Static Public Member Functions | |
static Ptr | ensure (const Ptr &self, const Path &path, PathType pType=PathType::Relative) |
Returns that the AttachedInfo corresponding to the given path, creating it if it does not exists. | |
static Ptr | find (const Ptr &self, const Path &p, PathType pType=PathType::Relative) |
static AttachedInfoLookupResult< Ptr > | findAttachedInfo (const DomItem &item, QStringView treeFieldName) |
static Ptr | treePtr (const DomItem &item, QStringView fieldName) |
Static Public Member Functions inherited from QQmlJS::Dom::OwningItem | |
static int | nextRevision () |
Static Public Attributes | |
static constexpr DomType | kindValue = DomType::AttachedInfo |
Protected Attributes | |
Path | m_path |
std::weak_ptr< AttachedInfo > | m_parent |
QMap< Path, Ptr > | m_subItems |
Additional Inherited Members | |
Protected Member Functions inherited from QQmlJS::Dom::OwningItem | |
virtual std::shared_ptr< OwningItem > | doCopy (const DomItem &self) const =0 |
Attached info creates a tree to attach extra info to DomItems.
Normally one uses the template AttachedInfoT<SpecificInfoToAttach>
static methods Attributes: \list
Definition at line 51 of file qqmldomattachedinfo_p.h.
using QQmlJS::Dom::AttachedInfo::Ptr = std::shared_ptr<AttachedInfo> |
Definition at line 61 of file qqmldomattachedinfo_p.h.
|
strong |
Enumerator | |
---|---|
Relative | |
Canonical |
Definition at line 54 of file qqmldomattachedinfo_p.h.
|
inline |
Definition at line 76 of file qqmldomattachedinfo_p.h.
QQmlJS::Dom::AttachedInfo::AttachedInfo | ( | const AttachedInfo & | o | ) |
Definition at line 198 of file qqmldomattachedinfo.cpp.
Implements QQmlJS::Dom::OwningItem.
Definition at line 64 of file qqmldomattachedinfo_p.h.
|
static |
Returns that the AttachedInfo corresponding to the given path, creating it if it does not exists.
The path might be either a relative path or a canonical path, as specified by the PathType
Definition at line 210 of file qqmldomattachedinfo.cpp.
References Canonical, QString::insert(), QString::length(), QQmlJS::Dom::Path::mid(), path(), Q_ASSERT, and Relative.
|
inline |
Definition at line 123 of file qqmldomattachedinfo_p.h.
References QQmlJS::Dom::MutableDomItem::field().
|
inline |
Definition at line 109 of file qqmldomattachedinfo_p.h.
References QQmlJS::Dom::Path::mid().
|
static |
Definition at line 240 of file qqmldomattachedinfo.cpp.
References Canonical, QQmlJS::Dom::Path::dropFront(), QString::length(), and QQmlJS::Dom::Path::mid().
Referenced by findAttachedInfo().
|
static |
|
inline |
Definition at line 104 of file qqmldomattachedinfo_p.h.
References QQmlJS::Dom::DomItem::field().
Implemented in QQmlJS::Dom::AttachedInfoT< Info >.
Referenced by iterateDirectSubpaths().
|
pure virtual |
Implemented in QQmlJS::Dom::AttachedInfoT< Info >.
|
inline |
Definition at line 91 of file qqmldomattachedinfo_p.h.
References QQmlJS::Dom::Path::mid().
|
overridevirtual |
Implements QQmlJS::Dom::DomBase.
Definition at line 168 of file qqmldomattachedinfo.cpp.
References QQmlJS::Dom::Path::Field(), QQmlJS::Dom::Path::fromString(), infoItem(), QMap< Key, T >::insert(), QMap< Key, T >::key(), m_subItems, map, QQmlJS::Dom::Map, parent(), path(), and QQmlJS::Dom::Path::toString().
|
inlineoverridevirtual |
Implements QQmlJS::Dom::DomBase.
Definition at line 63 of file qqmldomattachedinfo_p.h.
|
inline |
Definition at line 67 of file qqmldomattachedinfo_p.h.
|
inline |
Definition at line 72 of file qqmldomattachedinfo_p.h.
Referenced by iterateDirectSubpaths().
|
inline |
Definition at line 73 of file qqmldomattachedinfo_p.h.
Referenced by ensure(), and iterateDirectSubpaths().
Definition at line 74 of file qqmldomattachedinfo_p.h.
Definition at line 135 of file qqmldomattachedinfo_p.h.
Definition at line 132 of file qqmldomattachedinfo_p.h.
|
inlinestatic |
Definition at line 86 of file qqmldomattachedinfo_p.h.
References item.
|
staticconstexpr |
Definition at line 60 of file qqmldomattachedinfo_p.h.
|
protected |
Definition at line 140 of file qqmldomattachedinfo_p.h.
|
protected |
Definition at line 139 of file qqmldomattachedinfo_p.h.
Definition at line 141 of file qqmldomattachedinfo_p.h.
Referenced by iterateDirectSubpaths().