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::QmlObject Class Referencefinal

#include <qqmldomelements_p.h>

Inheritance diagram for QQmlJS::Dom::QmlObject:
Collaboration diagram for QQmlJS::Dom::QmlObject:

Public Member Functions

DomType kind () const override
 QmlObject (const Path &pathFromOwner=Path())
bool iterateDirectSubpaths (const DomItem &self, DirectVisitor) const override
bool iterateBaseDirectSubpaths (const DomItem &self, DirectVisitor) const
QList< QStringfields () const
QList< QStringfields (const DomItem &) const override
DomItem field (const DomItem &self, QStringView name) const override
void updatePathFromOwner (const Path &newPath) override
QString localDefaultPropertyName () const
QString defaultPropertyName (const DomItem &self) const
bool iterateSubOwners (const DomItem &self, function_ref< bool(const DomItem &owner)> visitor) const
QString idStr () const
QString name () const
const QList< Path > & prototypePaths () const &
Path nextScopePath () const
const QMultiMap< QString, PropertyDefinition > & propertyDefs () const &
const QMultiMap< QString, Binding > & bindings () const &
const QMultiMap< QString, MethodInfo > & methods () const &
QList< QmlObjectchildren () const
QList< QmlObjectannotations () const
void setIdStr (const QString &id)
void setName (const QString &name)
void setDefaultPropertyName (const QString &name)
void setPrototypePaths (const QList< Path > &prototypePaths)
Path addPrototypePath (const Path &prototypePath)
void setNextScopePath (const Path &nextScopePath)
void setPropertyDefs (const QMultiMap< QString, PropertyDefinition > &propertyDefs)
void setBindings (const QMultiMap< QString, Binding > &bindings)
void setMethods (const QMultiMap< QString, MethodInfo > &functionDefs)
void setChildren (const QList< QmlObject > &children)
void setAnnotations (const QList< QmlObject > &annotations)
Path addPropertyDef (const PropertyDefinition &propertyDef, AddOption option, PropertyDefinition **pDef=nullptr)
MutableDomItem addPropertyDef (MutableDomItem &self, const PropertyDefinition &propertyDef, AddOption option)
Path addBinding (const Binding &binding, AddOption option, Binding **bPtr=nullptr)
MutableDomItem addBinding (MutableDomItem &self, const Binding &binding, AddOption option)
Path addMethod (const MethodInfo &functionDef, AddOption option, MethodInfo **mPtr=nullptr)
MutableDomItem addMethod (MutableDomItem &self, const MethodInfo &functionDef, AddOption option)
Path addChild (const QmlObject &child, QmlObject **cPtr=nullptr)
MutableDomItem addChild (MutableDomItem &self, const QmlObject &child)
Path addAnnotation (const QmlObject &annotation, QmlObject **aPtr=nullptr)
QList< std::pair< SourceLocation, DomItem > > orderOfAttributes (const DomItem &self, const DomItem &component) const
void writeOutAttributes (const DomItem &self, OutWriter &ow, const DomItem &component, const QString &code) const
void writeOutSortedEnumerations (const DomItem &component, OutWriter &ow) const
void writeOutSortedAttributes (const DomItem &self, OutWriter &ow, const DomItem &component) const
void writeOutSortedPropertyDefinition (const DomItem &self, OutWriter &ow, QSet< QString > &mergedDefBinding) const
void writeOutId (const DomItem &self, OutWriter &ow) const
void writeOut (const DomItem &self, OutWriter &ow, const QString &onTarget) const
void writeOut (const DomItem &self, OutWriter &lw) const override
LocallyResolvedAlias resolveAlias (const DomItem &self, std::shared_ptr< ScriptExpression > accessSequence) const
LocallyResolvedAlias resolveAlias (const DomItem &self, const QStringList &accessSequence) const
QQmlJSScope::ConstPtr semanticScope () const
void setSemanticScope (const QQmlJSScope::ConstPtr &scope)
ScriptElementVariant nameIdentifiers () const
void setNameIdentifiers (const ScriptElementVariant &name)
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 override
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 DomKind domKind () const
virtual void dump (const DomItem &, const Sink &sink, int indent, FilterT filter) const
virtual quintptr id () const
QString typeName () 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 QCborValue value () const

