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
QQmlJS::Dom::CommentedElement Class Reference

Keeps the comment associated with an element. More...

#include <qqmldomcomments_p.h>

+ Collaboration diagram for QQmlJS::Dom::CommentedElement:

Public Member Functions

DomType kind () const
 
bool iterateDirectSubpaths (const DomItem &self, DirectVisitor visitor) const
 
void writePre (OutWriter &lw, QList< SourceLocation > *locations=nullptr) const
 
void writePost (OutWriter &lw, QList< SourceLocation > *locations=nullptr) const
 
void addComment (const Comment &comment)
 
const QList< Comment > & preComments () const
 
const QList< Comment > & postComments () const
 

Static Public Attributes

static constexpr DomType kindValue = DomType::CommentedElement
 

Friends

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

Detailed Description

Keeps the comment associated with an element.

A comment can be attached to an element (that is always a range of the file with a start and end) only in two ways: it can precede the region (preComments), or follow it (postComments).

Definition at line 116 of file qqmldomcomments_p.h.

Member Function Documentation

◆ addComment()

void QQmlJS::Dom::CommentedElement::addComment ( const Comment & comment)
inline

Definition at line 135 of file qqmldomcomments_p.h.

References QQmlJS::Dom::Comment::type().

+ Here is the call graph for this function:

◆ iterateDirectSubpaths()

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

Definition at line 245 of file qqmldomcomments.cpp.

◆ kind()

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

Definition at line 120 of file qqmldomcomments_p.h.

◆ postComments()

const QList< Comment > & QQmlJS::Dom::CommentedElement::postComments ( ) const
inline

Definition at line 144 of file qqmldomcomments_p.h.

◆ preComments()

const QList< Comment > & QQmlJS::Dom::CommentedElement::preComments ( ) const
inline

Definition at line 143 of file qqmldomcomments_p.h.

◆ writePost()

void QQmlJS::Dom::CommentedElement::writePost ( OutWriter & lw,
QList< SourceLocation > * locations = nullptr ) const

Definition at line 262 of file qqmldomcomments.cpp.

References i.

◆ writePre()

void QQmlJS::Dom::CommentedElement::writePre ( OutWriter & lw,
QList< SourceLocation > * locations = nullptr ) const

Definition at line 253 of file qqmldomcomments.cpp.

References i.

Friends And Related Symbol Documentation

◆ operator!=

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

Definition at line 130 of file qqmldomcomments_p.h.

◆ operator==

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

Definition at line 126 of file qqmldomcomments_p.h.

Member Data Documentation

◆ kindValue

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

Definition at line 119 of file qqmldomcomments_p.h.


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