Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlJS::Dom::QmlComponent Class Referencefinal

#include <qqmldomelements_p.h>

+ Inheritance diagram for QQmlJS::Dom::QmlComponent:
+ Collaboration diagram for QQmlJS::Dom::QmlComponent:

Public Member Functions

DomType kind () const override
 
 QmlComponent (QString name=QString())
 
 QmlComponent (const QmlComponent &o)
 
QmlComponentoperator= (const QmlComponent &)=default
 
bool iterateDirectSubpaths (DomItem &self, DirectVisitor) override
 
const QMultiMap< QString, Id > & ids () const &
 
Path nextComponentPath () const
 
void setIds (QMultiMap< QString, Id > ids)
 
void setNextComponentPath (Path p)
 
void updatePathFromOwner (Path newPath) override
 
Path addId (const Id &id, AddOption option=AddOption::Overwrite, Id **idPtr=nullptr)
 
void writeOut (DomItem &self, OutWriter &) const override
 
QList< QStringsubComponentsNames (DomItem &self) const
 
QList< DomItemsubComponents (DomItem &self) const
 
void setSemanticScope (const QQmlJSScope::Ptr &scope)
 
std::optional< QQmlJSScope::PtrsemanticScope ()
 
- Public Member Functions inherited from QQmlJS::Dom::Component
 Component (QString name)
 
 Component (Path pathFromOwner=Path())
 
 Component (const Component &o)=default
 
Componentoperator= (const Component &)=default
 
bool iterateDirectSubpaths (DomItem &, DirectVisitor) override
 
void updatePathFromOwner (Path newPath) override
 
DomItem field (DomItem &self, QStringView name) const override
 
DomItem field (DomItem &self, QStringView name)
 
QString name () const
 
const QMultiMap< QString, EnumDecl > & enumerations () const &
 
const QList< QmlObject > & objects () const &
 
bool isSingleton () const
 
bool isCreatable () const
 
bool isComposite () const
 
QString attachedTypeName () const
 
Path attachedTypePath (DomItem &) const
 
void setName (QString name)
 
void setEnumerations (QMultiMap< QString, EnumDecl > enumerations)
 
Path addEnumeration (const EnumDecl &enumeration, AddOption option=AddOption::Overwrite, EnumDecl **ePtr=nullptr)
 
void setObjects (QList< QmlObject > objects)
 
Path addObject (const QmlObject &object, QmlObject **oPtr=nullptr)
 
void setIsSingleton (bool isSingleton)
 
void setIsCreatable (bool isCreatable)
 
void setIsComposite (bool isComposite)
 
void setAttachedTypeName (QString name)
 
void setAttachedTypePath (Path p)
 
- Public Member Functions inherited from QQmlJS::Dom::CommentableDomElement
 CommentableDomElement (Path pathFromOwner=Path())
 
 CommentableDomElement (const CommentableDomElement &o)
 
CommentableDomElementoperator= (const CommentableDomElement &o)=default
 
bool iterateDirectSubpaths (DomItem &self, DirectVisitor) override
 
RegionCommentscomments ()
 
const RegionCommentscomments () const
 
- Public Member Functions inherited from QQmlJS::Dom::DomElement
 DomElement (Path pathFromOwner=Path())
 
 DomElement (const DomElement &o)=default
 
Path pathFromOwner (DomItem &self) const override
 
Path pathFromOwner () const
 
Path canonicalPath (DomItem &self) const override
 
DomItem containingObject (DomItem &self) const override
 
virtual void updatePathFromOwner (Path newPath)
 
- Public Member Functions inherited from QQmlJS::Dom::DomBase
virtual ~DomBase ()=default
 
DomBasedomBase ()
 
virtual DomType kind () const =0
 
virtual DomKind domKind () const
 
virtual Path pathFromOwner (DomItem &self) const =0
 
virtual Path canonicalPath (DomItem &self) const =0
 
virtual bool iterateDirectSubpaths (DomItem &self, DirectVisitor visitor)=0
 
bool iterateDirectSubpathsConst (DomItem &self, DirectVisitor) const
 
virtual DomItem containingObject (DomItem &self) const
 
virtual void dump (DomItem &, Sink sink, int indent, FilterT filter) const
 
virtual quintptr id () const
 
QString typeName () const
 
virtual QList< QStringfields (DomItem &self) const
 
virtual DomItem field (DomItem &self, QStringView name) const
 
virtual index_type indexes (DomItem &self) const
 
virtual DomItem index (DomItem &self, index_type index) const
 
virtual QSet< QString > const keys (DomItem &self) const
 
virtual DomItem key (DomItem &self, QString name) const
 
virtual QString canonicalFilePath (DomItem &self) const
 
virtual void writeOut (DomItem &self, OutWriter &lw) const
 
virtual QCborValue value () const
 

Static Public Attributes

static constexpr DomType kindValue = DomType::QmlComponent
 

Friends

class QQmlDomAstCreator
 