Static Public Attributes

static constexpr DomType kindValue = DomType::QmlObject

Friends

class QQmlDomAstCreatorBase

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

Constructor & Destructor Documentation

◆ QmlObject()

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

Definition at line 393 of file qqmldomelements.cpp.

References QQmlJS::Dom::CommentableDomElement::CommentableDomElement().

Here is the call graph for this function:

Member Function Documentation

◆ addAnnotation()

Path QQmlJS::Dom::QmlObject::addAnnotation ( const QmlObject & annotation,
QmlObject ** aPtr = nullptr )
inline

Definition at line 909 of file qqmldomelements_p.h.

◆ addBinding() [1/2]

Path QQmlJS::Dom::QmlObject::addBinding ( const Binding & binding,
AddOption option,
Binding ** bPtr = nullptr )
inline

Definition at line 887 of file qqmldomelements_p.h.

Referenced by addBinding().

Here is the caller graph for this function:

◆ addBinding() [2/2]

MutableDomItem QQmlJS::Dom::QmlObject::addBinding ( MutableDomItem & self,
const Binding & binding,
AddOption option )

Definition at line 702 of file qqmldomelements.cpp.

References addBinding(), QQmlJS::Dom::domParsingErrors(), QQmlJS::Dom::ErrorGroups::error(), QQmlJS::Dom::Path::last(), QQmlJS::Dom::MutableDomItem::owner(), and QQmlJS::Dom::MutableDomItem::path().

Referenced by QQmlJS::Dom::MutableDomItem::addBinding().

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

◆ addChild() [1/2]

Path QQmlJS::Dom::QmlObject::addChild ( const QmlObject & child,
QmlObject ** cPtr = nullptr )
inline

Definition at line 899 of file qqmldomelements_p.h.

Referenced by addChild().

Here is the caller graph for this function:

◆ addChild() [2/2]

MutableDomItem QQmlJS::Dom::QmlObject::addChild ( MutableDomItem & self,
const QmlObject & child )
inline

Definition at line 904 of file qqmldomelements_p.h.

References QQmlJS::Dom::MutableDomItem::MutableDomItem(), addChild(), QQmlJS::Dom::MutableDomItem::item(), and QQmlJS::Dom::MutableDomItem::owner().

Referenced by QQmlJS::Dom::MutableDomItem::addChild().

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

◆ addMethod() [1/2]

Path QQmlJS::Dom::QmlObject::addMethod ( const MethodInfo & functionDef,
AddOption option,
MethodInfo ** mPtr = nullptr )
inline

Definition at line 893 of file qqmldomelements_p.h.

Referenced by addMethod().

Here is the caller graph for this function:

◆ addMethod() [2/2]

MutableDomItem QQmlJS::Dom::QmlObject::addMethod ( MutableDomItem & self,
const MethodInfo & functionDef,
AddOption option )

Definition at line 711 of file qqmldomelements.cpp.

References addMethod(), QQmlJS::Dom::domParsingErrors(), QQmlJS::Dom::ErrorGroups::error(), QQmlJS::Dom::Path::last(), QQmlJS::Dom::MutableDomItem::owner(), and QQmlJS::Dom::MutableDomItem::path().

Referenced by QQmlJS::Dom::MutableDomItem::addMethod().

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

◆ addPropertyDef() [1/2]

Path QQmlJS::Dom::QmlObject::addPropertyDef ( const PropertyDefinition & propertyDef,
AddOption option,
PropertyDefinition ** pDef = nullptr )
inline

Definition at line 877 of file qqmldomelements_p.h.

