NAME
src/pmc/pmcproxy.pmc - proxy class object for a PMC enabling introspection
DESCRIPTION
This class is used to describe a PMC. It can sit in an inheritance hierarchy of a PDD15 class as well as allowing introspection of the PMC.
PMCProxy is not derived from any other PMC.
Structure
This class stores its state in the Parrot_Class structure, using the following fields.
- idThe type number of the PMC that is being described.
- nameThe name of the PMC -- a STRING.
- namespaceThe namespace the PMC is associated with,
if any.
- parentsAn array of immediate parent classes.
An empty ResizablePMCArray PMC is allocated during initialization.
- all_parentsA cached array of ourself and all parent classes,
in MRO order.
A ResizablePMCArray PMC is allocated during initialization,
and is populated with the current class.
NOTE: No doubt we will need other things later; this is a start.
Functions
- void init()Initializes a PMCProxy PMC.
- PMC *instantiate(PMC *init)Creates an instance of the PMC.
- INTVAL isa_pmc(PMC *classname)Returns whether the class is or inherits from
- INTVAL isa(STRING *classname)Returns whether the class is or inherits from
- INTVAL does(STRING *role_name)Returns whether the class does the role with the given
- INTVAL type()Returns the integer type of the class.
- PMC *inspect()Returns a Hash describing the PMC,
with key/value pairs as described in inspect_str.
- STRING *name()Gets the name of the PMC.
- void get_namespace()Gets the namespace that this class is attached to.
- void new(PMC *args)Creates an instance of the PMC.
- void methods()Return a hash where the keys are method names and the values are methods.
- void parents()Return the parents array PMC.
- void inspect(STRING *what :optional)Gets all introspection data for the PMC or,
if the optional string parameter is supplied,
a particular item of introspection data.
- STRING *get_string()Return the name of the low-level class (without the HLL namespace).
*classname.
*classname.
*rolename.
SEE ALSO
docs/pdds/pdd17_pmc.pod.
