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>.
Loading...
Searching...
No Matches
QQmlSA::SourceLocation Class Reference

\inmodule QtQmlCompiler More...

#include <qqmlsasourcelocation.h>

+ Collaboration diagram for QQmlSA::SourceLocation:

Public Member Functions

 SourceLocation (quint32 offset=0, quint32 length=0, quint32 line=0, quint32 column=0)
 
 SourceLocation (const SourceLocation &)
 
 SourceLocation (SourceLocation &&other) noexcept
 
SourceLocationoperator= (const SourceLocation &)
 
SourceLocationoperator= (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)
 

Detailed Description

\inmodule QtQmlCompiler

Represents a location or region in the source code.

Definition at line 21 of file qqmlsasourcelocation.h.

Constructor & Destructor Documentation

◆ SourceLocation() [1/3]

QQmlSA::SourceLocation::SourceLocation ( quint32 offset = 0,
quint32 length = 0,
quint32 line = 0,
quint32 column = 0 )
explicit

Definition at line 21 of file qqmlsasourcelocation.cpp.

References line, and m_data.

◆ SourceLocation() [2/3]

QQmlSA::SourceLocation::SourceLocation ( const SourceLocation & )
default

◆ SourceLocation() [3/3]

QQmlSA::SourceLocation::SourceLocation ( SourceLocation && other)
inlinenoexcept

Definition at line 29 of file qqmlsasourcelocation.h.

References m_data, and other().

+ Here is the call graph for this function:

◆ ~SourceLocation()

QQmlSA::SourceLocation::~SourceLocation ( )
default

Member Function Documentation

◆ begin()

quint32 QQmlSA::SourceLocation::begin ( ) const

Returns the offset of the beginning of this source location.

Definition at line 39 of file qqmlsasourcelocation.cpp.

References QQmlSA::SourceLocationPrivate::sourceLocation().

+ Here is the call graph for this function:

◆ end()

quint32 QQmlSA::SourceLocation::end ( ) const

Returns the offset of the end of this source location.

Definition at line 47 of file qqmlsasourcelocation.cpp.

References QQmlSA::SourceLocationPrivate::sourceLocation().

+ Here is the call graph for this function:

◆ endZeroLengthLocation()

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.

+ Here is the call graph for this function:

◆ isValid()

bool QQmlSA::SourceLocation::isValid ( ) const

Definition at line 31 of file qqmlsasourcelocation.cpp.

References QQmlSA::SourceLocationPrivate::sourceLocation().

+ Here is the call graph for this function:

◆ length()

quint32 QQmlSA::SourceLocation::length ( ) const

Returns the length of this source location.

Definition at line 63 of file qqmlsasourcelocation.cpp.

References QQmlSA::SourceLocationPrivate::sourceLocation().

+ Here is the call graph for this function:

◆ offset()

quint32 QQmlSA::SourceLocation::offset ( ) const

Returns the offset of the beginning of this source location.

Definition at line 55 of file qqmlsasourcelocation.cpp.

References QQmlSA::SourceLocationPrivate::sourceLocation().

Referenced by AttachedPropertyReuse::onRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Definition at line 35 of file qqmlsasourcelocation.h.

References m_data, and other().

+ Here is the call graph for this function:

◆ startColumn()

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().

+ Here is the call graph for this function:

◆ startLine()

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().

+ Here is the call graph for this function:

◆ startZeroLengthLocation()

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().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

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

Definition at line 66 of file qqmlsasourcelocation.h.

◆ operator==

bool operator== ( const SourceLocation & lhs,
const SourceLocation & rhs )
friend

Definition at line 61 of file qqmlsasourcelocation.h.

◆ qHash

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

Definition at line 56 of file qqmlsasourcelocation.h.

◆ QT_PREPEND_NAMESPACE

class QT_PREPEND_NAMESPACE ( QQmlSA::SourceLocationPrivate )
friend

The documentation for this class was generated from the following files: