NAME ^

dynclasses/tclarray.pmc - Tcl Array PMC

DESCRIPTION ^

This is the Array PMC for the Tcl implementation.

Functions ^

static STRING *make_hash_key(Interp *interpreter, PMC *key)

Returns a Parrot string for *key.

void class_init()

Class initialization. Allocates the memory for the hash.

void init()

Initializes the instance.

void mark()

Marks the hash as live.

INTVAL type_keyed_str(STRING *key)

Returns the type of the element for *key.

INTVAL type_keyed (PMC *key)

Returns the type of the element for *key.

PMC *clone()

Creates and returns a clone of the hash.

INTVAL get_integer()

Returns the size of the hash.

INTVAL get_integer_keyed_str(STRING *key)

INTVAL get_integer_keyed(PMC *key)

Returns the integer value for the element at *key.

FLOATVAL get_number_keyed_str(STRING *key)

FLOATVAL get_number_keyed(PMC *key)

Returns the floating-point value for the element at *key.

BIGNUM *get_bignum_keyed_str(STRING *key)

BIGNUM *get_bignum_keyed(PMC *key)

Returns the big number value for the element at *key.

STRING *get_string()

Returns a string representation of the hash, showing its class name and memory address.

STRING *get_string_keyed_str(STRING *key)

STRING *get_string_keyed(PMC *key)

Returns the big number value for the element at *key.

INTVAL get_bool()

Returns true if the hash size is not zero.

INTVAL elements()

Returns the number of elements in the hash.

PMC *get_pmc_keyed_str(STRING *key)

PMC *get_pmc_keyed(PMC *key)

Returns the PMC value for the element at *key.

INTVAL is_same(PMC *other)

Returns whether the hash is the same as *other.

void set_integer_keyed(PMC *key, INTVAL value)

void set_integer_keyed_str(STRING *key, INTVAL value)

void set_number_keyed (PMC *key, FLOATVAL value)

void set_number_keyed_str(STRING *key, FLOATVAL value)

Sets value as the value for *key.

void set_bignum_keyed(PMC *key, BIGNUM *value)

void set_bignum_keyed_str(STRING *key, BIGNUM *value)

These two methods are unimplemented.

void set_string_keyed(PMC *key, STRING *value)

void set_string_keyed_str(STRING *key, STRING *value)

void set_pmc_keyed(PMC *dest_key, PMC *value)

void set_pmc_keyed_str(STRING *key, PMC *value)

Sets *value as the value for *key.

INTVAL is_equal(PMC *value)

The == operation.

Currently just returns false, *value is ignored.

INTVAL exists_keyed_str(STRING *key)

INTVAL exists_keyed(PMC *key)

Returns whether a key *key exists in the hash.

INTVAL defined_keyed_str(STRING *key)

INTVAL defined_keyed(PMC *key)

Returns whether the value for *key is defined.

void delete_keyed_str(STRING *key)

void delete_keyed(PMC *key)

Deletes the element associated with *key.

PMC *nextkey_keyed(PMC *key, INTVAL what)

Returns the next key relative to the location specified in what.

void visit(visit_info *info)

Used during archiving to visit the elements in the hash.

void freeze(visit_info *info)

Used to archive the hash.

void thaw(visit_info *info)

Used to unarchive the hash.

SEE ALSO ^

docs/pdds/pdd08_keys.pod.


parrot