KJS
27 #include "LocalStorage.h"
32 const int inlineListValuesSize = 5;
37 LocalStorageEntry *data;
61 List(
const List &b) : _impBase(b._impBase)
88 ++(_impBase = empty()._impBase)->refCount;
99 List copyTail()
const;
106 return _impBase->size == 0;
114 return _impBase->size;
137 JSValue *atUnchecked(
int i)
const
139 return _impBase->data[i].val.valueVal;
154 static const List &empty();
156 static void markProtectedLists();
161 void copyFrom(
const List &other);
163 void appendSlowCase(
JSValue *val);
165 ListImpBase *_impBase;
169 if (--_impBase->refCount == 0) {
179 if (i < _impBase->
size) {
180 return _impBase->data[i].val.valueVal;
182 return jsUndefined();
188 int size = _impBase->size;
189 int newSize =
size + 1;
190 if (newSize < inlineListValuesSize) {
192 _impBase->data[
size].val.valueVal = val;
193 _impBase->size = newSize;
217 return _list->
at(_i);
221 return _list->
at(_i);
229 return _list->
at(++_i);
236 return _list->
at(_i++);
243 return _list->
at(--_i);
250 return _list->
at(_i--);
void append(JSValue *val)
Append an object to the end of the list.
JSValue * operator--(int)
Postfix decrement operator.
JSValue is the base type for all primitives (Undefined, Null, Boolean, String, Number) and objects in...
virtual void release(quint64 objid)
JSValue * operator[](int i) const
Equivalent to at.
bool operator!=(const ListIterator &it) const
Check for inequality with another iterator.
JSValue * operator->() const
Dereference the iterator.
bool operator==(const ListIterator &it) const
Compare the iterator with another one.
Iterator for KJS::List objects.
JSValue * operator++()
Prefix increment operator.
JSValue * operator++(int)
Postfix increment operator.
JSValue * at(int i) const
Retrieve an element at an indexed position.
void clear()
Remove all elements from the list.
ListIterator begin() const
ListIterator(const List &l)
Construct an iterator that points to the first element of the list.
JSValue * operator--()
Prefix decrement operator.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:51:05 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.