parrotcode: Capture PMC | |
Contents | PMCs |
src/pmc/capture.pmc - Capture PMC
These are the vtable functions for the Capture PMC.
void init()
void destroy()
void set_number_keyed_int(INTVAL key, FLOATVAL value)
void set_integer_keyed_int(INTVAL key, INTVAL value)
void set_pmc_keyed_int(INTVAL key, PMC *value)
void set_string_keyed_int(INTVAL key, STRING *value)
FLOATVAL get_number_keyed_int(INTVAL key)
INTVAL get_integer_keyed_int(INTVAL key)
PMC *get_pmc_keyed_int(INTVAL key)
STRING *get_string_keyed_int(INTVAL key)
void push_float(FLOATVAL value)
void push_integer(INTVAL value)
void push_pmc(PMC *value)
void push_string(STRING *value)
void unshift_float(FLOATVAL value)
void unshift_integer(INTVAL value)
void unshift_pmc(PMC *value)
void unshift_string(STRING *value)
FLOATVAL pop_float()
INTVAL pop_integer()
PMC *pop_pmc()
STRING *pop_string()
FLOATVAL shift_float()
INTVAL shift_integer()
PMC *shift_pmc()
STRING *shift_string()
INTVAL elements()
INTVAL defined_keyed_int(INTVAL key)
key
of the array component is defined.INTVAL exists_keyed_int(INTVAL key)
key
of the array component exists.void delete_keyed_int(INTVAL key)
key
in the array component.void set_number_keyed(PMC *key, FLOATVAL value)
void set_integer_keyed(PMC *key, INTVAL value)
void set_pmc_keyed(PMC *key, PMC *value)
void set_string_keyed(PMC *key, STRING *value)
FLOATVAL get_number_keyed(PMC *key)
INTVAL get_integer_keyed(PMC *key)
PMC *get_pmc_keyed(PMC *key)
STRING *get_string_keyed(PMC *key)
INTVAL defined_keyed(PMC *key)
key
of the hash component is defined.INTVAL exists_keyed(PMC *key)
key
of the hash component exists.void delete_keyed(PMC *key)
key
in the hash component.*/
METHOD PMC *get_array() { PMC *capt = SELF; /* XXX: This workaround is for when we get here as part of a subclass of Capture */ if (PObj_is_object_TEST(SELF)) { STRING * classname = string_from_literal(INTERP, "Capture"); PMC * classobj = Parrot_oo_get_class_str(INTERP, classname); capt = VTABLE_get_attr_keyed(interp, SELF, classobj, CONST_STRING(interp, "proxy")); } CAPTURE_array_CREATE(INTERP, capt); return CAPTURE_array(capt); } METHOD PMC *get_hash() { PMC *capt = SELF; /* XXX: This workaround is for when we get here as part of a subclass of Capture */ if (PObj_is_object_TEST(SELF)) { STRING * classname = string_from_literal(INTERP, "Capture"); PMC * classobj = Parrot_oo_get_class_str(INTERP, classname); capt = VTABLE_get_attr_keyed(interp, SELF, classobj, CONST_STRING(interp, "proxy")); } CAPTURE_hash_CREATE(INTERP, capt); return CAPTURE_hash(capt); }}
/*
Initial version - Patrick Michaud 2006-11-03
|