QQmlSA::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)

Move - other 에서 SourceLocation을 생성합니다.

[noexcept] SourceLocation::~SourceLocation()

SourceLocation 인스턴스를 파괴합니다.

quint32 SourceLocation::begin() const

이 소스 위치의 시작 부분 오프셋을 반환합니다.

quint32 SourceLocation::end() const

이 소스 위치 끝의 오프셋을 반환합니다.

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

text 을 가리키는 이 소스 위치의 끝을 가리키는 렌트 0의 소스 위치를 반환합니다.

bool SourceLocation::isValid() const

반환값 trueSourceLocation 유효한 경우, 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)

이동 - other 을 이 SourceLocation 에 할당합니다.

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

SourceLocationother 을 할당합니다.

관련 비회원

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

seed 을 사용하여 location 에 대한 해시값을 반환합니다.

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

lhsrhs 과 같지 않으면 true를 반환하고, 그렇지 않으면 false 을 반환합니다. 두 소스 위치가 동일한 것으로 간주되는 경우는 SourceLocation::operator== 을 참조하세요.

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

lhsrhs 과 같으면 참을 반환하고, 그렇지 않으면 false 을 반환합니다. 오프셋, 길이, 줄, 열 멤버의 값이 같으면 두 SourceLocation은 동일한 것으로 간주됩니다.

© 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.