KJS::List Class Reference
#include <list.h>
Public Member Functions | |
List (bool needsMarking) | |
List (const List &b) | |
List & | operator= (const List &) |
void | append (const Value &val) |
void | append (ValueImp *val) |
void | clear () |
List | copy () const |
List | copyTail () const |
bool | isEmpty () const |
int | size () const |
ListIterator | begin () const |
ListIterator | end () const |
Value | at (int i) const |
Value | operator[] (int i) const |
ValueImp * | impAt (int i) const |
void | mark () |
Static Public Member Functions | |
static const List & | empty () |
Detailed Description
Native list type.
List is a native ECMAScript type. List values are only used for intermediate results of expression evaluation and cannot be stored as properties of objects.
The list is explicitly shared. Note that while copyTail() returns a copy of the list the referenced objects are still shared.
Member Function Documentation
◆ append()
|
inline |
◆ at()
|
inline |
Retrieve an element at an indexed position.
If you want to iterate trough the whole list using KJS::ListIterator will be faster.
- Parameters
-
i List index.
- Returns
- Return the element at position i. KJS::Undefined if the index is out of range.
◆ begin()
|
inline |
- Returns
- A KJS::ListIterator pointing to the first element.
◆ clear()
void KJS::List::clear | ( | ) |
◆ copy()
◆ copyTail()
List KJS::List::copyTail | ( | ) | const |
◆ empty()
|
static |
◆ end()
|
inline |
- Returns
- A KJS::ListIterator pointing to the last element.
◆ isEmpty()
|
inline |
◆ operator[]()
|
inline |
◆ size()
|
inline |
The documentation for this class was generated from the following files: