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
QV4::CompiledData::Binding Struct Reference

#include <qv4compileddata_p.h>

+ Inheritance diagram for QV4::CompiledData::Binding:
+ Collaboration diagram for QV4::CompiledData::Binding:

Public Types

enum  Type : unsigned int {
  Type_Invalid , Type_Boolean , Type_Number , Type_String ,
  Type_Null , Type_Translation , Type_TranslationById , Type_Script ,
  Type_Object , Type_AttachedProperty , Type_GroupProperty
}
 
enum  Flag : unsigned int {
  IsSignalHandlerExpression = 0x1 , IsSignalHandlerObject = 0x2 , IsOnAssignment = 0x4 , InitializerForReadOnlyDeclaration = 0x8 ,
  IsResolvedEnum = 0x10 , IsListItem = 0x20 , IsBindingToAlias = 0x40 , IsDeferredBinding = 0x80 ,
  IsCustomParserBinding = 0x100 , IsFunctionExpression = 0x200 , IsPropertyObserver = 0x400
}
 
using FlagsField = quint32_le_bitfield_member<0, 16>
 
using TypeField = quint32_le_bitfield_member<16, 16>
 

Public Member Functions

 Q_DECLARE_FLAGS (Flags, Flag)
 
void clearFlags ()
 
void setFlag (Flag flag)
 
bool hasFlag (Flag flag) const
 
Flags flags () const
 
void setType (Type type)
 
Type type () const
 
bool hasSignalHandlerBindingFlag () const
 
bool isValueBinding () const
 
bool isValueBindingNoAlias () const
 
bool isValueBindingToAlias () const
 
bool isSignalHandler () const
 
bool isAttachedProperty () const
 
bool isGroupProperty () const
 
bool isFunctionExpression () const
 
bool isTranslationBinding () const
 
bool evaluatesToString () const
 
bool isNumberBinding () const
 
bool valueAsBoolean () const
 

Static Public Member Functions

static QString escapedString (const QString &string)
 

Public Attributes

quint32_le propertyNameIndex
 
quint32_le_bitfield_union< FlagsField, TypeFieldflagsAndType
 
union { 
 
   bool   b 
 
   quint32_le   constantValueIndex 
 
   quint32_le   compiledScriptIndex 
 
   quint32_le   objectIndex 
 
   quint32_le   translationDataIndex 
 
