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

#include <qv4compileddata_p.h>

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

Public Member Functions

TypeReferenceadd (int nameIndex, const Location &loc)
 
template<typename CompiledObject>
void collectFromObject (const CompiledObject *obj)
 
template<typename Iterator>
void collectFromObjects (Iterator it, Iterator end)
 
- Public Member Functions inherited from QHash< int, TypeReference >
 QHash () noexcept=default
 Constructs an empty hash.
 
 QHash (std::initializer_list< std::pair< int, TypeReference > > list)
 
 QHash (const QHash &other) noexcept
 Constructs a copy of other.
 
 QHash (QHash &&other) noexcept
 Move-constructs a QHash instance, making it point at the same object that other was pointing to.
 
 QHash (InputIterator f, InputIterator l)
 
 QHash (InputIterator f, InputIterator l)
 
 ~QHash ()
 Destroys the hash.
 
QHashoperator= (const QHash &other) noexcept(std::is_nothrow_destructible< Node >::value)
 Assigns other to this hash and returns a reference to this hash.
 
void swap (QHash &other) noexcept
 
bool remove (const K &key)
 
qsizetype removeIf (Predicate pred)
 
TypeReference take (const int &key)
 Removes the item with the key from the hash and returns the value associated with it.
 
TypeReference take (const K &key)
 
bool contains (const int &key) const noexcept
 Returns true if the hash contains an item with the key; otherwise returns false.
 
bool contains (const K &key) const
 
qsizetype count (const int &key) const noexcept
 Returns the number of items associated with the key.
 
qsizetype count () const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Same as size().
 
qsizetype count (const K &key) const
 
int key (const TypeReference &value) const noexcept
 
int key (const TypeReference &value, const int &defaultKey) const noexcept
 
TypeReference value (const int &key) const noexcept
 
TypeReference value (const int &key, const TypeReference &defaultValue) const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the value associated with the key.
 
TypeReference value (const K &key) const noexcept
 
TypeReference value (const K &key, const TypeReference &defaultValue) const noexcept
 
TypeReference & operator[] (const int &key)
 Returns the value associated with the key as a modifiable reference.
 
const TypeReference operator[] (const int &key) const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Same as value().
 
TypeReference & operator[] (const K &key)
 
const TypeReference operator[] (const K &key) const noexcept
 
QList< int > keys () const
 Returns a list containing all the keys in the hash, in an arbitrary order.
 
QList< int > keys (const TypeReference &value) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a list containing all the keys associated with value value, in an arbitrary order.
 
QList< TypeReference > values () const
 Returns a list containing all the values in the hash, in an arbitrary order.
 
iterator begin ()
 Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
 
const_iterator begin () const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const_iterator cbegin () const noexcept
 
const_iterator constBegin () const noexcept
 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
 
iterator end () noexcept
 Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the hash.
 
const_iterator end () const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const_iterator cend () const noexcept
 
const_iterator constEnd () const noexcept
 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the hash.
 
key_iterator keyBegin () const noexcept
 
key_iterator keyEnd () const noexcept
 
key_value_iterator keyValueBegin ()
 
const_key_value_iterator keyValueBegin () const noexcept
 
key_value_iterator keyValueEnd ()
 
const_key_value_iterator keyValueEnd () const noexcept
 
const_key_value_iterator constKeyValueBegin () const noexcept
 
const_key_value_iterator constKeyValueEnd () const noexcept
 
auto asKeyValueRange () &
 
auto asKeyValueRange () const &
 
auto asKeyValueRange () &&
 
auto asKeyValueRange () const &&
 
iterator erase (const_iterator it)
 
std::pair< iterator, iterator > equal_range (const int &key)
 
std::pair< const_iterator, const_iterator > equal_range (const int &key) const noexcept
 
std::pair< iterator, iterator > equal_range (const K &key)
 
std::pair< const_iterator, const_iterator > equal_range (const K &key) const noexcept
 
iterator find (const int &key)
 Returns an iterator pointing to the item with the key in the hash.
 
const_iterator find (const int &key) const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
iterator find (const K &key)
 
const_iterator find (const K &key) const noexcept
 
const_iterator constFind (const int &key) const noexcept
 
const_iterator constFind (const K &key) const noexcept
 
