NAME
src/pmc/fixedstringarray.pmc - fixed size array for strings only
DESCRIPTION
This class, FixedStringArray, implements an array of fixed size which stores Parrot strings.
Functions
Methods
void init_int(INTVAL size)
Initializes the array.
void destroy()
Destroys the array.
PMC *clone()
Creates and returns a copy of the array.
void mark()
Marks the array as live.
INTVAL get_bool()
Returns 1 if the array has any elements; otherwise,
returns 0.
Since this is a fixed size array,
PMC *get_iter()
Gets an iterator for the array.
INTVAL elements()
Returns the number of elements in the array.
INTVAL get_integer()
Returns the number of elements in the array.
FLOATVAL get_number()
Returns the number of elements in the array.
INTVAL get_integer_keyed_int(INTVAL key)
Returns the integer value of the element at index INTVAL get_integer_keyed(PMC *key)
Returns the integer value of the element at index FLOATVAL get_number_keyed_int(INTVAL key)
Returns the floating-point value of the element at index FLOATVAL get_number_keyed(PMC *key)
Returns the floating-point value of the element at index STRING *get_string_keyed_int(INTVAL key)
Returns the Parrot string value of the element at index STRING *get_string_keyed(PMC *key)
Returns the Parrot string value of the element at index PMC *get_pmc_keyed_int(INTVAL key)
Returns the PMC value of the element at index PMC *get_pmc_keyed(PMC *key)
Returns the PMC value of the element at index void set_integer_native(INTVAL size)
Sets the size of the array to void set_integer_keyed_int(INTVAL key, INTVAL value)
Sets the integer value of the element at index void set_integer_keyed(PMC *key, INTVAL value)
Sets the integer value of the element at index void set_number_keyed_int(INTVAL key, FLOATVAL value)
Sets the floating-point value of the element at index void set_number_keyed(PMC *key, FLOATVAL value)
Sets the floating-point value of the element at index void set_string_keyed_int(INTVAL key, STRING *value)
Sets the Parrot string value of the element at index void set_string_keyed(PMC *key, STRING *value)
Sets the string value of the element at index void set_pmc_keyed_int(INTVAL key, PMC *src)
Sets the PMC value of the element at index void set_pmc_keyed(PMC *key, PMC *value)
Sets the string value of the element at index STRING *get_string()
STRING *get_repr()
Returns the Parrot string representation INTVAL is_equal(PMC *value)
The
get_bool
will always return true once the array has been initialized and had its size set by set_integer_native
.
key
.
*key
.
key
.
*key
.
key
.
*key
.
key
.
*key
.
size
elements.
Once the array has been given an initial size,
attempts to resize it will cause an exception to be thrown.
key
to value
.
key
to value
.
key
to value
.
key
to value
.
key
to value
.
key
to value
.
key
to *src
.
key
to value
.
key
.
==
operation.
Compares two array to hold equal elements.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.