KJS::List Class Reference
Native list type. More...
#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 | |
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.
Definition at line 48 of file list.h.
Member Function Documentation
|
Append an object to the end of the list.
References KJS::Value::imp(). Referenced by KJS::Error::create(). |
|
Remove all elements from the list. |
|
Make a copy of the list. Definition at line 281 of file list.cpp. References KShortcut::append(), copy(), and size(). Referenced by copy(), and copyTail(). |
|
Make a copy of the list, omitting the first element. Definition at line 302 of file list.cpp. References KShortcut::append(), copy(), and size(). |
|
|
|
Referenced by copy(), copyTail(), and end(). |
|
|
|
References size(). |
|
Retrieve an element at an indexed position. If you want to iterate trough the whole list using KJS::ListIterator will be faster.
|
|
Equivalent to at. |
|
Returns a pointer to a static instance of an empty list. Useful if a function has a KJS::List parameter. Definition at line 322 of file list.cpp. |
The documentation for this class was generated from the following files: