Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > d92aa75c2d384ff9f513aed09a46f703 > files > 281

parrot-doc-3.1.0-2.mga1.i586.rpm

<!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  - PackfileConstantTable PMC</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> &raquo; <a href="../../../html/pmc.html">PMCs</a> &raquo; PackfileConstantTable PMC
                </div>

<h1><a name="NAME"
>NAME</a></h1>

<p>src/pmc/packfileconstanttable.pmc &#45; PackfileConstantTable PMC</p>

<h1><a name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p>This class implements a PackfileConstantTable object,
a segment of the .pbc data file used for storing constants of various types.
(int,
string,
PMC)</p>

<p>See packfile.pmc for the toplevel Packfile interface,
see packfilesegment.pmc for the list of common methods every packfile segment pmc must implement; see PDD13 for the design spec.</p>

<h2><a name="Methods"
>Methods</a></h2>

<dl>
<dt><a name="init"
><b><code>init</b></code></a></dt>
Create empty PackfileConstantTable.
<dt><a name="void_mark()"
><b><code>void mark()</b></code></a></dt>
Marks the object as live.
<dt><a name="set_pointer"
><b><code>set_pointer</b></code></a></dt>
Set pointer to underlying PackFile_ConstTable
<dt><a name="void_*get_pointer()"
><b><code>void *get_pointer()</b></code></a></dt>

<dt><a name="INTVAL_num_count()"
><b><code>INTVAL num_count()</b></code></a></dt>

<dt><a name="INTVAL_str_count()"
><b><code>INTVAL str_count()</b></code></a></dt>

<dt><a name="INTVAL_pmc_count()"
><b><code>INTVAL pmc_count()</b></code></a></dt>
Get the number of constants.
<dt><a name="FLOATVAL_get_number_keyed_int(INTVAL_index)"
><b><code>FLOATVAL get_number_keyed_int(INTVAL index)</b></code></a></dt>
Fetch a numeric constant.
<dt><a name="STRING_*get_string_keyed_int(INTVAL_index)"
><b><code>STRING *get_string_keyed_int(INTVAL index)</b></code></a></dt>
Fetch a string constant.
<dt><a name="PMC_*get_pmc_keyed_int(INTVAL_index)"
><b><code>PMC *get_pmc_keyed_int(INTVAL index)</b></code></a></dt>
Fetch a PMC constant.
<dt><a name="void_set_number_keyed_int(INTVAL_index,_FLOATVAL_value)"
><b><code>void set_number_keyed_int(INTVAL index, FLOATVAL value)</b></code></a></dt>
Set the constant to the given number.
<dt><a name="void_set_string_keyed_int(INTVAL_index,_STRING_*value)"
><b><code>void set_string_keyed_int(INTVAL index, STRING *value)</b></code></a></dt>
Set the constant to the given string.
<dt><a name="void_set_pmc_keyed_int(INTVAL_index,_PMC_*value)"
><b><code>void set_pmc_keyed_int(INTVAL index, PMC *value)</b></code></a></dt>
Set the constant to the given PMC (or key).
<dt><a name="void_set_main(INTVAL_index)"
><b><code>void set_main(INTVAL index)</b></code></a></dt>
Set the :main flag in a Sub in the constant table.Experimental.
Use with care.
There is no way to set the private flags from PIR,
so we need something like this.If something goes wrong,
blame NotFound.
<dt><a name="INTVAL_get_or_create_constant()"
><b><code>INTVAL get_or_create_constant()</b></code></a></dt>
Get or create constant for passed value.
<dt><a name="METHOD_type()"
><b><code>METHOD type()</b></code></a></dt>
Set segment type.</dl>
            </div> <!-- "mainbody" -->
            <div id="divider"></div>
            <div id="footer">
	        Copyright &copy; 2002-2011, Parrot Foundation.
            </div>
        </div> <!-- "wrapper" -->
    </body>
</html>