Referenced by addPropertyDef().

Here is the caller graph for this function:

◆ addPropertyDef() [2/2]

MutableDomItem QQmlJS::Dom::QmlObject::addPropertyDef ( MutableDomItem & self,
const PropertyDefinition & propertyDef,
AddOption option )

Definition at line 692 of file qqmldomelements.cpp.

References addPropertyDef(), QQmlJS::Dom::domParsingErrors(), QQmlJS::Dom::ErrorGroups::error(), QQmlJS::Dom::Path::last(), QQmlJS::Dom::MutableDomItem::owner(), and QQmlJS::Dom::MutableDomItem::path().

Referenced by QQmlJS::Dom::MutableDomItem::addPropertyDef().

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

◆ addPrototypePath()

Path QQmlJS::Dom::QmlObject::addPrototypePath ( const Path & prototypePath)
inline

Definition at line 846 of file qqmldomelements_p.h.

◆ annotations()

QList< QmlObject > QQmlJS::Dom::QmlObject::annotations ( ) const
inline

Definition at line 840 of file qqmldomelements_p.h.

◆ bindings()

const QMultiMap< QString, Binding > & QQmlJS::Dom::QmlObject::bindings ( ) const &
inline

Definition at line 837 of file qqmldomelements_p.h.

◆ children()

QList< QmlObject > QQmlJS::Dom::QmlObject::children ( ) const
inline

Definition at line 839 of file qqmldomelements_p.h.

◆ defaultPropertyName()

QString QQmlJS::Dom::QmlObject::defaultPropertyName ( const DomItem & self) const

Definition at line 527 of file qqmldomelements.cpp.

References kindValue, and QQmlJS::Dom::SkipFirst.

◆ field()

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

Reimplemented from QQmlJS::Dom::DomBase.

Definition at line 449 of file qqmldomelements.cpp.

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

Here is the call graph for this function:

◆ fields() [1/2]

QList< QString > QQmlJS::Dom::QmlObject::fields ( ) const

Definition at line 428 of file qqmldomelements.cpp.

◆ fields() [2/2]

QList< QString > QQmlJS::Dom::QmlObject::fields ( const DomItem & ) const
inlineoverridevirtual

Reimplemented from QQmlJS::Dom::DomBase.

Definition at line 824 of file qqmldomelements_p.h.

◆ idStr()

QString QQmlJS::Dom::QmlObject::idStr ( ) const
inline

Definition at line 832 of file qqmldomelements_p.h.

◆ iterateBaseDirectSubpaths()

bool QQmlJS::Dom::QmlObject::iterateBaseDirectSubpaths ( const DomItem & self,
DirectVisitor visitor ) const

Definition at line 395 of file qqmldomelements.cpp.

References nextScopePath().

Here is the call graph for this function:

◆ iterateDirectSubpaths()

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

Reimplemented from QQmlJS::Dom::CommentableDomElement.

Definition at line 440 of file qqmldomelements.cpp.

◆ iterateSubOwners()

bool QQmlJS::Dom::QmlObject::iterateSubOwners ( const DomItem & self,
function_ref< bool(const DomItem &owner)> visitor ) const

Definition at line 548 of file qqmldomelements.cpp.

References kindValue.

◆ kind()

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

Implements QQmlJS::Dom::DomBase.

Definition at line 818 of file qqmldomelements_p.h.

◆ localDefaultPropertyName()

QString QQmlJS::Dom::QmlObject::localDefaultPropertyName ( ) const

Definition at line 517 of file qqmldomelements.cpp.

◆ methods()

const QMultiMap< QString, MethodInfo > & QQmlJS::Dom::QmlObject::methods ( ) const &
inline

Definition at line 838 of file qqmldomelements_p.h.

◆ name()

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

Definition at line 833 of file qqmldomelements_p.h.

◆ nameIdentifiers()

