| parrotcode: resizable array for strings only | |
| Contents | PMCs |

src/pmc/resizablestringarray.pmc - resizable array for strings only

ResizableStringArray implements a resizeable array which stores Parrot strings only.
Any ints or floats assigned to elements of the array will first be converted to String PMCs and then to native Parrot strings.
PMCs assigned to to elements of the array will be stringified by having their get_string method called.

STRING *get_string_keyed_int(INTVAL key)key.void set_string_keyed_int(INTVAL key, STRING *value)key to value.void push_string(STRING *value)*value to the end of the array.STRING *pop_string()PMC *pop_pmc()INTVAL pop_integer()FLOATVAL pop_float()void set_integer_native(INTVAL size)size elements.PMC *clone()STRING *shift_string()PMC *shift_pmc()INTVAL shift_integer()FLOATVAL shift_float()void push_pmc(PMC *value)*value to the end of the array.void push_integer(INTVAL value)*value to the end of the array.void push_float(FLOAT value)*value to the end of the array.PMC *shift_pmc()void unshift_string(STRING *value)*value to the start of the array.void unshift_pmc(PMC *value)*value to the front of the array.void unshift_integer(INTVAL value)*value to the front of the array.void unshift_float(FLOAT value)*value to the front of the array.void delete_keyed_int(INTVAL key)key to a PMC key and calls delete_keyed() with it.void delete_keyed(PMC *key)*key.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 Added push_string - Bernhard Schmalhofer 2004-10-17 moved available size to int_val2 - Matt Fowles 2005-07-22
|
|
|