Represents a location or region in the source code. 更多...
| 頭: |
#include <SourceLocation>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
|
| 狀態: | 技術預覽 |
| SourceLocation (quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0) | |
| SourceLocation (const QQmlSA::SourceLocation & other ) | |
| SourceLocation (QQmlSA::SourceLocation && other ) | |
| ~SourceLocation () | |
| quint32 | begin () const |
| quint32 | end () const |
| QQmlSA::SourceLocation | endZeroLengthLocation (QStringView text ) const |
| bool | isValid () const |
| quint32 | length () const |
| quint32 | offset () const |
| quint32 | startColumn () const |
| quint32 | startLine () const |
| QQmlSA::SourceLocation | startZeroLengthLocation () const |
| QQmlSA::SourceLocation & | operator= (QQmlSA::SourceLocation && other ) |
| QQmlSA::SourceLocation & | operator= (const QQmlSA::SourceLocation & other ) |
| qsizetype | qHash (const QQmlSA::SourceLocation & location , qsizetype seed = 0) |
| bool | operator!= (const QQmlSA::SourceLocation & lhs , const QQmlSA::SourceLocation & rhs ) |
| bool | operator== (const QQmlSA::SourceLocation & lhs , const QQmlSA::SourceLocation & rhs ) |
[explicit]
SourceLocation::
SourceLocation
(
quint32
offset
= 0,
quint32
length
= 0,
quint32
line
= 0,
quint32
column
= 0)
Constructs a new SourceLocation with values given by offset , length , line ,和 column .
創建副本為 other .
[noexcept]
SourceLocation::
SourceLocation
(
QQmlSA::SourceLocation
&&
other
)
Move-Constructs a SourceLocation from other .
[noexcept]
SourceLocation::
~SourceLocation
()
Destructs this SourceLocation 實例。
Returns the offset of the beginning of this source location.
Returns the offset of the end of this source location.
Returns a source location of lenth zero pointing to the end of this source location pointing to text .
返迴
true
is this
SourceLocation
is valid,
false
否則。
Returns the length of this source location.
Returns the offset of the beginning of this source location.
Returns the column number containing the beginning of this source location.
Returns the line number containing the beginning of this source location.
Returns a source location of lenth zero pointing to the beginning of this source location.
[noexcept]
QQmlSA::SourceLocation
&SourceLocation::
operator=
(
QQmlSA::SourceLocation
&&
other
)
移動賦值 other 到此 SourceLocation .
賦值 other 到此 SourceLocation .
返迴哈希值為 location ,使用 seed 做計算種子。
返迴 true 若
lhs
does not equal
rhs
,和
false
otherwise. See
SourceLocation::operator==
for when two source locations are considered equal.
返迴 true 若
lhs
等於
rhs
,和
false
otherwise. Two SourceLocations are considered equal if they have the same values for their offset, length, line, and column members.