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 key.

void set_integer_keyed_int(INTVAL key, INTVAL value)

Sets the integer value of the element at index key to value.

void set_integer_native(INTVAL size)

Resizes the array to size elements.

void push_integer(INTVAL size)

Extends the array by adding an element of value value to the end.

void pop_integer(INTVAL size)

Removes and returns the last element.

void unshift_integer(INTVAL size)

Extends the array by adding an element of value value to the beginning.

void shift_integer(INTVAL size)

Removes and returns the first element.

INTVAL elements()

INTVAL get_integer()

Returns the number of elements in the array.

PMC *clone()

Returns the number of elements in the array.

Freeze/thaw Interface ^

void freeze(visit_info *info)

Used to archive the string.

void thaw(visit_info *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


parrot