Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlJS::Dom::CommentInfo Class Reference

Extracts various pieces and information out of a rawComment string. More...

#include <qqmldomcomments_p.h>

+ Collaboration diagram for QQmlJS::Dom::CommentInfo:

Public Member Functions

 CommentInfo (QStringView)
 
QStringView preWhitespace () const
 
QStringView comment () const
 
QStringView commentContent () const
 
QStringView postWhitespace () const
 

Public Attributes

quint32 commentBegin
 
quint32 commentEnd
 
quint32 commentContentBegin
 
quint32 commentContentEnd
 
QStringView commentStartStr
 
QStringView commentEndStr
 
bool hasStartNewline = false
 
bool hasEndNewline = false
 
int nContentNewlines
 
QStringView rawComment
 
QStringList warnings
 

Detailed Description

Extracts various pieces and information out of a rawComment string.

Comments store a string (rawComment) with comment characters (//,..) and spaces. Sometime one wants just the comment, the commentcharacters, the space before the comment,.... CommentInfo gets such a raw comment string and makes the various pieces available

Definition at line 38 of file qqmldomcomments_p.h.

Constructor & Destructor Documentation

◆ CommentInfo()

QQmlJS::Dom::CommentInfo::CommentInfo ( QStringView  rawComment)

Definition at line 68 of file qqmldomcomments.cpp.

References arg, QString::at(), QStringView::at(), commentBegin, commentContentBegin, commentContentEnd, commentEnd, commentEndStr, commentStartStr, QChar::fromLatin1(), hasEndNewline, hasStartNewline, i, QString::isEmpty(), QChar::isSpace(), QStringView::mid(), nContentNewlines, Q_ASSERT, QStringLiteral, rawComment, QString::size(), QStringView::size(), tr, QChar::unicode(), and warnings.

+ Here is the call graph for this function:

Member Function Documentation

◆ comment()

QStringView QQmlJS::Dom::CommentInfo::comment ( ) const
inline

Definition at line 46 of file qqmldomcomments_p.h.

References QStringView::mid().

Referenced by QQmlJS::Dom::Comment::write().

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

◆ commentContent()

QStringView QQmlJS::Dom::CommentInfo::commentContent ( ) const
inline

Definition at line 48 of file qqmldomcomments_p.h.

References QStringView::mid().

+ Here is the call graph for this function:

◆ postWhitespace()

QStringView QQmlJS::Dom::CommentInfo::postWhitespace ( ) const
inline

Definition at line 53 of file qqmldomcomments_p.h.

References QStringView::mid().

Referenced by QQmlJS::Dom::Comment::write().

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

◆ preWhitespace()

QStringView QQmlJS::Dom::CommentInfo::preWhitespace ( ) const
inline

Definition at line 44 of file qqmldomcomments_p.h.

References QStringView::mid().

Referenced by QQmlJS::Dom::Comment::write().

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

Member Data Documentation

◆ commentBegin

quint32 QQmlJS::Dom::CommentInfo::commentBegin

Definition at line 58 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ commentContentBegin

quint32 QQmlJS::Dom::CommentInfo::commentContentBegin

Definition at line 60 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ commentContentEnd

quint32 QQmlJS::Dom::CommentInfo::commentContentEnd

Definition at line 61 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ commentEnd

quint32 QQmlJS::Dom::CommentInfo::commentEnd

Definition at line 59 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ commentEndStr

QStringView QQmlJS::Dom::CommentInfo::commentEndStr

Definition at line 63 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ commentStartStr

QStringView QQmlJS::Dom::CommentInfo::commentStartStr

Definition at line 62 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ hasEndNewline

bool QQmlJS::Dom::CommentInfo::hasEndNewline = false

Definition at line 65 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ hasStartNewline

bool QQmlJS::Dom::CommentInfo::hasStartNewline = false

Definition at line 64 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ nContentNewlines

int QQmlJS::Dom::CommentInfo::nContentNewlines

Definition at line 66 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ rawComment

QStringView QQmlJS::Dom::CommentInfo::rawComment

Definition at line 67 of file qqmldomcomments_p.h.

Referenced by CommentInfo().

◆ warnings

QStringList QQmlJS::Dom::CommentInfo::warnings

Definition at line 68 of file qqmldomcomments_p.h.

Referenced by CommentInfo().


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