   quint32   nullMarker 
 
value 
 
quint32_le stringIndex
 
Location location
 
Location valueLocation
 

Detailed Description

Definition at line 545 of file qv4compileddata_p.h.

Member Typedef Documentation

◆ FlagsField

◆ TypeField

Member Enumeration Documentation

◆ Flag

enum QV4::CompiledData::Binding::Flag : unsigned int
Enumerator
IsSignalHandlerExpression 
IsSignalHandlerObject 
IsOnAssignment 
InitializerForReadOnlyDeclaration 
IsResolvedEnum 
IsListItem 
IsBindingToAlias 
IsDeferredBinding 
IsCustomParserBinding 
IsFunctionExpression 
IsPropertyObserver 

Definition at line 563 of file qv4compileddata_p.h.

◆ Type

enum QV4::CompiledData::Binding::Type : unsigned int
Enumerator
Type_Invalid 
Type_Boolean 
Type_Number 
Type_String 
Type_Null 
Type_Translation 
Type_TranslationById 
Type_Script 
Type_Object 
Type_AttachedProperty 
Type_GroupProperty 

Definition at line 549 of file qv4compileddata_p.h.

Member Function Documentation

◆ clearFlags()

void QV4::CompiledData::Binding::clearFlags ( )
inline

Definition at line 582 of file qv4compileddata_p.h.

References flagsAndType.

Referenced by QmlIR::IRBuilder::appendBinding(), QmlIR::IRBuilder::appendBinding(), and QmlIR::IRBuilder::resolveQualifiedId().

+ Here is the caller graph for this function:

◆ escapedString()

static QString QV4::CompiledData::Binding::escapedString ( const QString & string)
inlinestatic

Definition at line 661 of file qv4compileddata_p.h.

References i.

Referenced by QV4::CompiledData::CompilationUnit::bindingValueAsScriptString().

+ Here is the caller graph for this function:

◆ evaluatesToString()

bool QV4::CompiledData::Binding::evaluatesToString ( ) const
inline

Definition at line 708 of file qv4compileddata_p.h.

References isTranslationBinding(), type(), and Type_String.

+ Here is the call graph for this function:

◆ flags()

Flags QV4::CompiledData::Binding::flags ( ) const
inline

Definition at line 585 of file qv4compileddata_p.h.

References flagsAndType.

Referenced by hasSignalHandlerBindingFlag().

+ Here is the caller graph for this function:

◆ hasFlag()

bool QV4::CompiledData::Binding::hasFlag ( Flag flag) const
inline

Definition at line 584 of file qv4compileddata_p.h.

References flagsAndType.

Referenced by QQmlData::deferData(), isFunctionExpression(), isValueBindingNoAlias(), and isValueBindingToAlias().

+ Here is the caller graph for this function:

◆ hasSignalHandlerBindingFlag()

bool QV4::CompiledData::Binding::hasSignalHandlerBindingFlag ( ) const
inline

Definition at line 603 of file qv4compileddata_p.h.

References flags(), IsPropertyObserver, IsSignalHandlerExpression, and IsSignalHandlerObject.

Referenced by isSignalHandler(), and isValueBinding().

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

◆ isAttachedProperty()

bool QV4::CompiledData::Binding::isAttachedProperty ( ) const
inline

Definition at line 636 of file qv4compileddata_p.h.

References isGroupProperty(), isSignalHandler(), isValueBinding(), Q_ASSERT, type(), and Type_AttachedProperty.

Referenced by QmlIR::QmlUnitGenerator::generate(), isGroupProperty(), isSignalHandler(), and QmlIR::IRBuilder::resolveQualifiedId().

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

◆ isFunctionExpression()

bool QV4::CompiledData::Binding::isFunctionExpression ( ) const
inline

Definition at line 658 of file qv4compileddata_p.h.

References hasFlag(), and IsFunctionExpression.

+ Here is the call graph for this function:

◆ isGroupProperty()

bool QV4::CompiledData::Binding::isGroupProperty ( ) const
inline

Definition at line 647 of file qv4compileddata_p.h.

References isAttachedProperty(), isSignalHandler(), isValueBinding(), Q_ASSERT, type(), and Type_GroupProperty.

Referenced by QmlIR::QmlUnitGenerator::generate(), isAttachedProperty(), isSignalHandler(), and QmlIR::IRBuilder::resolveQualifiedId().

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

◆ isNumberBinding()

bool QV4::CompiledData::Binding::isNumberBinding ( ) const
inline

Definition at line 710 of file qv4compileddata_p.h.

References type(), and Type_Number.

+ Here is the call graph for this function:

◆ isSignalHandler()

bool QV4::CompiledData::Binding::isSignalHandler ( ) const
inline

Definition at line 625 of file qv4compileddata_p.h.

References hasSignalHandlerBindingFlag(), isAttachedProperty(), isGroupProperty(), isValueBinding(), and Q_ASSERT.

Referenced by QQuickPropertyChangesPrivate::decodeBinding(), QmlIR::QmlUnitGenerator::generate(), isAttachedProperty(), and isGroupProperty().

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

◆ isTranslationBinding()

bool QV4::CompiledData::Binding::isTranslationBinding ( ) const
inline

Definition at line 703 of file qv4compileddata_p.h.

References type(), Type_Translation, and Type_TranslationById.

Referenced by QQuickPropertyChanges::actions(), QQuickPropertyChangesPrivate::decodeBinding(), evaluatesToString(), and ListLayout::getRoleOrCreate().

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

◆ isValueBinding()

bool QV4::CompiledData::Binding::isValueBinding ( ) const
inline

Definition at line 611 of file qv4compileddata_p.h.

References hasSignalHandlerBindingFlag(), type(), Type_AttachedProperty, and Type_GroupProperty.

Referenced by QQmlAliasAnnotator::annotateBindingsToAliases(), isAttachedProperty(), isGroupProperty(), isSignalHandler(), isValueBindingNoAlias(), and isValueBindingToAlias().

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

◆ isValueBindingNoAlias()

bool QV4::CompiledData::Binding::isValueBindingNoAlias ( ) const
inline

Definition at line 622 of file qv4compileddata_p.h.

References hasFlag(), IsBindingToAlias, and isValueBinding().

Referenced by QmlIR::QmlUnitGenerator::generate().

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

◆ isValueBindingToAlias()

bool QV4::CompiledData::Binding::isValueBindingToAlias ( ) const
inline

Definition at line 623 of file qv4compileddata_p.h.

References hasFlag(), IsBindingToAlias, and isValueBinding().

Referenced by QmlIR::QmlUnitGenerator::generate().

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

◆ Q_DECLARE_FLAGS()

QV4::CompiledData::Binding::Q_DECLARE_FLAGS ( Flags ,
Flag  )

◆ setFlag()

void QV4::CompiledData::Binding::setFlag ( Flag flag)
inline

Definition at line 583 of file qv4compileddata_p.h.

References flagsAndType.

Referenced by QQmlAliasAnnotator::annotateBindingsToAliases(), QmlIR::IRBuilder::appendBinding(), QmlIR::IRBuilder::resolveQualifiedId(), and QmlIR::IRBuilder::setBindingValue().

+ Here is the caller graph for this function:

◆ setType()

void QV4::CompiledData::Binding::setType ( Type type)
inline

Definition at line 587 of file qv4compileddata_p.h.

References flagsAndType, and type().

Referenced by QmlIR::IRBuilder::appendBinding(), QmlIR::IRBuilder::resolveQualifiedId(), QmlIR::IRBuilder::setBindingValue(), and QmlIR::IRBuilder::tryGeneratingTranslationBinding().

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

◆ type()

◆ valueAsBoolean()

bool QV4::CompiledData::Binding::valueAsBoolean ( ) const
inline

Definition at line 712 of file qv4compileddata_p.h.

References type(), and Type_Boolean.

Referenced by QQuickPropertyChangesPrivate::decodeBinding(), and QQmlBindPrivate::decodeBinding().

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

Member Data Documentation

◆ b

bool QV4::CompiledData::Binding::b

Definition at line 591 of file qv4compileddata_p.h.

◆ compiledScriptIndex

quint32_le QV4::CompiledData::Binding::compiledScriptIndex

Definition at line 593 of file qv4compileddata_p.h.

◆ constantValueIndex

quint32_le QV4::CompiledData::Binding::constantValueIndex

Definition at line 592 of file qv4compileddata_p.h.

◆ flagsAndType

quint32_le_bitfield_union<FlagsField, TypeField> QV4::CompiledData::Binding::flagsAndType

Definition at line 580 of file qv4compileddata_p.h.

Referenced by clearFlags(), flags(), hasFlag(), setFlag(), setType(), and type().

◆ location

◆ nullMarker

quint32 QV4::CompiledData::Binding::nullMarker

Definition at line 596 of file qv4compileddata_p.h.

◆ objectIndex

quint32_le QV4::CompiledData::Binding::objectIndex

Definition at line 594 of file qv4compileddata_p.h.

◆ propertyNameIndex

◆ stringIndex

◆ translationDataIndex

quint32_le QV4::CompiledData::Binding::translationDataIndex

Definition at line 595 of file qv4compileddata_p.h.

◆ [union]

◆ valueLocation


The documentation for this struct was generated from the following file: