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::Component Class Reference

#include <qqmldomelements_p.h>

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

Public Member Functions

 Component (const QString &name)
 
 Component (const Path &pathFromOwner=Path())
 
 Component (const Component &o)=default
 
Componentoperator= (const Component &)=default
 
bool iterateDirectSubpaths (const DomItem &, DirectVisitor) const override
 
void updatePathFromOwner (const Path &newPath) override
 
DomItem field (const DomItem &self, QStringView name) const override
 
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 (const DomItem &) const
 
void setName (const QString &name)
 
void setEnumerations (QMultiMap< QString, EnumDecl > enumerations)
 
Path addEnumeration (const EnumDecl &enumeration, AddOption option=AddOption::Overwrite, EnumDecl **ePtr=nullptr)
 
void setObjects (const 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 (const QString &name)
 
void setAttachedTypePath (const Path &p)
 
- Public Member Functions inherited from QQmlJS::Dom::CommentableDomElement
 CommentableDomElement (const Path &pathFromOwner=Path())
 
 CommentableDomElement (const CommentableDomElement &o)
 
CommentableDomElementoperator= (const CommentableDomElement &o)=default
 
RegionCommentscomments ()
 
const RegionCommentscomments () const
 
- Public Member Functions inherited from QQmlJS::Dom::DomElement
 DomElement (const Path &pathFromOwner=Path())
 
 DomElement (const DomElement &o)=default
 
Path pathFromOwner (const DomItem &self) const override
 
Path pathFromOwner () const
 
Path canonicalPath (const DomItem &self) const override
 
DomItem containingObject (const DomItem &self) const override
 
- Public Member Functions inherited from QQmlJS::Dom::DomBase
virtual ~DomBase ()=default
 
DomBasedomBase ()
 
const DomBasedomBase () const
 
virtual DomType kind () const =0
 
virtual DomKind domKind () const
 
bool iterateDirectSubpathsConst (const DomItem &self, DirectVisitor) const
 
virtual void dump (const DomItem &, const Sink &sink, int indent, FilterT filter) const
 
virtual quintptr id () const
 
QString typeName () const
 
virtual QList< QStringfields (const DomItem &self) const
 
virtual index_type indexes (const DomItem &self) const
 
virtual DomItem index (const DomItem &self, index_type index) const
 
virtual QSet< QString > const keys (const DomItem &self) const
 
virtual DomItem key (const DomItem &self, const QString &name) const
 
virtual QString canonicalFilePath (const DomItem &self) const
 
virtual void writeOut (const 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(const DomItem &, const PathEls::PathComponent &, const DomItem &)>
 
- Protected Member Functions inherited from QQmlJS::Dom::DomElement
DomElementoperator= (const DomElement &)=default
 

Detailed Description

Definition at line 999 of file qqmldomelements_p.h.

Constructor & Destructor Documentation

◆ Component() [1/3]

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

Definition at line 104 of file qqmldomelements.cpp.

◆ Component() [2/3]

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

Definition at line 106 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 1025 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 132 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 1017 of file qqmldomelements_p.h.

Referenced by iterateDirectSubpaths().

+ Here is the caller graph for this function:

◆ attachedTypePath()

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

Definition at line 1018 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 1012 of file qqmldomelements_p.h.

◆ field()

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

Reimplemented from QQmlJS::Dom::DomBase.

Definition at line 122 of file qqmldomelements.cpp.

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

Referenced by addObject().

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

◆ isComposite()

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

Definition at line 1016 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 1015 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 1014 of file qqmldomelements_p.h.

Referenced by iterateDirectSubpaths().

+ Here is the caller graph for this function:

◆ iterateDirectSubpaths()

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

Reimplemented from QQmlJS::Dom::CommentableDomElement.

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

Definition at line 108 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 1011 of file qqmldomelements_p.h.

Referenced by 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 1013 of file qqmldomelements_p.h.

◆ operator=()

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

◆ setAttachedTypeName()

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

Definition at line 1037 of file qqmldomelements_p.h.

◆ setAttachedTypePath()

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

Definition at line 1038 of file qqmldomelements_p.h.

◆ setEnumerations()

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

Definition at line 1021 of file qqmldomelements_p.h.

◆ setIsComposite()

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

Definition at line 1036 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 1035 of file qqmldomelements_p.h.

◆ setIsSingleton()

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

Definition at line 1034 of file qqmldomelements_p.h.

◆ setName()

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

Definition at line 1020 of file qqmldomelements_p.h.

◆ setObjects()

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

Definition at line 1032 of file qqmldomelements_p.h.

◆ updatePathFromOwner()

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

Reimplemented from QQmlJS::Dom::DomElement.

Reimplemented in QQmlJS::Dom::QmlComponent.

Definition at line 97 of file qqmldomelements.cpp.

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

Referenced by 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 1041 of file qqmldomelements_p.h.


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