parrotcode: Abstract root class | |
Contents | PMCs |
src/pmc/default.pmc - Abstract root class
These are the vtable functions for the default PMC class.
All methods which are not defined here get a default implementation generated from src/vtable.tbl by tools/build/pmc2c.pl.
static const char *caller(PARROT_INTERP, PMC *pmc)
*pmc
.static void cant_do_method(PARROT_INTERP, PMC *pmc, const char *methname)
static INTVAL check_set_std_props(PARROT_INTERP, PMC *pmc, STRING *key, PMC *value)
setprop()
.setprop()
can avoid actually setting a property in the prophash.
If it returns true,
the property setting will be reflected in a future call to propagate_std_props()
static void propagate_std_props(PARROT_INTERP, PMC *self, PMC *prop_hash)
prop_hash
.static INTVAL has_pending_std_props(PMC *self)
static PMC *check_get_std_props(PARROT_INTERPeter, PMC *self, STRING *key)
key
property from self
without looking at its prophash.
Returns PMCNULL
if not,
returns the value otherwise.static PMC *make_prop_hash(PARROT_INTERP, PMC *self)
self
.
Returns the created hash.
Inferred properties will be added to the hash and it will be set as PMC_metadata(self)
.static INTVAL does_isa(PARROT_INTERP, STRING *method, STRING *what)
*method
and *what
.
Returns true (1) if method is found in what,
false (0) otherwise.void init()
void init_pmc(PMC *initializer)
initializer
,
calls init()
,
else throws an exception.PMC *instantiate(PMC *init)
void mark()
PMC *getprop(STRING *key)
*key
.
If no property is defined then the NULL PMC is returned.void setprop(STRING *key, PMC *value)
*key
to *value
.void delprop(STRING *key)
*key
.PMC *getprops()
INTVAL type()
INTVAL type_keyed_int(INTVAL key)
key
to a PMC key and returns the result of calling type_keyed()
with it.STRING *name()
PMC *pmc_namespace
PMC *find_method(STRING *method_name)
*method_name
and returns it.
If no method is found then NULL
is returned.void add_method(STRING *method_name, PMC *sub)
INTVAL get_integer_keyed_int(INTVAL key)
key
to a PMC key and returns the result of calling get_integer_keyed()
with it.FLOATVAL get_number_keyed_int(INTVAL key)
key
to a PMC key and returns the result of calling get_number_keyed()
with it.STRING *get_string_keyed_int(INTVAL key)
key
to a PMC key and returns the result of calling get_string_keyed()
with it.INTVAL get_bool_keyed_int(INTVAL key)
key
to a PMC key and returns the result of calling get_bool_keyed()
with it.INTVAL elements_keyed_int(INTVAL key)
key
to a PMC key and returns the result of calling elements_keyed()
with it.PMC *get_pmc_keyed_int(INTVAL key)
key
to a PMC key and returns the result of calling get_pmc_keyed()
with it.void *get_pointer()
INTVAL is_same(PMC *value)
value
.void assign_pmc(PMC *value)
void assign_string_native(PMC *value)
set_pmc
and set_string_native
.void morph(INTVAL type)
void set_integer_keyed_int(INTVAL key, INTVAL value)
key
to a PMC key and calls set_integer_keyed()
with it and value
.void set_number_keyed_int(INTVAL key, FLOATVAL value)
key
to a PMC key and calls set_number_keyed()
with it and value
.void set_string_keyed_int(INTVAL key, STRING *string)
key
to a PMC key and calls set_string_keyed()
with it and value
.void set_bool_keyed_int(INTVAL key, INTVAL value)
key
to a PMC key and calls set_bool_keyed()
with it and value
.void set_pmc_keyed_int(INTVAL key, PMC *value)
key
to a PMC key and calls set_pmc_keyed()
with it and value
.INTVAL is_equal(PMC *value)
*value
.INTVAL is_equal_num(PMC *value)
*value
.INTVAL is_equal_str(PMC *value)
*value
.INTVAL exists_keyed_int(INTVAL key)
key
to a PMC key and returns the result of calling exists_keyed()
with it.INTVAL defined()
INTVAL defined_keyed_int(INTVAL key)
key
to a PMC key and returns the result of calling defined_keyed()
with it.void delete_keyed_int(INTVAL key)
key
to a PMC key and calls delete_keyed()
with it.PMC *nextkey_keyed_int(INTVAL key, INTVAL w)
key
to a PMC key and returns the result of calling nextkey_keyed()
with it.INTVAL can(STRING *method)
method
.
If the PMC implements the vtable function method
,
true (1) is returned; otherwise,
false (0) is returned.INTVAL does(STRING *interface)
interface
.
If the interface interface
is found in the PMC's interface list,
true (1) is returned; otherwise,
false (0) is returned.INTVAL does_pmc(PMC *role)
role
.INTVAL isa_pmc(PMC *_class)
_class
.
If the class _class
is found in the PMC's class hierarchy,
true (1) is returned; otherwise,
false (0) is returned.INTVAL isa(STRING *_class)
_class
.
If the class _class
is found in the PMC's class hierarchy,
true (1) is returned; otherwise,
false (0) is returned.PMC *inspect_str(STRING *what)
PMC *inspect()
PMC *subclass(PMC *name)
name
.PMC *get_class()
PMC *get_attr_str(STRING *attr)
PMC *get_attr_keyed(PMC *key, STRING *name)
void set_attr_keyed(PMC *key, STRING *name, PMC *value)
void add_parent(PMC *parent)
parent
to the list of our parents.void visit(visit_info *info)
void freeze(visit_info *info)
void thaw(visit_info *info)
void thawfinish(visit_info *info)
|