parrotcode: Ordered Hash | |
Contents | PMCs |
classes/orderedhash.pmc - Ordered Hash
OrderedHash
extends PerlArray
to provide the functionality of PerlArray
(list in data
) and a PerlHash
(hash in struct_val
).
The list holds the PMC values,
the hash keys point to the index of the value in the list.
There are 2 iterator interfaces:
See t/pmc/ordereredhash.t.
If values are set by numeric index only, there is no hash key. Iterating over the hash doesn't show these values.
static PMC *undef(Interp *interpreter)
PerlUndef
PMC.void init()
void mark()
PMC *clone()
PMC *get_pmc_keyed(PMC *key)
PMC *get_pmc_keyed_str(STRING *key)
*key
.INTVAL get_integer_keyed_str(STRING *key)
INTVAL get_integer_keyed(PMC *key)
*key
.FLOATVAL get_number_keyed(PMC *key)
*key
.void set_pmc_keyed(PMC *key, PMC *value)
*value
with *key
.void set_integer_keyed(PMC *key, INTVAL value)
value
with *key
.void set_string_keyed(PMC *key, STRING *value)
value
with *key
.void set_pmc_keyed_str(STRING *key, PMC *value)
*value
with *key
.void set_integer_keyed_str(STRING *key, INTVAL value)
value
with *key
.void set_number_keyed (PMC *key, FLOATVAL value)
void set_string_keyed_str(STRING *key, STRING *value)
INTVAL exists_keyed(PMC *key)
INTVAL exists_keyed_str(STRING *key)
*key
exists in the hash.INTVAL defined_keyed(PMC *key)
INTVAL defined_keyed_str(STRING *key)
*key
is defined in the hash.void delete_keyed(PMC *key)
void delete_keyed_str(STRING *key)
*key
from the hash.STRING *get_string_keyed(PMC *key)
*key
.Initial rev by leo 2003-08-21.
|