Additional Inherited Members

- Public Types inherited from QQmlJS::Dom::DomBase
using FilterT = function_ref< bool(DomItem &, const PathEls::PathComponent &, DomItem &)>
 
- Protected Member Functions inherited from QQmlJS::Dom::DomElement
DomElementoperator= (const DomElement &)=default
 

Detailed Description

Definition at line 1061 of file qqmldomelements_p.h.

Constructor & Destructor Documentation

◆ QmlComponent() [1/2]

QQmlJS::Dom::QmlComponent::QmlComponent ( QString  name = QString())
inline

Definition at line 1067 of file qqmldomelements_p.h.

◆ QmlComponent() [2/2]

QQmlJS::Dom::QmlComponent::QmlComponent ( const QmlComponent o)
inline

Definition at line 1073 of file qqmldomelements_p.h.

Member Function Documentation

◆ addId()

Path QQmlJS::Dom::QmlComponent::addId ( const Id id,
AddOption  option = AddOption::Overwrite,
Id **  idPtr = nullptr 
)
inline

Definition at line 1086 of file qqmldomelements_p.h.

References QQmlJS::Dom::insertUpdatableElementInMultiMap().

Referenced by QQmlJS::Dom::QQmlDomAstCreator::visit().

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

◆ ids()

const QMultiMap< QString, Id > & QQmlJS::Dom::QmlComponent::ids ( ) const &
inline

Definition at line 1081 of file qqmldomelements_p.h.

◆ iterateDirectSubpaths()

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

Reimplemented from QQmlJS::Dom::Component.

Definition at line 144 of file qqmldomelements.cpp.

References QQmlJS::Dom::Component::iterateDirectSubpaths(), and subComponents().

+ Here is the call graph for this function:

◆ kind()

DomType QQmlJS::Dom::QmlComponent::kind ( ) const
inlineoverridevirtual

Implements QQmlJS::Dom::DomBase.

Definition at line 1065 of file qqmldomelements_p.h.

◆ nextComponentPath()

Path QQmlJS::Dom::QmlComponent::nextComponentPath ( ) const
inline

Definition at line 1082 of file qqmldomelements_p.h.

◆ operator=()

QmlComponent & QQmlJS::Dom::QmlComponent::operator= ( const QmlComponent )
default

◆ semanticScope()

std::optional< QQmlJSScope::Ptr > QQmlJS::Dom::QmlComponent::semanticScope ( )
inline

Definition at line 1097 of file qqmldomelements_p.h.

◆ setIds()

void QQmlJS::Dom::QmlComponent::setIds ( QMultiMap< QString, Id ids)
inline

Definition at line 1083 of file qqmldomelements_p.h.

◆ setNextComponentPath()

void QQmlJS::Dom::QmlComponent::setNextComponentPath ( Path  p)
inline

Definition at line 1084 of file qqmldomelements_p.h.

◆ setSemanticScope()

void QQmlJS::Dom::QmlComponent::setSemanticScope ( const QQmlJSScope::Ptr scope)
inline

Definition at line 1096 of file qqmldomelements_p.h.

◆ subComponents()

QList< DomItem > QQmlJS::Dom::QmlComponent::subComponents ( DomItem self) const

Definition at line 191 of file qqmldomelements.cpp.

References subComponentsNames().

Referenced by iterateDirectSubpaths().

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

◆ subComponentsNames()

QList< QString > QQmlJS::Dom::QmlComponent::subComponentsNames ( DomItem self) const

Definition at line 174 of file qqmldomelements.cpp.

References QList< T >::append(), QList< T >::begin(), QStringView::contains(), QList< T >::end(), QString::isEmpty(), QStringView::mid(), and QString::size().

Referenced by subComponents().

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

◆ updatePathFromOwner()

void QQmlJS::Dom::QmlComponent::updatePathFromOwner ( Path  newPath)
overridevirtual

Reimplemented from QQmlJS::Dom::Component.

Definition at line 154 of file qqmldomelements.cpp.

References QQmlJS::Dom::Path::field(), QQmlJS::Dom::Component::updatePathFromOwner(), and QQmlJS::Dom::updatePathFromOwnerMultiMap().

+ Here is the call graph for this function:

◆ writeOut()

void QQmlJS::Dom::QmlComponent::writeOut ( DomItem self,
OutWriter lw 
) const
overridevirtual

Reimplemented from QQmlJS::Dom::DomBase.

Definition at line 160 of file qqmldomelements.cpp.

References contains(), QQmlJS::Dom::OutWriter::ensureNewline(), QQmlJS::Dom::Component::name(), QQmlJS::Dom::OutWriter::space(), split(), and QQmlJS::Dom::OutWriter::writeRegion().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QQmlDomAstCreator

friend class QQmlDomAstCreator
friend

Definition at line 1100 of file qqmldomelements_p.h.

Member Data Documentation

◆ kindValue

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

Definition at line 1064 of file qqmldomelements_p.h.


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