Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QQmlJS::SourceLocation Class Reference

#include <qqmljssourcelocation_p.h>

+ Collaboration diagram for QQmlJS::SourceLocation:

Public Member Functions

 SourceLocation (quint32 offset=0, quint32 length=0, quint32 line=0, quint32 column=0)
 
bool isValid () const
 
qsizetype begin () const
 
qsizetype end () const
 
SourceLocation startZeroLengthLocation () const
 
SourceLocation endZeroLengthLocation (QStringView text) const
 

Static Public Member Functions

static SourceLocation fromQSizeType (qsizetype offset, qsizetype length=0, qsizetype line=0, qsizetype column=0)
 
static quint32 offsetFrom (QStringView text, quint32 line, quint32 column, const SourceLocation &startHint=SourceLocation{})
 
static std::pair< quint32, quint32rowAndColumnFrom (QStringView text, quint32 offset, const SourceLocation &startHint=SourceLocation{})
 

Public Attributes

quint32 offset
 
quint32 length
 
quint32 startLine
 
quint32 startColumn
 

Friends

size_t qHash (const SourceLocation &location, size_t seed=0)
 
bool operator== (const SourceLocation &a, const SourceLocation &b)
 
bool operator!= (const SourceLocation &a, const SourceLocation &b)
 
SourceLocation combine (const SourceLocation &l1, const SourceLocation &l2)
 

Detailed Description

Definition at line 25 of file qqmljssourcelocation_p.h.

Constructor & Destructor Documentation

◆ SourceLocation()

QQmlJS::SourceLocation::SourceLocation ( quint32 offset = 0,
quint32 length = 0,
quint32 line = 0,
quint32 column = 0 )
inlineexplicit

Definition at line 33 of file qqmljssourcelocation_p.h.

References SourceLocation().

Referenced by SourceLocation().

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

Member Function Documentation

◆ begin()

qsizetype QQmlJS::SourceLocation::begin ( ) const
inline

Definition at line 159 of file qqmljssourcelocation_p.h.

◆ end()

qsizetype QQmlJS::SourceLocation::end ( ) const
inline

Definition at line 160 of file qqmljssourcelocation_p.h.

◆ endZeroLengthLocation()

SourceLocation QQmlJS::SourceLocation::endZeroLengthLocation ( QStringView text) const
inline

Definition at line 168 of file qqmljssourcelocation_p.h.

◆ fromQSizeType()

static SourceLocation QQmlJS::SourceLocation::fromQSizeType ( qsizetype offset,
qsizetype length = 0,
qsizetype line = 0,
qsizetype column = 0 )
inlinestatic

Definition at line 51 of file qqmljssourcelocation_p.h.

◆ isValid()

bool QQmlJS::SourceLocation::isValid ( ) const
inline

Definition at line 157 of file qqmljssourcelocation_p.h.

References operator!=.

Referenced by combine.

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

◆ offsetFrom()

static quint32 QQmlJS::SourceLocation::offsetFrom ( QStringView text,
quint32 line,
quint32 column,
const SourceLocation & startHint = SourceLocation{} )
inlinestatic

Definition at line 123 of file qqmljssourcelocation_p.h.

◆ rowAndColumnFrom()

static std::pair< quint32, quint32 > QQmlJS::SourceLocation::rowAndColumnFrom ( QStringView text,
quint32 offset,
const SourceLocation & startHint = SourceLocation{} )
inlinestatic

Definition at line 142 of file qqmljssourcelocation_p.h.

◆ startZeroLengthLocation()

SourceLocation QQmlJS::SourceLocation::startZeroLengthLocation ( ) const
inline

Definition at line 163 of file qqmljssourcelocation_p.h.

Friends And Related Symbol Documentation

◆ combine

SourceLocation combine ( const SourceLocation & l1,
const SourceLocation & l2 )
friend

Definition at line 200 of file qqmljssourcelocation_p.h.

References isValid().

◆ operator!=

bool operator!= ( const SourceLocation & a,
const SourceLocation & b )
friend

Definition at line 196 of file qqmljssourcelocation_p.h.

References operator==.

Referenced by isValid().

◆ operator==

bool operator== ( const SourceLocation & a,
const SourceLocation & b )
friend

Definition at line 190 of file qqmljssourcelocation_p.h.

Referenced by operator!=.

◆ qHash

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

Definition at line 184 of file qqmljssourcelocation_p.h.

Member Data Documentation

◆ length

quint32 QQmlJS::SourceLocation::length

◆ offset

◆ startColumn

quint32 QQmlJS::SourceLocation::startColumn

Definition at line 182 of file qqmljssourcelocation_p.h.

◆ startLine

quint32 QQmlJS::SourceLocation::startLine

Definition at line 181 of file qqmljssourcelocation_p.h.


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