ScriptElementVariant QQmlJS::Dom::QmlObject::nameIdentifiers ( ) const
inline

Definition at line 937 of file qqmldomelements_p.h.

◆ nextScopePath()

Path QQmlJS::Dom::QmlObject::nextScopePath ( ) const
inline

Definition at line 835 of file qqmldomelements_p.h.

Referenced by field(), and iterateBaseDirectSubpaths().

Here is the caller graph for this function:

◆ orderOfAttributes()

QList< std::pair< SourceLocation, DomItem > > QQmlJS::Dom::QmlObject::orderOfAttributes ( const DomItem & self,
const DomItem & component ) const

Definition at line 743 of file qqmldomelements.cpp.

References QQmlJS::Dom::FileLocations::find(), QQmlJS::Dom::Path::last(), QQmlJS::Dom::DomItem::pathFromOwner(), and QQmlJS::Dom::FileLocations::treeOf().

Here is the call graph for this function:

◆ propertyDefs()

const QMultiMap< QString, PropertyDefinition > & QQmlJS::Dom::QmlObject::propertyDefs ( ) const &
inline

Definition at line 836 of file qqmldomelements_p.h.

◆ prototypePaths()

const QList< Path > & QQmlJS::Dom::QmlObject::prototypePaths ( ) const &
inline

Definition at line 834 of file qqmldomelements_p.h.

◆ resolveAlias() [1/2]

◆ resolveAlias() [2/2]

LocallyResolvedAlias QQmlJS::Dom::QmlObject::resolveAlias ( const DomItem & self,
std::shared_ptr< ScriptExpression > accessSequence ) const

Definition at line 597 of file qqmldomelements.cpp.

References resolveAlias().

Referenced by resolveAlias().

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

◆ semanticScope()

QQmlJSScope::ConstPtr QQmlJS::Dom::QmlObject::semanticScope ( ) const
inline

Definition at line 934 of file qqmldomelements_p.h.

◆ setAnnotations()

void QQmlJS::Dom::QmlObject::setAnnotations ( const QList< QmlObject > & annotations)
inline

Definition at line 871 of file qqmldomelements_p.h.

References QQmlJS::Dom::DomElement::pathFromOwner(), and updatePathFromOwner().

Here is the call graph for this function:

◆ setBindings()

void QQmlJS::Dom::QmlObject::setBindings ( const QMultiMap< QString, Binding > & bindings)
inline

Definition at line 860 of file qqmldomelements_p.h.

◆ setChildren()

void QQmlJS::Dom::QmlObject::setChildren ( const QList< QmlObject > & children)
inline

Definition at line 865 of file qqmldomelements_p.h.

References QQmlJS::Dom::DomElement::pathFromOwner(), and updatePathFromOwner().

Here is the call graph for this function:

◆ setDefaultPropertyName()

void QQmlJS::Dom::QmlObject::setDefaultPropertyName ( const QString & name)
inline

Definition at line 844 of file qqmldomelements_p.h.

◆ setIdStr()

void QQmlJS::Dom::QmlObject::setIdStr ( const QString & id)
inline

Definition at line 842 of file qqmldomelements_p.h.

◆ setMethods()

void QQmlJS::Dom::QmlObject::setMethods ( const QMultiMap< QString, MethodInfo > & functionDefs)
inline

Definition at line 861 of file qqmldomelements_p.h.

◆ setName()

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

Definition at line 843 of file qqmldomelements_p.h.

◆ setNameIdentifiers()

void QQmlJS::Dom::QmlObject::setNameIdentifiers ( const ScriptElementVariant & name)
inline

Definition at line 938 of file qqmldomelements_p.h.

◆ setNextScopePath()

void QQmlJS::Dom::QmlObject::setNextScopePath ( const Path & nextScopePath)
inline

Definition at line 855 of file qqmldomelements_p.h.

◆ setPropertyDefs()