iterator insert (const int &key, const TypeReference &value)
 Inserts a new item with the key and a value of value.
 
void insert (const QHash &hash)
 
iterator emplace (const int &key, Args &&... args)
 
iterator emplace (int &&key, Args &&... args)
 Inserts a new element into the container.
 
TryEmplaceResult tryEmplace (const int &key, Args &&...args)
 \variable QHash::TryEmplaceResult::iterator
 
TryEmplaceResult tryEmplace (int &&key, Args &&...args)
 
TryEmplaceResult tryEmplace (K &&key, Args &&...args)
 
TryEmplaceResult tryInsert (const int &key, const TypeReference &value)
 
TryEmplaceResult tryInsert (K &&key, const TypeReference &value)
 
std::pair< key_value_iterator, bool > try_emplace (const int &key, Args &&...args)
 
std::pair< key_value_iterator, bool > try_emplace (int &&key, Args &&...args)
 
key_value_iterator try_emplace (const_iterator, const int &key, Args &&...args)
 
key_value_iterator try_emplace (const_iterator, int &&key, Args &&...args)
 
std::pair< key_value_iterator, bool > try_emplace (K &&key, Args &&...args)
 
key_value_iterator try_emplace (const_iterator, K &&key, Args &&...args)
 
TryEmplaceResult insertOrAssign (const int &key, Value &&value)
 
TryEmplaceResult insertOrAssign (int &&key, Value &&value)
 
TryEmplaceResult insertOrAssign (K &&key, Value &&value)
 
std::pair< key_value_iterator, bool > insert_or_assign (const int &key, Value &&value)
 
std::pair< key_value_iterator, bool > insert_or_assign (int &&key, Value &&value)
 
key_value_iterator insert_or_assign (const_iterator, const int &key, Value &&value)
 
key_value_iterator insert_or_assign (const_iterator, int &&key, Value &&value)
 
std::pair< key_value_iterator, bool > insert_or_assign (K &&key, Value &&value)
 
key_value_iterator insert_or_assign (const_iterator, K &&key, Value &&value)
 
float load_factor () const noexcept
 Returns the current load factor of the QHash's internal hash table.
 
size_t bucket_count () const noexcept
 
bool empty () const noexcept
 This function is provided for STL compatibility.
 

Additional Inherited Members

- Public Types inherited from QHash< int, TypeReference >
using key_type
 Typedef for Key.
 
using mapped_type
 Typedef for T.
 
using value_type
 
using size_type
 Typedef for int.
 
using difference_type
 Typedef for ptrdiff_t.
 
using reference
 
using const_reference
 
typedef QKeyValueIterator< const int &, const TypeReference &, const_iterator > const_key_value_iterator
 \inmodule QtCore
 
typedef QKeyValueIterator< const int &, TypeReference &, iterator > key_value_iterator
 \inmodule QtCore
 
typedef iterator Iterator
 Qt-style synonym for QHash::iterator.
 
typedef const_iterator ConstIterator
 Qt-style synonym for QHash::const_iterator.
 
- Static Public Member Functions inherited from QHash< int, TypeReference >
static float max_load_factor () noexcept
 
static size_t max_bucket_count () noexcept
 

Detailed Description

Definition at line 1405 of file qv4compileddata_p.h.

Member Function Documentation

◆ add()

TypeReference & QV4::CompiledData::TypeReferenceMap::add ( int nameIndex,
const Location & loc )
inline

Definition at line 1407 of file qv4compileddata_p.h.

Referenced by collectFromObject().

+ Here is the caller graph for this function:

◆ collectFromObject()

template<typename CompiledObject>
void QV4::CompiledData::TypeReferenceMap::collectFromObject ( const CompiledObject * obj)
inline

Definition at line 1415 of file qv4compileddata_p.h.

References add(), QV4::CompiledData::TypeReference::errorWhenNotFound, QV4::CompiledData::TypeReference::needsCreation, and QV4::CompiledData::Binding::Type_AttachedProperty.

+ Here is the call graph for this function:

◆ collectFromObjects()

template<typename Iterator>
void QV4::CompiledData::TypeReferenceMap::collectFromObjects ( Iterator it,
Iterator end )
inline

Definition at line 1447 of file qv4compileddata_p.h.


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