<!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 - resizable array for integers only</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> » resizable array for integers only </div> <h1><a name="NAME" >NAME</a></h1> <p>src/pmc/resizableintegerarray.pmc - resizable array for integers only</p> <h1><a name="DESCRIPTION" >DESCRIPTION</a></h1> <p>This class, ResizableIntegerArray, implements an array of resizable size, which stores INTVALs. It uses Integer PMCs for all of the conversions.</p> <h2><a name="Functions" >Functions</a></h2> <dl> <dt><a name="void_init_int(INTVAL_size)" ><b><code>void init_int(INTVAL size)</b></code></a></dt> Initializes the array. <dt><a name="INTVAL_get_integer_keyed_int(INTVAL_key)" ><b><code>INTVAL get_integer_keyed_int(INTVAL key)</b></code></a></dt> Returns the integer value of the element at index <code>key</code>. <dt><a name="void_set_integer_keyed_int(INTVAL_key,_INTVAL_value)" ><b><code>void set_integer_keyed_int(INTVAL key, INTVAL value)</b></code></a></dt> Sets the integer value of the element at index <code>key</code> to <code>value</code>. <dt><a name="void_set_integer_native(INTVAL_size)" ><b><code>void set_integer_native(INTVAL size)</b></code></a></dt> Resizes the array to <code>size</code> elements. <dt><a name="void_push_integer(INTVAL_value)" ><b><code>void push_integer(INTVAL value)</b></code></a></dt> Extends the array by adding an element of value <code>value</code> to the end of the array. <dt><a name="INTVAL_pop_integer()" ><b><code>INTVAL pop_integer()</b></code></a></dt> Removes and returns the last element in the array. <dt><a name="INTVAL_shift_integer()" ><b><code>INTVAL shift_integer()</b></code></a></dt> Removes and returns an item from the start of the array. <dt><a name="void_unshift_integer(INTVAL_value)" ><b><code>void unshift_integer(INTVAL value)</b></code></a></dt> Add an integer to the start of the array. <dt><a name="void_delete_keyed_int(INTVAL_key)" ><b><code>void delete_keyed_int(INTVAL key)</b></code></a></dt> Removes the element at <code>key</code>. <dt><a name="PMC_*clone()" ><b><code>PMC *clone()</b></code></a></dt> Creates and returns a copy of the array.</dl> <h1><a name="SEE_ALSO" >SEE ALSO</a></h1> <p><em>docs/pdds/pdd17_basic_types.pod</em>.</p> </div> <!-- "mainbody" --> <div id="divider"></div> <div id="footer"> Copyright © 2002-2011, Parrot Foundation. </div> </div> <!-- "wrapper" --> </body> </html>