void QQmlJS::Dom::QmlObject::setPropertyDefs ( const QMultiMap< QString, PropertyDefinition > & propertyDefs)
inline

Definition at line 856 of file qqmldomelements_p.h.

◆ setPrototypePaths()

void QQmlJS::Dom::QmlObject::setPrototypePaths ( const QList< Path > & prototypePaths)
inline

Definition at line 845 of file qqmldomelements_p.h.

◆ setSemanticScope()

void QQmlJS::Dom::QmlObject::setSemanticScope ( const QQmlJSScope::ConstPtr & scope)
inline

Definition at line 935 of file qqmldomelements_p.h.

◆ updatePathFromOwner()

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

Reimplemented from QQmlJS::Dom::DomElement.

Definition at line 507 of file qqmldomelements.cpp.

References QQmlJS::Dom::DomElement::updatePathFromOwner().

Referenced by setAnnotations(), and setChildren().

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

◆ writeOut() [1/2]

void QQmlJS::Dom::QmlObject::writeOut ( const DomItem & self,
OutWriter & lw ) const
inlineoverridevirtual

Reimplemented from QQmlJS::Dom::DomBase.

Definition at line 928 of file qqmldomelements_p.h.

◆ writeOut() [2/2]

void QQmlJS::Dom::QmlObject::writeOut ( const DomItem & self,
OutWriter & ow,
const QString & onTarget ) const

Definition at line 1079 of file qqmldomelements.cpp.

References QQmlJS::Dom::DomItem::containingObject(), QQmlJS::Dom::DomElement::pathFromOwner(), QQmlJS::Dom::FileLocations::treeOf(), writeOutId(), and writeOutSortedAttributes().

Here is the call graph for this function:

◆ writeOutAttributes()

void QQmlJS::Dom::QmlObject::writeOutAttributes ( const DomItem & self,
OutWriter & ow,
const DomItem & component,
const QString & code ) const

Definition at line 814 of file qqmldomelements.cpp.

References QQmlJS::Dom::Binding, QQmlJS::Dom::DomItem::canonicalPath(), QQmlJS::Dom::PropertyDefinition, QQmlJS::Dom::FileLocations::treeOf(), QQmlJS::Dom::DomItem::writeOutPost(), QQmlJS::Dom::DomItem::writeOutPre(), and QQmlJS::Dom::Binding::writeOutValue().

Here is the call graph for this function:

◆ writeOutId()

void QQmlJS::Dom::QmlObject::writeOutId ( const DomItem & self,
OutWriter & ow ) const

Definition at line 721 of file qqmldomelements.cpp.

References QQmlJS::Dom::FileLocations::treeOf(), QQmlJS::Dom::DomItem::writeOutPost(), and QQmlJS::Dom::DomItem::writeOutPre().

Referenced by writeOut().

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

◆ writeOutSortedAttributes()

void QQmlJS::Dom::QmlObject::writeOutSortedAttributes ( const DomItem & self,
OutWriter & ow,
const DomItem & component ) const

Definition at line 984 of file qqmldomelements.cpp.

References writeOutSortedEnumerations().

Referenced by writeOut().

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

◆ writeOutSortedEnumerations()

void QQmlJS::Dom::QmlObject::writeOutSortedEnumerations ( const DomItem & component,
OutWriter & ow ) const

Definition at line 869 of file qqmldomelements.cpp.

Referenced by writeOutSortedAttributes().

Here is the caller graph for this function:

◆ writeOutSortedPropertyDefinition()

void QQmlJS::Dom::QmlObject::writeOutSortedPropertyDefinition ( const DomItem & self,
OutWriter & ow,
QSet< QString > & mergedDefBinding ) const

Definition at line 882 of file qqmldomelements.cpp.

◆ QQmlDomAstCreatorBase

friend class QQmlDomAstCreatorBase
friend

Definition at line 941 of file qqmldomelements_p.h.

Member Data Documentation

◆ kindValue


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