parrotcode: resizable array for PMCs only | |
Contents | PMCs |
src/pmc/resizablepmcarray.pmc - resizable array for PMCs only
This class, ResizablePMCArray, implements an resizable array, which stores PMCs. It puts things into Integer, Float, or String PMCs as appropriate.
void set_integer_native(INTVAL size)
size
elements.FLOATVAL shift_float()
INTVAL shift_integer()
PMC *shift_pmc()
STRING *shift_string()
PMC *get_pmc_keyed_int(INTVAL key)
key
.void set_pmc_keyed_int(INTVAL key, PMC *src)
key
to *src
.void set_pmc_keyed(PMC *key, PMC *src)
INTVAL exists_keyed_int(INTVAL key)
INTVAL exists_keyed_int(PMC *key)
key
exists; otherwise returns false.INTVAL defined_keyed_int(INTVAL key)
key
is defined; otherwise returns false.void push_float(FLOATVAL value)
void push_integer(INTVAL value)
void push_pmc(PMC *value)
void push_string(STRING *value)
*value
to the end of the array.INTVAL pop_float()
INTVAL pop_integer()
PMC *pop_pmc()
STRING *pop_string()
void unshift_float (FLOATVAL value)
void unshift_integer (INTVAL value)
void unshift_pmc (PMC *value)
void unshift_string (STRING *value)
*value
to the begin of the array.PMC *clone()
INTVAL is_equal (PMC *value)
==
operation.
Compares two array to hold equal elements.void splice(PMC *value, INTVAL offset, INTVAL count)
count
elements starting at offset
with the elements in value
.value
PMC can be of any of the various array types.docs/pdds/pdd17_basic_types.pod.
Initial version - Matt Fowles 2004-06-11 Changed allocator to double size - Matt Fowles 2004-06-15
|