NAME
src/pmc/resizablebooleanarray.pmc - resizable array for booleans only
DESCRIPTION
The ResizableBooleanArray PMC
implements an array of resizable size,
which stores booleans.
It uses the Boolean PMC
for all conversions.
The ResizableBooleanArray PMC
extends the FixedBooleanArray PMC
.
Functions
Methods
INTVAL get_integer_keyed_int(INTVAL key)
Returns the integer value of the element at index void set_integer_keyed_int(INTVAL key, INTVAL value)
Sets the integer value of the element at index void set_integer_native(INTVAL size)
Resizes the array to void push_integer(INTVAL value)
Extends the array by adding an element of value void pop_integer(INTVAL value)
Removes and returns the last element.
void unshift_integer(INTVAL value)
Extends the array by adding an element of value void shift_integer(INTVAL value)
Removes and returns the first element.
INTVAL elements()
INTVAL get_integer()
Returns the number of elements in the array.
PMC *clone()
Returns a copy of the array.
key
.
key
to value
.
size
elements.
value
to the end.
value
to the beginning.
Freeze/thaw Interface
void freeze(PMC *info)
Used to archive the string.
void thaw(PMC *info)
Used to unarchive the string.
SEE ALSO
docs/pdds/pdd17_basic_types.pod.
HISTORY
Initial version - Matt Fowles 2004-06-11
Changed allocator to double size - Matt Fowles 2004-06-15
Added push_integer - Bernhard Schmalhofer 2004-10-17
Changed allocation code, added - Dino Morelli 2005-06-10 push_, pop_, shift_, unshift_integer, freeze, thaw