![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtQmlCompiler More...
#include <qqmlsasourcelocation.h>
Public Member Functions | |
SourceLocation (quint32 offset=0, quint32 length=0, quint32 line=0, quint32 column=0) | |
SourceLocation (const SourceLocation &) | |
SourceLocation (SourceLocation &&other) noexcept | |
SourceLocation & | operator= (const SourceLocation &) |
SourceLocation & | operator= (SourceLocation &&other) noexcept |
~SourceLocation () | |
bool | isValid () const |
quint32 | begin () const |
Returns the offset of the beginning of this source location. | |
quint32 | end () const |
Returns the offset of the end of this source location. | |
quint32 | offset () const |
Returns the offset of the beginning of this source location. | |
quint32 | length () const |
Returns the length of this source location. | |
quint32 | startLine () const |
Returns the line number containing the beginning of this source location. | |
quint32 | startColumn () const |
Returns the column number containing the beginning of this source location. | |
SourceLocation | startZeroLengthLocation () const |
Returns a source location of lenth zero pointing to the beginning of this source location. | |
SourceLocation | endZeroLengthLocation (QStringView text) const |
Returns a source location of lenth zero pointing to the end of this source location pointing to text. | |
Friends | |
class | QT_PREPEND_NAMESPACE (QQmlSA::SourceLocationPrivate) |
qsizetype | qHash (const SourceLocation &location, qsizetype seed=0) |
bool | operator== (const SourceLocation &lhs, const SourceLocation &rhs) |
bool | operator!= (const SourceLocation &lhs, const SourceLocation &rhs) |
\inmodule QtQmlCompiler
Represents a location or region in the source code.
Definition at line 21 of file qqmlsasourcelocation.h.
|
explicit |
Definition at line 21 of file qqmlsasourcelocation.cpp.
|
default |
|
inlinenoexcept |
Definition at line 29 of file qqmlsasourcelocation.h.
References m_data, and other().
|
default |
quint32 QQmlSA::SourceLocation::begin | ( | ) | const |
Returns the offset of the beginning of this source location.
Definition at line 39 of file qqmlsasourcelocation.cpp.
References QQmlJS::SourceLocation::begin(), and QQmlSA::SourceLocationPrivate::sourceLocation().
quint32 QQmlSA::SourceLocation::end | ( | ) | const |
Returns the offset of the end of this source location.
Definition at line 47 of file qqmlsasourcelocation.cpp.
References QQmlJS::SourceLocation::end(), and QQmlSA::SourceLocationPrivate::sourceLocation().
QQmlSA::SourceLocation QQmlSA::SourceLocation::endZeroLengthLocation | ( | QStringView | text | ) | const |
Returns a source location of lenth zero pointing to the end of this source location pointing to text.
Definition at line 102 of file qqmlsasourcelocation.cpp.
References QQmlJS::SourceLocation::endZeroLengthLocation(), and text.
bool QQmlSA::SourceLocation::isValid | ( | ) | const |
Definition at line 31 of file qqmlsasourcelocation.cpp.
References QQmlJS::SourceLocation::isValid(), and QQmlSA::SourceLocationPrivate::sourceLocation().
Referenced by AnchorsValidatorPass::run().
quint32 QQmlSA::SourceLocation::length | ( | ) | const |
Returns the length of this source location.
Definition at line 63 of file qqmlsasourcelocation.cpp.
References QQmlJS::SourceLocation::length, and QQmlSA::SourceLocationPrivate::sourceLocation().
quint32 QQmlSA::SourceLocation::offset | ( | ) | const |
Returns the offset of the beginning of this source location.
Definition at line 55 of file qqmlsasourcelocation.cpp.
References QQmlJS::SourceLocation::offset, and QQmlSA::SourceLocationPrivate::sourceLocation().
Referenced by AttachedPropertyReuse::onRead().
|
default |
|
inlinenoexcept |
Definition at line 35 of file qqmlsasourcelocation.h.
References m_data, and other().
quint32 QQmlSA::SourceLocation::startColumn | ( | ) | const |
Returns the column number containing the beginning of this source location.
Definition at line 79 of file qqmlsasourcelocation.cpp.
References QQmlSA::SourceLocationPrivate::sourceLocation(), and QQmlJS::SourceLocation::startColumn.
Referenced by AttachedPropertyReuse::onRead().
quint32 QQmlSA::SourceLocation::startLine | ( | ) | const |
Returns the line number containing the beginning of this source location.
Definition at line 71 of file qqmlsasourcelocation.cpp.
References QQmlSA::SourceLocationPrivate::sourceLocation(), and QQmlJS::SourceLocation::startLine.
Referenced by AttachedPropertyReuse::onRead().
QQmlSA::SourceLocation QQmlSA::SourceLocation::startZeroLengthLocation | ( | ) | const |
Returns a source location of lenth zero pointing to the beginning of this source location.
Definition at line 88 of file qqmlsasourcelocation.cpp.
References QQmlSA::SourceLocationPrivate::sourceLocation(), and QQmlJS::SourceLocation::startZeroLengthLocation().
|
friend |
Definition at line 66 of file qqmlsasourcelocation.h.
|
friend |
Definition at line 61 of file qqmlsasourcelocation.h.
|
friend |
Definition at line 56 of file qqmlsasourcelocation.h.
|
friend |