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

Keeps the comments associated with a DomItem. More...

#include <qqmldomcomments_p.h>

+ Collaboration diagram for QQmlJS::Dom::RegionComments:

Public Member Functions

DomType kind () const
 
bool iterateDirectSubpaths (DomItem &self, DirectVisitor visitor)
 
Path addPreComment (const Comment &comment, QString regionName)
 
Path addPostComment (const Comment &comment, QString regionName)
 

Public Attributes

QMap< QString, CommentedElementregionComments
 

Static Public Attributes

static constexpr DomType kindValue = DomType::RegionComments
 

Friends

bool operator== (const RegionComments &c1, const RegionComments &c2)
 
bool operator!= (const RegionComments &c1, const RegionComments &c2)
 

Detailed Description

Keeps the comments associated with a DomItem.

A DomItem can be more complex that just a start/end, it can have multiple regions, for example a return or a function token might define a region. The empty string is the region that represents the whole element.

Every region has a name, and should be written out using the OutWriter.writeRegion (or startRegion/ EndRegion). Region comments keeps a mapping containing them.

Definition at line 128 of file qqmldomcomments_p.h.

Member Function Documentation

◆ addPostComment()

Path QQmlJS::Dom::RegionComments::addPostComment ( const Comment comment,
QString  regionName 
)
inline

Definition at line 156 of file qqmldomcomments_p.h.

References QQmlJS::Dom::Path::field(), QQmlJS::Dom::Path::index(), and QQmlJS::Dom::Path::key().

+ Here is the call graph for this function:

◆ addPreComment()

Path QQmlJS::Dom::RegionComments::addPreComment ( const Comment comment,
QString  regionName 
)
inline

Definition at line 145 of file qqmldomcomments_p.h.

References QQmlJS::Dom::Path::field(), QQmlJS::Dom::Path::index(), and QQmlJS::Dom::Path::key().

+ Here is the call graph for this function:

◆ iterateDirectSubpaths()

bool QQmlJS::Dom::RegionComments::iterateDirectSubpaths ( DomItem self,
DirectVisitor  visitor 
)

Definition at line 731 of file qqmldomcomments.cpp.

◆ kind()

DomType QQmlJS::Dom::RegionComments::kind ( ) const
inline

Definition at line 132 of file qqmldomcomments_p.h.

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const RegionComments c1,
const RegionComments c2 
)
friend

Definition at line 140 of file qqmldomcomments_p.h.

◆ operator==

bool operator== ( const RegionComments c1,
const RegionComments c2 
)
friend

Definition at line 136 of file qqmldomcomments_p.h.

Member Data Documentation

◆ kindValue

constexpr DomType QQmlJS::Dom::RegionComments::kindValue = DomType::RegionComments
staticconstexpr

Definition at line 131 of file qqmldomcomments_p.h.

◆ regionComments

QMap<QString, CommentedElement> QQmlJS::Dom::RegionComments::regionComments

Definition at line 167 of file qqmldomcomments_p.h.


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