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>.
|
#include <qqmldomscriptelements_p.h>
Public Types | |
using | BaseT = ScriptElementBase<type> |
Public Types inherited from QQmlJS::Dom::ScriptElement | |
template<typename T > | |
using | PointerType = std::shared_ptr<T> |
Public Types inherited from QQmlJS::Dom::DomBase | |
using | FilterT = function_ref<bool(const DomItem &, const PathEls::PathComponent &, const DomItem &)> |
Static Public Attributes | |
static constexpr DomType | kindValue = type |
static constexpr DomKind | domKindValue = DomKind::ScriptElement |
Protected Attributes | |
std::vector< std::pair< FileLocationRegion, QQmlJS::SourceLocation > > | m_locations |
Additional Inherited Members | |
Protected Member Functions inherited from QQmlJS::Dom::DomElement | |
DomElement & | operator= (const DomElement &)=default |
Definition at line 35 of file qqmldomscriptelements_p.h.
using QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::BaseT = ScriptElementBase<type> |
Definition at line 38 of file qqmldomscriptelements_p.h.
|
inline |
Definition at line 42 of file qqmldomscriptelements_p.h.
|
inline |
Definition at line 46 of file qqmldomscriptelements_p.h.
|
inline |
Definition at line 103 of file qqmldomscriptelements_p.h.
References QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::m_locations, QQmlJS::Dom::MainRegion, and Q_ASSERT_X.
|
inlineoverride |
Usually, all the visits/recursive calls to DOM elements can be done using the DomItem interface, once all the DOM has been constructed.
During construction, createFileLocations can be used to annotate the DOM representation with the corresponding source locations, which are needed, e.g., to find the corresponding DOM element from a certain text position. When called, createFileLocations sets an entry for itself in the FileLocationsTree.
Derived classes should call the base implemenatation and recursively call createFileLocations on all their children.
Usually, only the root of the script DOM element requires one createFileLocations call after construction {and} after a pathFromOwner was set using updatePathFromOwner.
Definition at line 53 of file qqmldomscriptelements_p.h.
References QQmlJS::Dom::FileLocations::addRegion(), base, QQmlJS::Dom::FileLocations::ensure(), QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::m_locations, QQmlJS::Dom::DomElement::pathFromOwner(), and QQmlJS::Dom::AttachedInfo::Relative.
|
inlineoverridevirtual |
Reimplemented from QQmlJS::Dom::DomBase.
Definition at line 51 of file qqmldomscriptelements_p.h.
References QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::domKindValue.
|
inlineoverridevirtual |
Implements QQmlJS::Dom::DomBase.
Definition at line 50 of file qqmldomscriptelements_p.h.
|
inline |
All of the following overloads are only required for optimization purposes.
The base implementation will work fine, but might be slightly slower. You can override dump(), fields(), field(), indexes(), index(), keys() or key() if the performance of the base class becomes problematic.
Definition at line 88 of file qqmldomscriptelements_p.h.
References QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::m_locations, QQmlJS::Dom::MainRegion, and Q_ASSERT.
|
inline |
Definition at line 96 of file qqmldomscriptelements_p.h.
References QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::m_locations, QQmlJS::Dom::MainRegion, and Q_ASSERT.
|
staticconstexpr |
Definition at line 40 of file qqmldomscriptelements_p.h.
Referenced by QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::domKind().
|
staticconstexpr |
Definition at line 39 of file qqmldomscriptelements_p.h.
|
protected |
Definition at line 111 of file qqmldomscriptelements_p.h.
Referenced by QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::addLocation(), QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::createFileLocations(), QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::mainRegionLocation(), and QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::setMainRegionLocation().