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::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 (const DomItem &self, DirectVisitor visitor) const
const QMap< FileLocationRegion, CommentedElement > & regionComments () const
Path addComment (const Comment &comment, FileLocationRegion region)

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 176 of file qqmldomcomments_p.h.

Member Function Documentation

◆ addComment()

Path QQmlJS::Dom::RegionComments::addComment ( const Comment & comment,
FileLocationRegion region )
inline

Definition at line 194 of file qqmldomcomments_p.h.

References QQmlJS::Dom::Comment::Pre, and QQmlJS::Dom::Comment::type().

Here is the call graph for this function:

◆ iterateDirectSubpaths()

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

Definition at line 879 of file qqmldomcomments.cpp.

References QQmlJS::Dom::DomItem::pathFromOwner(), and QQmlJS::Dom::DomItem::subMapItem().

Here is the call graph for this function:

◆ kind()

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

Definition at line 180 of file qqmldomcomments_p.h.

References kindValue.

◆ regionComments()

const QMap< FileLocationRegion, CommentedElement > & QQmlJS::Dom::RegionComments::regionComments ( ) const
inline

Definition at line 193 of file qqmldomcomments_p.h.

◆ operator!=

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

Definition at line 188 of file qqmldomcomments_p.h.

References operator==.

◆ operator==

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

Definition at line 184 of file qqmldomcomments_p.h.

Referenced by operator!=.

Member Data Documentation

◆ kindValue

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

Definition at line 179 of file qqmldomcomments_p.h.

Referenced by kind().


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