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

#include <qv4sparsearray_p.h>

+ Collaboration diagram for QV4::SparseArray:

Public Types

typedef uint key_type
 
typedef int mapped_type
 
typedef qptrdiff difference_type
 
typedef int size_type
 

Public Member Functions

 SparseArray ()
 
 ~SparseArray ()
 
 SparseArray (const SparseArray &other)
 
SparseArrayNodecreateNode (uint sl, SparseArrayNode *parent, bool left)
 
void freeTree (SparseArrayNode *root, int alignment)
 
SparseArrayNodefindNode (uint akey) const
 
uint nEntries () const
 
uint pop_front ()
 
void push_front (uint at)
 
uint pop_back (uint len)
 
void push_back (uint at, uint len)
 
QList< int > keys () const
 
const SparseArrayNodeend () const
 
SparseArrayNodeend ()
 
const SparseArrayNodebegin () const
 
SparseArrayNodebegin ()
 
SparseArrayNodeerase (SparseArrayNode *n)
 
SparseArrayNodelowerBound (uint key)
 
const SparseArrayNodelowerBound (uint key) const
 
SparseArrayNodeupperBound (uint key)
 
const SparseArrayNodeupperBound (uint key) const
 
SparseArrayNodeinsert (uint akey)
 

Public Attributes

Value freeList
 

Detailed Description

Definition at line 109 of file qv4sparsearray_p.h.

Member Typedef Documentation

◆ difference_type

◆ key_type

Definition at line 166 of file qv4sparsearray_p.h.

◆ mapped_type

Definition at line 167 of file qv4sparsearray_p.h.

◆ size_type

Definition at line 169 of file qv4sparsearray_p.h.

Constructor & Destructor Documentation

◆ SparseArray() [1/2]

SparseArray::SparseArray ( )

◆ ~SparseArray()

QV4::SparseArray::~SparseArray ( )
inline

Definition at line 112 of file qv4sparsearray_p.h.

◆ SparseArray() [2/2]

SparseArray::SparseArray ( const SparseArray & other)

Definition at line 365 of file qv4sparsearray.cpp.

References freeList, QV4::SparseArrayNode::left, other(), QV4::SparseArrayNode::p, QV4::SparseArrayNode::right, and QV4::SparseArrayNode::setParent().

+ Here is the call graph for this function:

Member Function Documentation

◆ begin() [1/2]

SparseArrayNode * QV4::SparseArray::begin ( )
inline

Definition at line 155 of file qv4sparsearray_p.h.

◆ begin() [2/2]

const SparseArrayNode * QV4::SparseArray::begin ( ) const
inline

Definition at line 154 of file qv4sparsearray_p.h.

Referenced by QV4::ObjectOwnPropertyKeyIterator::next().

+ Here is the caller graph for this function:

◆ createNode()

SparseArrayNode * SparseArray::createNode ( uint sl,
SparseArrayNode * parent,
bool left )

Definition at line 320 of file qv4sparsearray.cpp.

References QV4::SparseArrayNode::left, QV4::SparseArrayNode::p, Q_CHECK_PTR(), qMapAllocate(), QV4::SparseArrayNode::right, QV4::SparseArrayNode::setParent(), QV4::SparseArrayNode::size_left, and QV4::SparseArrayNode::value.

Referenced by insert().

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

◆ end() [1/2]

SparseArrayNode * QV4::SparseArray::end ( )
inline

Definition at line 153 of file qv4sparsearray_p.h.

References header().

+ Here is the call graph for this function:

◆ end() [2/2]

const SparseArrayNode * QV4::SparseArray::end ( ) const
inline

Definition at line 152 of file qv4sparsearray_p.h.

References header().

Referenced by erase(), insert(), keys(), lowerBound(), lowerBound(), upperBound(), and upperBound().

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

◆ erase()

SparseArrayNode * QV4::SparseArray::erase ( SparseArrayNode * n)
inline

Definition at line 266 of file qv4sparsearray_p.h.

References end(), and next.

+ Here is the call graph for this function:

◆ findNode()

SparseArrayNode * QV4::SparseArray::findNode ( uint akey) const
inline

Definition at line 176 of file qv4sparsearray_p.h.

Referenced by pop_back(), and pop_front().

+ Here is the caller graph for this function:

◆ freeTree()

void SparseArray::freeTree ( SparseArrayNode * root,
int alignment )

Definition at line 346 of file qv4sparsearray.cpp.

References alignment, freeTree(), QV4::SparseArrayNode::left, qMapDeallocate(), and QV4::SparseArrayNode::right.

Referenced by freeTree().

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

◆ insert()

SparseArrayNode * SparseArray::insert ( uint akey)

Definition at line 377 of file qv4sparsearray.cpp.

References createNode(), and end().

Referenced by push_back(), and push_front().

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

◆ keys()

QList< int > QV4::SparseArray::keys ( ) const
inline

Definition at line 276 of file qv4sparsearray_p.h.

References end(), QV4::SparseArrayNode::nextNode(), and QList< T >::reserve().

+ Here is the call graph for this function:

◆ lowerBound() [1/2]

SparseArrayNode * QV4::SparseArray::lowerBound ( uint key)
inline

Definition at line 299 of file qv4sparsearray_p.h.

References end(), and QV4::SparseArrayNode::lowerBound().

Referenced by QV4::ObjectOwnPropertyKeyIterator::next().

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

◆ lowerBound() [2/2]

const SparseArrayNode * QV4::SparseArray::lowerBound ( uint key) const
inline

Definition at line 288 of file qv4sparsearray_p.h.

References end(), and QV4::SparseArrayNode::lowerBound().

+ Here is the call graph for this function:

◆ nEntries()

uint QV4::SparseArray::nEntries ( ) const
inline

Definition at line 143 of file qv4sparsearray_p.h.

◆ pop_back()

uint QV4::SparseArray::pop_back ( uint len)
inline

Definition at line 224 of file qv4sparsearray_p.h.

References findNode().

+ Here is the call graph for this function:

◆ pop_front()

uint QV4::SparseArray::pop_front ( )
inline

Definition at line 194 of file qv4sparsearray_p.h.

References findNode(), QV4::SparseArrayNode::left, and QV4::SparseArrayNode::size_left.

+ Here is the call graph for this function:

◆ push_back()

void QV4::SparseArray::push_back ( uint at,
uint len )
inline

Definition at line 238 of file qv4sparsearray_p.h.

References insert().

+ Here is the call graph for this function:

◆ push_front()

void QV4::SparseArray::push_front ( uint at)
inline

Definition at line 212 of file qv4sparsearray_p.h.

References insert().

+ Here is the call graph for this function:

◆ upperBound() [1/2]

SparseArrayNode * QV4::SparseArray::upperBound ( uint key)
inline

Definition at line 321 of file qv4sparsearray_p.h.

References end(), and QV4::SparseArrayNode::upperBound().

+ Here is the call graph for this function:

◆ upperBound() [2/2]

const SparseArrayNode * QV4::SparseArray::upperBound ( uint key) const
inline

Definition at line 310 of file qv4sparsearray_p.h.

References end(), and QV4::SparseArrayNode::upperBound().

+ Here is the call graph for this function:

Member Data Documentation

◆ freeList

Value QV4::SparseArray::freeList

Definition at line 119 of file qv4sparsearray_p.h.

Referenced by SparseArray(), and SparseArray().


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