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::PropertyKey Struct Reference

#include <qv4propertykey_p.h>

+ Collaboration diagram for QV4::PropertyKey:

Public Types

enum  FunctionNamePrefix { None , Getter , Setter }
 

Public Member Functions

bool isStringOrSymbol () const
 
uint asArrayIndex () const
 
bool isArrayIndex () const
 
bool isValid () const
 
template<typename StringOrSymbol = Heap::StringOrSymbol>
StringOrSymbolasStringOrSymbol () const
 
Q_QML_EXPORT bool isString () const
 
Q_QML_EXPORT bool isSymbol () const
 
bool isCanonicalNumericIndexString () const
 
Q_QML_EXPORT QString toQString () const
 
Heap::StringOrSymboltoStringOrSymbol (ExecutionEngine *e)
 
quint64 id () const
 
Heap::StringasFunctionName (ExecutionEngine *e, FunctionNamePrefix prefix) const
 
bool operator== (const PropertyKey &other) const
 
bool operator!= (const PropertyKey &other) const
 
bool operator< (const PropertyKey &other) const
 

Static Public Member Functions

static PropertyKey invalid ()
 
static PropertyKey fromArrayIndex (uint idx)
 
template<typename StringOrSymbol = Heap::StringOrSymbol, typename Engine = QV4::EngineBase>
static PropertyKey fromStringOrSymbol (Engine *engine, StringOrSymbol *b)
 
static PropertyKey fromId (quint64 id)
 

Friends

size_t qHash (const PropertyKey &key, size_t seed=0)
 

Detailed Description

Definition at line 28 of file qv4propertykey_p.h.

Member Enumeration Documentation

◆ FunctionNamePrefix

Enumerator
None 
Getter 
Setter 

Definition at line 111 of file qv4propertykey_p.h.

Member Function Documentation

◆ asArrayIndex()

uint QV4::PropertyKey::asArrayIndex ( ) const
inline

Definition at line 62 of file qv4propertykey_p.h.

References isArrayIndex(), and Q_ASSERT.

Referenced by toStringOrSymbol().

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

◆ asFunctionName()

QV4::Heap::String * QV4::PropertyKey::asFunctionName ( ExecutionEngine * e,
FunctionNamePrefix prefix ) const

Definition at line 58 of file qv4propertykey.cpp.

References engine, QV4::Getter, QString::mid(), QString::number(), QV4::Setter, QString::size(), and str.

Referenced by QV4::Runtime::CreateClass::call().

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

◆ asStringOrSymbol()

template<typename StringOrSymbol = Heap::StringOrSymbol>
StringOrSymbol * QV4::PropertyKey::asStringOrSymbol ( ) const
inline

Definition at line 92 of file qv4propertykey_p.h.

Referenced by QV4::Heap::StringOrSymbol::markObjects(), QV4::IdentifierHashData::markObjects(), and toStringOrSymbol().

+ Here is the caller graph for this function:

◆ fromArrayIndex()

static PropertyKey QV4::PropertyKey::fromArrayIndex ( uint idx)
inlinestatic

◆ fromId()

static PropertyKey QV4::PropertyKey::fromId ( quint64 id)
inlinestatic

Definition at line 107 of file qv4propertykey_p.h.

References QV4::StaticValue::_val, and id().

Referenced by QV4::SharedInternalClassDataPrivate< PropertyKey >::at(), QJSValueIterator::hasNext(), QJSValueIterator::name(), QJSValueIterator::next(), ProxyObjectOwnPropertyKeyIterator::next(), QJSValueIterator::value(), and QV4::ProxyObject::virtualOwnPropertyKeys().

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

◆ fromStringOrSymbol()

template<typename StringOrSymbol = Heap::StringOrSymbol, typename Engine = QV4::EngineBase>
static PropertyKey QV4::PropertyKey::fromStringOrSymbol ( Engine * engine,
StringOrSymbol * b )
inlinestatic

Definition at line 75 of file qv4propertykey_p.h.

References engine, QV4::WriteBarrier::isInsertionBarrier, QV4::WriteBarrier::markCustom(), and Q_ASSERT.

Referenced by QV4::IdentifierTable::addEntry(), and QV4::Heap::Symbol::init().

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

◆ id()

quint64 QV4::PropertyKey::id ( ) const
inline

Definition at line 106 of file qv4propertykey_p.h.

Referenced by QV4::IdentifierTable::addEntry(), QV4::PropertyHash::detach(), fromId(), QV4::PropertyHash::lookup(), QV4::IdentifierTable::sweep(), and QV4::ProxyObject::virtualOwnPropertyKeys().

+ Here is the caller graph for this function:

◆ invalid()

static PropertyKey QV4::PropertyKey::invalid ( )
inlinestatic

◆ isArrayIndex()

bool QV4::PropertyKey::isArrayIndex ( ) const
inline

Definition at line 68 of file qv4propertykey_p.h.

Referenced by asArrayIndex(), and toStringOrSymbol().

+ Here is the caller graph for this function:

◆ isCanonicalNumericIndexString()

bool QV4::PropertyKey::isCanonicalNumericIndexString ( ) const

Definition at line 31 of file qv4propertykey.cpp.

References d, QV4::Scope::engine, QV4::Value::fromDouble(), str, and QV4::toString().

+ Here is the call graph for this function:

◆ isString()

bool QV4::PropertyKey::isString ( ) const

Definition at line 21 of file qv4propertykey.cpp.

◆ isStringOrSymbol()

bool QV4::PropertyKey::isStringOrSymbol ( ) const
inline

Definition at line 61 of file qv4propertykey_p.h.

Referenced by QV4::Heap::InternalClass::addMember().

+ Here is the caller graph for this function:

◆ isSymbol()

bool QV4::PropertyKey::isSymbol ( ) const

Definition at line 26 of file qv4propertykey.cpp.

◆ isValid()

bool QV4::PropertyKey::isValid ( ) const
inline

Definition at line 69 of file qv4propertykey_p.h.

Referenced by QV4::PropertyHash::addEntry(), QV4::PropertyHash::detach(), QV4::IdentifierHash::findId(), QV4::PropertyHash::lookup(), and QV4::ProxyObject::virtualOwnPropertyKeys().

+ Here is the caller graph for this function:

◆ operator!=()

bool QV4::PropertyKey::operator!= ( const PropertyKey & other) const
inline

Definition at line 119 of file qv4propertykey_p.h.

References other().

+ Here is the call graph for this function:

◆ operator<()

bool QV4::PropertyKey::operator< ( const PropertyKey & other) const
inline

Definition at line 120 of file qv4propertykey_p.h.

References other().

+ Here is the call graph for this function:

◆ operator==()

bool QV4::PropertyKey::operator== ( const PropertyKey & other) const
inline

Definition at line 118 of file qv4propertykey_p.h.

References other().

+ Here is the call graph for this function:

◆ toQString()

QString QV4::PropertyKey::toQString ( ) const

Definition at line 49 of file qv4propertykey.cpp.

References QString::number(), and Q_ASSERT.

Referenced by QV4::IdentifierHash::findId().

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

◆ toStringOrSymbol()

QV4::Heap::StringOrSymbol * QV4::PropertyKey::toStringOrSymbol ( QV4::ExecutionEngine * e)

Definition at line 14 of file qv4propertykey.cpp.

References asArrayIndex(), asStringOrSymbol(), QV4::Value::fromUInt32(), and isArrayIndex().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ qHash

size_t qHash ( const PropertyKey & key,
size_t seed = 0 )
friend

Definition at line 121 of file qv4propertykey_p.h.


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