SourceLocation Class

class QQmlSA::SourceLocation

ソースコード内の位置または領域を表します。詳細...

ヘッダー #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)

offset,length,line,column で指定される値を持つ新しい SourceLocation を構築します。

SourceLocation::SourceLocation(const QQmlSA::SourceLocation &other)

other のコピーを作成する。

[noexcept] SourceLocation::SourceLocation(QQmlSA::SourceLocation &&other)

移動-ソースロケーションをother から構築する。

[noexcept] SourceLocation::~SourceLocation()

このSourceLocation インスタンスを破棄します。

quint32 SourceLocation::begin() const

このソース位置の先頭のオフセットを返します。

quint32 SourceLocation::end() const

このソース位置の終端のオフセットを返します。

QQmlSA::SourceLocation SourceLocation::endZeroLengthLocation(QStringView text) const

text を指すこのソース位置の終端を指す、長さゼロのソース位置を返す。

bool SourceLocation::isValid() const

SourceLocation が有効な場合はtrue を、そうでない場合はfalse を返す。

quint32 SourceLocation::length() const

このソース位置の長さを返します。

quint32 SourceLocation::offset() const

このソース位置の先頭のオフセットを返します。

quint32 SourceLocation::startColumn() const

このソース位置の先頭を含む列番号を返します。

quint32 SourceLocation::startLine() const

このソース位置の先頭を含む行番号を返します。

QQmlSA::SourceLocation SourceLocation::startZeroLengthLocation() const

このソース位置の先頭を指す長さ 0 のソース位置を返します。

[noexcept] QQmlSA::SourceLocation &SourceLocation::operator=(QQmlSA::SourceLocation &&other)

SourceLocationMove-assignother

QQmlSA::SourceLocation &SourceLocation::operator=(const QQmlSA::SourceLocation &other)

このSourceLocationother を割り当てる。

関連する非会員

qsizetype qHash(const QQmlSA::SourceLocation &location, qsizetype seed = 0)

location のハッシュ値を返す。計算のシードにはseed を使用する。

bool operator!=(const QQmlSA::SourceLocation &lhs, const QQmlSA::SourceLocation &rhs)

lhsrhs と等しくなければ真を、そうでなければfalse を返す。2 つのソース位置が等しいと見なされる場合については、SourceLocation::operator== を参照してください。

bool operator==(const QQmlSA::SourceLocation &lhs, const QQmlSA::SourceLocation &rhs)

lhsrhs と等しい場合は真を、そうでない場合はfalse を返します。2 つの SourceLocations が等しいと見なされるのは、それらの offset、length、line、および column メンバの値が同じ場合です。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.