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 <qqmldompath_p.h>
Public Types | |
using | Kind = PathEls::Kind |
using | Component = PathEls::PathComponent |
using | difference_type = long |
using | value_type = Path |
using | pointer = const Component* |
using | reference = const Path& |
using | iterator_category = std::forward_iterator_tag |
Public Member Functions | |
Path ()=default | |
Path (const PathEls::PathComponent &c) | |
int | length () const |
Path | operator[] (int i) const |
operator bool () const | |
PathIterator | begin () const |
PathIterator | end () const |
PathRoot | headRoot () const |
PathCurrent | headCurrent () const |
Kind | headKind () const |
QString | headName () const |
bool | checkHeadName (QStringView name) const |
index_type | headIndex (index_type defaultValue=-1) const |
Path | head () const |
Path | last () const |
Source | split () const |
void | dump (const Sink &sink) const |
QString | toString () const |
Path | dropFront (int n=1) const |
Path | dropTail (int n=1) const |
Path | mid (int offset, int length) const |
Path | mid (int offset) const |
Path | appendComponent (const PathEls::PathComponent &c) |
Path | empty () const |
Path | field (const QString &name) const |
Path | field (QStringView name) const |
Path | key (const QString &name) const |
Path | key (QStringView name) const |
Path | index (index_type i) const |
Path | any () const |
Path | filter (const std::function< bool(const DomItem &)> &, const QString &) const |
Path | filter (const std::function< bool(const DomItem &)> &, QStringView desc=u"<native code filter>") const |
Path | current (PathCurrent s) const |
Path | current (const QString &s) const |
Path | current (QStringView s=u"") const |
Path | path (const Path &toAdd, bool avoidToAddAsBase=false) const |
Path | expandFront () const |
Path | expandBack () const |
Path & | operator++ () |
Path | operator++ (int) |
Static Public Member Functions | |
static ErrorGroups | myErrors () |
static Path | fromString (const QString &s, const ErrorHandler &errorHandler=nullptr) |
static Path | fromString (QStringView s, const ErrorHandler &errorHandler=nullptr) |
static Path | Root (PathRoot r) |
static Path | Root (QStringView s=u"") |
static Path | Root (const QString &s) |
static Path | Index (index_type i) |
static Path | Field (QStringView s=u"") |
static Path | Field (const QString &s) |
static Path | Key (QStringView s=u"") |
static Path | Key (const QString &s) |
static Path | Current (PathCurrent c) |
static Path | Current (QStringView s=u"") |
static Path | Current (const QString &s) |
static Path | Empty () |
static int | cmp (const Path &p1, const Path &p2) |
Public Attributes | |
std::function< bool(const DomItem &) | headFilter )() const |
Friends | |
class | QQmlJS::Dom::PathEls::TestPaths |
class | FieldFilter |
size_t | qHash (const Path &, size_t) |
Definition at line 593 of file qqmldompath_p.h.
Definition at line 598 of file qqmldompath_p.h.
using QQmlJS::Dom::Path::difference_type = long |
Definition at line 671 of file qqmldompath_p.h.
using QQmlJS::Dom::Path::iterator_category = std::forward_iterator_tag |
Definition at line 675 of file qqmldompath_p.h.
using QQmlJS::Dom::Path::Kind = PathEls::Kind |
Definition at line 597 of file qqmldompath_p.h.
using QQmlJS::Dom::Path::pointer = const Component* |
Definition at line 673 of file qqmldompath_p.h.
using QQmlJS::Dom::Path::reference = const Path& |
Definition at line 674 of file qqmldompath_p.h.
using QQmlJS::Dom::Path::value_type = Path |
Definition at line 672 of file qqmldompath_p.h.
|
default |
Referenced by any(), Current(), Current(), current(), Current(), current(), dropFront(), dropTail(), Empty(), empty(), expandBack(), expandFront(), Field(), field(), Field(), fromString(), Index(), index(), key(), Key(), Key(), mid(), path(), Root(), Root(), Root(), and split().
|
inlineexplicit |
Definition at line 602 of file qqmldompath_p.h.
Path QQmlJS::Dom::Path::any | ( | ) | const |
Definition at line 642 of file qqmldompath.cpp.
Referenced by any().
Path QQmlJS::Dom::Path::appendComponent | ( | const PathEls::PathComponent & | c | ) |
Definition at line 838 of file qqmldompath.cpp.
References QQmlJS::Dom::PathEls::Any, QQmlJS::Dom::PathEls::Current, QQmlJS::Dom::PathEls::Empty, QQmlJS::Dom::PathEls::Field, QQmlJS::Dom::PathEls::Filter, QQmlJS::Dom::PathEls::Index, QQmlJS::Dom::PathEls::Key, QQmlJS::Dom::Other, and QQmlJS::Dom::PathEls::Root.
PathIterator QQmlJS::Dom::Path::begin | ( | ) | const |
Definition at line 204 of file qqmldompath.cpp.
bool QQmlJS::Dom::Path::checkHeadName | ( | QStringView | name | ) | const |
Definition at line 242 of file qqmldompath.cpp.
References QQmlJS::Dom::PathEls::PathComponent::checkName().
Definition at line 794 of file qqmldompath.cpp.
References QQmlJS::Dom::PathEls::PathComponent::cmp(), i, p1, p2, and qMin().
Referenced by QQmlJS::Dom::operator!=(), QQmlJS::Dom::operator<(), QQmlJS::Dom::operator<=(), QQmlJS::Dom::operator==(), QQmlJS::Dom::operator>(), and QQmlJS::Dom::operator>=().
Definition at line 581 of file qqmldompath.cpp.
References Path().
Definition at line 671 of file qqmldompath.cpp.
References current().
|
static |
Definition at line 575 of file qqmldompath.cpp.
References Path().
Referenced by QQmlJS::Dom::Paths::lookupCppTypePath(), QQmlJS::Dom::Paths::lookupPropertyPath(), QQmlJS::Dom::Paths::lookupSymbolPath(), and QQmlJS::Dom::Paths::lookupTypePath().
Path QQmlJS::Dom::Path::current | ( | PathCurrent | s | ) | const |
Definition at line 665 of file qqmldompath.cpp.
References Path().
Referenced by current(), and current().
|
static |
Definition at line 587 of file qqmldompath.cpp.
References Path().
Path QQmlJS::Dom::Path::current | ( | QStringView | s = u"" | ) | const |
Definition at line 678 of file qqmldompath.cpp.
References Path(), and current().
Path QQmlJS::Dom::Path::dropFront | ( | int | n = 1 | ) | const |
Definition at line 927 of file qqmldompath.cpp.
References Path().
Referenced by QQmlJS::Dom::AttachedInfo::find(), QQmlJS::Dom::PathIterator::operator++(), and QQmlJS::Dom::PathIterator::operator++().
Path QQmlJS::Dom::Path::dropTail | ( | int | n = 1 | ) | const |
Definition at line 934 of file qqmldompath.cpp.
References Path().
Definition at line 904 of file qqmldompath.cpp.
References i.
Referenced by QQmlJS::Dom::ErrorGroups::fatal(), and toString().
|
static |
Definition at line 593 of file qqmldompath.cpp.
References Path().
Path QQmlJS::Dom::Path::empty | ( | ) | const |
Definition at line 598 of file qqmldompath.cpp.
References Path(), and empty().
Referenced by empty().
PathIterator QQmlJS::Dom::Path::end | ( | ) | const |
Definition at line 209 of file qqmldompath.cpp.
Path QQmlJS::Dom::Path::expandBack | ( | ) | const |
Definition at line 772 of file qqmldompath.cpp.
References Path().
Referenced by path().
Path QQmlJS::Dom::Path::expandFront | ( | ) | const |
Definition at line 760 of file qqmldompath.cpp.
References Path().
Referenced by path().
Definition at line 606 of file qqmldompath.cpp.
References field().
Referenced by QQmlJS::Dom::ModuleIndex::autoExports(), QQmlJS::Dom::QQmlDomAstCreator::endVisit(), QQmlJS::Dom::ModuleIndex::exportsWithNameAndMinorVersion(), field(), field(), QQmlJS::Dom::Paths::globalScopePath(), QQmlJS::Dom::Paths::jsFilePath(), QQmlJS::Dom::Paths::qmlDirectoryPath(), QQmlJS::Dom::Paths::qmldirFilePath(), QQmlJS::Dom::Paths::qmlDirPath(), QQmlJS::Dom::Paths::qmlFileObjectPath(), QQmlJS::Dom::Paths::qmlFilePath(), QQmlJS::Dom::Paths::qmltypesFilePath(), and QQmlJS::Dom::QQmlDomAstCreator::visit().
Definition at line 554 of file qqmldompath.cpp.
References Path().
Path QQmlJS::Dom::Path::field | ( | QStringView | name | ) | const |
Definition at line 613 of file qqmldompath.cpp.
References Path(), and field().
|
static |
Definition at line 548 of file qqmldompath.cpp.
References Path().
Referenced by QQmlJS::Dom::QQmlDomAstCreator::endVisit(), QQmlJS::Dom::AttachedInfo::iterateDirectSubpaths(), QQmlJS::Dom::QQmlDomAstCreator::visit(), QQmlJS::Dom::QQmlDomAstCreator::visit(), and QQmlJS::Dom::QQmlDomAstCreator::visit().
Path QQmlJS::Dom::Path::filter | ( | const std::function< bool(const DomItem &)> & | , |
const QString & | ) const |
Path QQmlJS::Dom::Path::filter | ( | const std::function< bool(const DomItem &)> & | , |
QStringView | desc = u"<native code filter>" ) const |
|
static |
Definition at line 955 of file qqmldompath.cpp.
References fromString().
Referenced by fromString(), and QQmlJS::Dom::AttachedInfo::iterateDirectSubpaths().
|
static |
Definition at line 301 of file qqmldompath.cpp.
References Path(), arg, QString::at(), at, dot(), QQmlJS::Dom::PathEls::End, error, i, QQmlJS::Dom::PathEls::IndexOrKey, myErrors(), QString::number(), ok, Q_ASSERT, quote(), QQmlJS::Dom::PathEls::Start, state, and tr.
Path QQmlJS::Dom::Path::head | ( | ) | const |
Definition at line 261 of file qqmldompath.cpp.
References mid().
Referenced by QQmlJS::Dom::PathIterator::operator*().
PathCurrent QQmlJS::Dom::Path::headCurrent | ( | ) | const |
Definition at line 222 of file qqmldompath.cpp.
References QQmlJS::Dom::Other.
index_type QQmlJS::Dom::Path::headIndex | ( | index_type | defaultValue = -1 | ) | const |
Definition at line 247 of file qqmldompath.cpp.
References QQmlJS::Dom::PathEls::PathComponent::index().
Referenced by QQmlJS::Dom::QQmlDomAstCreator::endVisit().
Path::Kind QQmlJS::Dom::Path::headKind | ( | ) | const |
Definition at line 230 of file qqmldompath.cpp.
References QQmlJS::Dom::PathEls::PathComponent::kind().
QString QQmlJS::Dom::Path::headName | ( | ) | const |
Definition at line 237 of file qqmldompath.cpp.
References QQmlJS::Dom::PathEls::PathComponent::name().
PathRoot QQmlJS::Dom::Path::headRoot | ( | ) | const |
Definition at line 214 of file qqmldompath.cpp.
References QQmlJS::Dom::Other.
|
static |
Path QQmlJS::Dom::Path::index | ( | index_type | i | ) | const |
Definition at line 634 of file qqmldompath.cpp.
References Path(), i, and index().
Referenced by QQmlJS::Dom::EnumDecl::addValue(), QQmlJS::Dom::appendUpdatableElementInQList(), index(), QQmlJS::Dom::insertUpdatableElementInMultiMap(), QQmlJS::Dom::Paths::qmlFileObjectPath(), and QQmlJS::Dom::QQmlDomAstCreator::visit().
Definition at line 621 of file qqmldompath.cpp.
Referenced by QQmlJS::Dom::ModuleIndex::exportsWithNameAndMinorVersion(), QQmlJS::Dom::insertUpdatableElementInMultiMap(), key(), QQmlJS::Dom::ModuleScope::pathFromOwner(), QQmlJS::Dom::Paths::qmlFileObjectPath(), and QQmlJS::Dom::updatePathFromOwnerMultiMap().
Definition at line 568 of file qqmldompath.cpp.
References Path().
Path QQmlJS::Dom::Path::key | ( | QStringView | name | ) | const |
Definition at line 629 of file qqmldompath.cpp.
|
static |
Definition at line 560 of file qqmldompath.cpp.
References Path().
Path QQmlJS::Dom::Path::last | ( | ) | const |
Definition at line 266 of file qqmldompath.cpp.
References mid().
Referenced by QQmlJS::Dom::QQmlDomAstCreator::endVisit().
|
inline |
Definition at line 607 of file qqmldompath_p.h.
Referenced by QQmlJS::Dom::ErrorGroups::fatal(), mid(), QQmlJS::Dom::operator!=(), QQmlJS::Dom::operator==(), path(), and split().
Path QQmlJS::Dom::Path::mid | ( | int | offset | ) | const |
Definition at line 950 of file qqmldompath.cpp.
References mid().
Path QQmlJS::Dom::Path::mid | ( | int | offset, |
int | length ) const |
Definition at line 941 of file qqmldompath.cpp.
References Path(), length(), and qMin().
Referenced by QQmlJS::Dom::AttachedInfo::ensure(), QQmlJS::Dom::AttachedInfo::ensureItemAtPath(), QQmlJS::Dom::AttachedInfo::find(), head(), QQmlJS::Dom::AttachedInfo::itemAtPath(), last(), mid(), operator[](), path(), split(), QQmlJS::Dom::QQmlDomAstCreator::visit(), and QQmlJS::Dom::QQmlDomAstCreator::visit().
|
static |
Definition at line 898 of file qqmldompath.cpp.
References NewErrorGroup.
Referenced by fromString(), QQmlJS::Dom::Paths::moduleIndexPath(), and QQmlJS::Dom::Paths::moduleScopePath().
|
explicit |
Definition at line 199 of file qqmldompath.cpp.
Path & QQmlJS::Dom::Path::operator++ | ( | ) |
Definition at line 779 of file qqmldompath.cpp.
Path QQmlJS::Dom::Path::operator++ | ( | int | ) |
Definition at line 786 of file qqmldompath.cpp.
Path QQmlJS::Dom::Path::operator[] | ( | int | i | ) | const |
Definition at line 686 of file qqmldompath.cpp.
References Path(), expandBack(), expandFront(), i, QQmlJS::Dom::inQString(), j, length(), mid(), and path().
Referenced by QQmlJS::Dom::MutableDomItem::canonicalPath(), path(), QQmlJS::Dom::QQmlDomAstCreator::visit(), and QQmlJS::Dom::AttachedInfoT< Info >::visitTree().
Definition at line 529 of file qqmldompath.cpp.
References Path().
Definition at line 523 of file qqmldompath.cpp.
References Path().
Referenced by QQmlJS::Dom::DomUniverse::canonicalPath(), QQmlJS::Dom::LoadInfo::canonicalPath(), QQmlJS::Dom::Paths::globalScopeInfoPath(), QQmlJS::Dom::Paths::jsFileInfoPath(), QQmlJS::Dom::Paths::loadInfoPath(), QQmlJS::Dom::Paths::moduleIndexPath(), QQmlJS::Dom::Paths::moduleScopePath(), QQmlJS::Dom::Paths::qmlDirectoryInfoPath(), QQmlJS::Dom::Paths::qmldirFileInfoPath(), QQmlJS::Dom::Paths::qmlDirInfoPath(), QQmlJS::Dom::Paths::qmlFileInfoPath(), and QQmlJS::Dom::Paths::qmltypesFileInfoPath().
|
static |
Definition at line 541 of file qqmldompath.cpp.
References Path().
Source QQmlJS::Dom::Path::split | ( | ) | const |
QString QQmlJS::Dom::Path::toString | ( | ) | const |
Definition at line 918 of file qqmldompath.cpp.
Referenced by QQmlJS::Dom::OutWriterState::closeState(), and QQmlJS::Dom::AttachedInfo::iterateDirectSubpaths().
|
friend |
Definition at line 684 of file qqmldompath_p.h.
|
friend |
Definition at line 735 of file qqmldompath_p.h.
|
friend |
Definition at line 683 of file qqmldompath_p.h.
std::function< bool(const DomItem &) QQmlJS::Dom::Path::headFilter) () const |