<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Parrot - proxy class object for a PMC enabling introspection</title> <link rel="stylesheet" type="text/css" href="../../../resources/parrot.css" media="all"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div id="wrapper"> <div id="header"> <a href="http://www.parrot.org"> <img border=0 src="../../../resources/parrot_logo.png" id="logo" alt="parrot"> </a> </div> <!-- "header" --> <div id="divider"></div> <div id="mainbody"> <div id="breadcrumb"> <a href="../../../html/index.html">Home</a> » <a href="../../../html/pmc.html">PMCs</a> » proxy class object for a PMC enabling introspection </div> <h1><a name="NAME" >NAME</a></h1> <p>src/pmc/pmcproxy.pmc - proxy class object for a PMC enabling introspection</p> <h1><a name="DESCRIPTION" >DESCRIPTION</a></h1> <p>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.</p> <p>PMCProxy is not derived from any other PMC.</p> <h2><a name="Structure" >Structure</a></h2> <p>This class stores its state in the Parrot_Class structure, using the following fields.</p> <dl> <dt><a name="id" ><b><code>id</b></code></a></dt> The type number of the PMC that is being described. <dt><a name="name" ><b><code>name</b></code></a></dt> The name of the PMC -- a STRING. <dt><a name="namespace" ><b><code>namespace</b></code></a></dt> The namespace the PMC is associated with, if any. <dt><a name="parents" ><b><code>parents</b></code></a></dt> An array of immediate parent classes. An empty ResizablePMCArray PMC is allocated during initialization. <dt><a name="all_parents" ><b><code>all_parents</b></code></a></dt> A 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.</dl> <p>NOTE: No doubt we will need other things later; this is a start.</p> <h2><a name="Functions" >Functions</a></h2> <dl> <dt><a name="void_init()" ><b><code>void init()</b></code></a></dt> Initializes a PMCProxy PMC. <dt><a name="PMC_*instantiate(PMC_*init)" ><b><code>PMC *instantiate(PMC *init)</b></code></a></dt> Creates an instance of the PMC. <dt><a name="INTVAL_isa_pmc(PMC_*classname)" ><b><code>INTVAL isa_pmc(PMC *classname)</b></code></a></dt> Returns whether the class is or inherits from <code>*classname</code>. <dt><a name="INTVAL_isa(STRING_*classname)" ><b><code>INTVAL isa(STRING *classname)</b></code></a></dt> Returns whether the class is or inherits from <code>*classname</code>. <dt><a name="INTVAL_does(STRING_*role_name)" ><b><code>INTVAL does(STRING *role_name)</b></code></a></dt> Returns whether the class does the role with the given <code>*rolename</code>. <dt><a name="INTVAL_type()" ><b><code>INTVAL type()</b></code></a></dt> Returns the integer type of the class. <dt><a name="PMC_*inspect()" ><b><code>PMC *inspect()</b></code></a></dt> Returns a Hash describing the PMC, with key/value pairs as described in inspect_str. <dt><a name="STRING_*name()" ><b><code>STRING *name()</b></code></a></dt> Gets the name of the PMC. <dt><a name="void_get_namespace()" ><b><code>void get_namespace()</b></code></a></dt> Gets the namespace that this class is attached to. <dt><a name="void_new(PMC_*args)" ><b><code>void new(PMC *args)</b></code></a></dt> Creates an instance of the PMC. <dt><a name="void_methods()" ><b><code>void methods()</b></code></a></dt> Return a hash where the keys are method names and the values are methods. <dt><a name="void_parents()" ><b><code>void parents()</b></code></a></dt> Return the parents array PMC. <dt><a name="void_inspect(STRING_*what_:optional)" ><b><code>void inspect(STRING *what :optional)</b></code></a></dt> Gets all introspection data for the PMC or, if the optional string parameter is supplied, a particular item of introspection data. <dt><a name="STRING_*get_string()" ><b><code>STRING *get_string()</b></code></a></dt> Return the name of the low-level class (without the HLL namespace).</dl> <h1><a name="SEE_ALSO" >SEE ALSO</a></h1> <p><em>docs/pdds/pdd17_pmc.pod</em>.</p> </div> <!-- "mainbody" --> <div id="divider"></div> <div id="footer"> Copyright © 2002-2011, Parrot Foundation. </div> </div> <!-- "wrapper" --> </body> </html>