NAME
src/pmc/resizableintegerarray.pmc - resizable array for integers only
DESCRIPTION
This class, ResizableIntegerArray, implements an array of resizable size, which stores INTVALs. It uses Integer PMCs for all of the conversions.
Functions
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 INTVAL pop_integer()
Removes and returns the last element in the array.
INTVAL shift_integer()
Removes and returns an item from the start of the array.
void unshift_integer(INTVAL value)
Add an integer to the start of the array.
void delete_keyed_int(INTVAL key)
Removes the element at PMC *clone()
Creates and returns a copy of the array.
void freeze(visit_info *info)
Used to archive the array.
void thaw(visit_info *info)
Used to unarchive the array.
key
.
key
to value
.
size
elements.
value
to the end of the array.
key
.
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 moved available size to int_val2 - Matt Fowles 2005-07-22