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

#include <qqmldomelements_p.h>

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

Public Member Functions

 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
 

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 951 of file qqmldomelements_p.h.

Constructor & Destructor Documentation

◆ Component() [1/3]

QQmlJS::Dom::Component::Component ( QString  name)

Definition at line 103 of file qqmldomelements.cpp.

◆ Component() [2/3]

QQmlJS::Dom::Component::Component ( Path  pathFromOwner = Path())

Definition at line 105 of file qqmldomelements.cpp.

◆ Component() [3/3]

QQmlJS::Dom::Component::Component ( const Component o)
default

Member Function Documentation

◆ addEnumeration()

Path QQmlJS::Dom::Component::addEnumeration ( const EnumDecl enumeration,
AddOption  option = AddOption::Overwrite,
EnumDecl **  ePtr = nullptr 
)
inline

Definition at line 981 of file qqmldomelements_p.h.

References QQmlJS::Dom::insertUpdatableElementInMultiMap(), and QQmlJS::Dom::EnumDecl::name().

+ Here is the call graph for this function:

◆ addObject()

Path QQmlJS::Dom::Component::addObject ( const QmlObject object,
QmlObject **  oPtr = nullptr 
)

Definition at line 138 of file qqmldomelements.cpp.

References QQmlJS::Dom::appendUpdatableElementInQList(), field(), and QQmlJS::Dom::DomElement::pathFromOwner().

+ Here is the call graph for this function:

◆ attachedTypeName()

QString QQmlJS::Dom::Component::attachedTypeName ( ) const
inline

Definition at line 973 of file qqmldomelements_p.h.

Referenced by iterateDirectSubpaths().

+ Here is the caller graph for this function:

◆ attachedTypePath()

Path QQmlJS::Dom::Component::attachedTypePath ( DomItem ) const
inline

Definition at line 974 of file qqmldomelements_p.h.

Referenced by iterateDirectSubpaths().

+ Here is the caller graph for this function:

◆ enumerations()

const QMultiMap< QString, EnumDecl > & QQmlJS::Dom::Component::enumerations ( ) const &
inline

Definition at line 968 of file qqmldomelements_p.h.

◆ field() [1/2]

DomItem QQmlJS::Dom::Component::field ( DomItem self,
QStringView  name 
)

Definition at line 121 of file qqmldomelements.cpp.

References QQmlJS::Dom::DomBase::field().

+ Here is the call graph for this function:

◆ field() [2/2]

DomItem QQmlJS::Dom::Component::field ( DomItem self,
QStringView  name 
) const
inlineoverridevirtual

Reimplemented from QQmlJS::Dom::DomBase.

Definition at line 961 of file qqmldomelements_p.h.

Referenced by addObject().

+ Here is the caller graph for this function:

◆ isComposite()

bool QQmlJS::Dom::Component::isComposite ( ) const
inline

Definition at line 972 of file qqmldomelements_p.h.

Referenced by iterateDirectSubpaths().

+ Here is the caller graph for this function:

◆ isCreatable()

bool QQmlJS::Dom::Component::isCreatable ( ) const
inline

Definition at line 971 of file qqmldomelements_p.h.

Referenced by iterateDirectSubpaths().

+ Here is the caller graph for this function:

◆ isSingleton()

bool QQmlJS::Dom::Component::isSingleton ( ) const
inline

Definition at line 970 of file qqmldomelements_p.h.

Referenced by iterateDirectSubpaths().

+ Here is the caller graph for this function:

◆ iterateDirectSubpaths()

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

Reimplemented from QQmlJS::Dom::CommentableDomElement.

Reimplemented in QQmlJS::Dom::JsResource, QQmlJS::Dom::QmltypesComponent, and QQmlJS::Dom::QmlComponent.

Definition at line 107 of file qqmldomelements.cpp.

References attachedTypeName(), attachedTypePath(), isComposite(), isCreatable(), isSingleton(), QQmlJS::Dom::CommentableDomElement::iterateDirectSubpaths(), and name().

Referenced by QQmlJS::Dom::QmlComponent::iterateDirectSubpaths().

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

◆ name()

QString QQmlJS::Dom::Component::name ( ) const
inline

Definition at line 967 of file qqmldomelements_p.h.

Referenced by QQmlJS::Dom::QmltypesFile::addComponent(), iterateDirectSubpaths(), and QQmlJS::Dom::QmlComponent::writeOut().

+ Here is the caller graph for this function:

◆ objects()

const QList< QmlObject > & QQmlJS::Dom::Component::objects ( ) const &
inline

Definition at line 969 of file qqmldomelements_p.h.

◆ operator=()

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

◆ setAttachedTypeName()

void QQmlJS::Dom::Component::setAttachedTypeName ( QString  name)
inline

Definition at line 993 of file qqmldomelements_p.h.

◆ setAttachedTypePath()

void QQmlJS::Dom::Component::setAttachedTypePath ( Path  p)
inline

Definition at line 994 of file qqmldomelements_p.h.

◆ setEnumerations()

void QQmlJS::Dom::Component::setEnumerations ( QMultiMap< QString, EnumDecl enumerations)
inline

Definition at line 977 of file qqmldomelements_p.h.

◆ setIsComposite()

void QQmlJS::Dom::Component::setIsComposite ( bool  isComposite)
inline

Definition at line 992 of file qqmldomelements_p.h.

References isComposite().

+ Here is the call graph for this function:

◆ setIsCreatable()

void QQmlJS::Dom::Component::setIsCreatable ( bool  isCreatable)
inline

Definition at line 991 of file qqmldomelements_p.h.

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

+ Here is the caller graph for this function:

◆ setIsSingleton()

void QQmlJS::Dom::Component::setIsSingleton ( bool  isSingleton)
inline

Definition at line 990 of file qqmldomelements_p.h.

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

+ Here is the caller graph for this function:

◆ setName()

void QQmlJS::Dom::Component::setName ( QString  name)
inline

Definition at line 976 of file qqmldomelements_p.h.

◆ setObjects()

void QQmlJS::Dom::Component::setObjects ( QList< QmlObject objects)
inline

Definition at line 988 of file qqmldomelements_p.h.

◆ updatePathFromOwner()

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

Reimplemented from QQmlJS::Dom::DomElement.

Reimplemented in QQmlJS::Dom::QmlComponent.

Definition at line 96 of file qqmldomelements.cpp.

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

Referenced by QQmlJS::Dom::GlobalScope::setRootComponent(), and QQmlJS::Dom::QmlComponent::updatePathFromOwner().

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

Friends And Related Symbol Documentation

◆ QQmlDomAstCreator

friend class QQmlDomAstCreator
friend

Definition at line 997 of file qqmldomelements_p.h.


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