KJS
KJS::List Class Reference
#include <list.h>
List of all members.
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.
Constructor & Destructor Documentation
| KJS::List::~List |
( |
|
) |
[inline] |
| KJS::List::List |
( |
const List & |
b |
) |
[inline] |
Member Function Documentation
| List & KJS::List::operator= |
( |
const List & |
b |
) |
|
| void KJS::List::append |
( |
JSValue * |
val |
) |
|
Append an object to the end of the list.
- Parameters:
-
Definition at line 243 of file list.cpp.
| void KJS::List::clear |
( |
|
) |
|
Remove all elements from the list.
Definition at line 238 of file list.cpp.
| void KJS::List::reset |
( |
|
) |
[inline] |
| List KJS::List::copy |
( |
|
) |
const |
Make a copy of the list.
Definition at line 274 of file list.cpp.
| void KJS::List::copyFrom |
( |
const List & |
other |
) |
|
Copy all elements from the second list here.
Definition at line 281 of file list.cpp.
| List KJS::List::copyTail |
( |
|
) |
const |
Make a copy of the list, omitting the first element.
Definition at line 298 of file list.cpp.
| bool KJS::List::isEmpty |
( |
|
) |
const [inline] |
- Returns:
- true if the list is empty.
false otherwise.
Definition at line 96 of file list.h.
| int KJS::List::size |
( |
|
) |
const [inline] |
- Returns:
- the current size of the list.
Definition at line 100 of file list.h.
| JSValue * KJS::List::at |
( |
int |
i |
) |
const |
Retrieve an element at an indexed position.
If you want to iterate trough the whole list using KJS::ListIterator will be faster.
- Parameters:
-
- Returns:
- Return the element at position i. KJS::Undefined if the index is out of range.
Definition at line 228 of file list.cpp.
| JSValue* KJS::List::operator[] |
( |
int |
i |
) |
const [inline] |
Equivalent to at.
Definition at line 122 of file list.h.
| const List & KJS::List::empty |
( |
|
) |
[static] |
Returns a pointer to a static instance of an empty list.
Useful if a function has a KJS::List parameter.
Definition at line 318 of file list.cpp.
| void KJS::List::markProtectedLists |
( |
|
) |
[static] |
The documentation for this class was generated from the following files: