Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > f6ec3de51c94922f2240c0767594dcf5 > files > 3340

antlr3-C-docs-3.2-14.fc15.noarch.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>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ANTLR3C: ANTLR3_TOPO_struct Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">ANTLR3C&#160;<span id="projectnumber">3.1.2</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('struct_a_n_t_l_r3___t_o_p_o__struct.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<h1>ANTLR3_TOPO_struct Struct Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="ANTLR3_TOPO_struct" -->
<p>A topological sort system that given a set of dependencies of a node m on node n, can sort them in dependency order.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;antlr3collections.h&gt;</code></p>
<div class="dynheader">
Collaboration diagram for ANTLR3_TOPO_struct:</div>
<div class="dyncontent">
<div class="center"><img src="struct_a_n_t_l_r3___t_o_p_o__struct__coll__graph.png" border="0" usemap="#_a_n_t_l_r3___t_o_p_o__struct_coll__map" alt="Collaboration graph"/></div>
<map name="_a_n_t_l_r3___t_o_p_o__struct_coll__map" id="_a_n_t_l_r3___t_o_p_o__struct_coll__map">
<area shape="rect" id="node2" href="struct_a_n_t_l_r3___b_i_t_s_e_t__struct.html" title="ANTLR3_BITSET_struct" alt="" coords="31,97,252,124"/><area shape="rect" id="node5" href="struct_a_n_t_l_r3___b_i_t_s_e_t___l_i_s_t__struct.html" title="ANTLR3_BITSET_LIST_struct" alt="" coords="5,5,277,32"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#afb41f8a34a9fbbb281748fec3bb3a255">addEdge</a> )(struct <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html">ANTLR3_TOPO_struct</a> *topo, <a class="el" href="antlr3defs_8h.html#ac41f744abd0fd25144b9eb9d11b1dfd1">ANTLR3_UINT32</a> edge, <a class="el" href="antlr3defs_8h.html#ac41f744abd0fd25144b9eb9d11b1dfd1">ANTLR3_UINT32</a> dependency)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A method that adds an edge from one node to another.  <a href="#afb41f8a34a9fbbb281748fec3bb3a255"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="antlr3defs_8h.html#a1967e4354a0a471b539906ece8c84f26">pANTLR3_UINT32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a347e5faba5b581d7a40cb8e991a2a4d3">cycle</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A vector used to detect cycles in the edge dependecies.  <a href="#a347e5faba5b581d7a40cb8e991a2a4d3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="antlr3defs_8h.html#ac41f744abd0fd25144b9eb9d11b1dfd1">ANTLR3_UINT32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a5ea68d5a04d801efebcbe00f700fae8b">cycleMark</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A watermark used to accumulate potential cycles in the cycle array.  <a href="#a5ea68d5a04d801efebcbe00f700fae8b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_a_n_t_l_r3___b_i_t_s_e_t__struct.html">pANTLR3_BITSET</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#afa57fd633eb1fc880e1ed3134f9a565e">edges</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A vector of vectors of edges, built by calling the addEdge method() to indicate that node number n depends on node number m.  <a href="#afa57fd633eb1fc880e1ed3134f9a565e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a6ff84907fd59bf0bb1eacbb6b6dbbd5e">free</a> )(struct <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html">ANTLR3_TOPO_struct</a> *topo)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A method to free this structure and any associated memory.  <a href="#a6ff84907fd59bf0bb1eacbb6b6dbbd5e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="antlr3defs_8h.html#a5b33dccbba3b7212539695e21df4079b">ANTLR3_BOOLEAN</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#aeb46288b95c9678318d803794c6083bb">hasCycle</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A flag that indicates the algorithm found a cycle in the edges such as 9-&gt;8-&gt;1-&gt;9 If this flag is set after you have called one of the sort routines then the detected cycle will be contained in the cycle array and cycleLimit will point to the one after the last entry in the cycle.  <a href="#aeb46288b95c9678318d803794c6083bb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="antlr3defs_8h.html#ac41f744abd0fd25144b9eb9d11b1dfd1">ANTLR3_UINT32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a5ae29a928ef2ee25806c73978f2c96b6">limit</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">One more than the largest node index that is contained in edges/sorted.  <a href="#a5ae29a928ef2ee25806c73978f2c96b6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="antlr3defs_8h.html#a1967e4354a0a471b539906ece8c84f26">pANTLR3_UINT32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a951b50a28f80fe4adb1e3feb94a0b240">sorted</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A vector used to build up the sorted output order.  <a href="#a951b50a28f80fe4adb1e3feb94a0b240"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="antlr3defs_8h.html#a1967e4354a0a471b539906ece8c84f26">pANTLR3_UINT32</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a5778c7c2e8db3291ca33797ec9278507">sortToArray</a> )(struct <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html">ANTLR3_TOPO_struct</a> *topo)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A method that returns a pointer to an array of sorted node indexes.  <a href="#a5778c7c2e8db3291ca33797ec9278507"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a2a4e96e0e13c17271e067977ea2b92f3">sortVector</a> )(struct <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html">ANTLR3_TOPO_struct</a> *topo, <a class="el" href="struct_a_n_t_l_r3___v_e_c_t_o_r__struct.html">pANTLR3_VECTOR</a> v)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A method that sorts the supplied ANTLR3_VECTOR in place based on the previously supplied edge data.  <a href="#a2a4e96e0e13c17271e067977ea2b92f3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_a_n_t_l_r3___b_i_t_s_e_t__struct.html">pANTLR3_BITSET</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a067c02a397704d719faaa2611f7fdf8e">visited</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The set of visited nodes as determined by a set entry in the bitmap.  <a href="#a067c02a397704d719faaa2611f7fdf8e"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A topological sort system that given a set of dependencies of a node m on node n, can sort them in dependency order. </p>
<p>This is a generally useful utility object that does not care what the things are it is sorting. Generally the set to be sorted will be numeric indexes into some other structure such as an ANTLR3_VECTOR. I have provided a sort method that given ANTLR3_VECTOR as an input will sort the vector entries in place, as well as a sort method that just returns an array of the sorted noded indexes, in case you are not sorting ANTLR3_VECTORS but some set of your own device.</p>
<p>Of the two main algorithms that could be used, I chose to use the depth first search for unvisited nodes as a) This runs in linear time, and b) it is what we used in the ANTLR Tool to perform a topological sort of the input grammar files based on their dependencies. </p>
</div><hr/><h2>Field Documentation</h2>
<a class="anchor" id="afb41f8a34a9fbbb281748fec3bb3a255"></a><!-- doxytag: member="ANTLR3_TOPO_struct::addEdge" ref="afb41f8a34a9fbbb281748fec3bb3a255" args=")(struct ANTLR3_TOPO_struct *topo, ANTLR3_UINT32 edge, ANTLR3_UINT32 dependency)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#afb41f8a34a9fbbb281748fec3bb3a255">ANTLR3_TOPO_struct::addEdge</a>)(struct <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html">ANTLR3_TOPO_struct</a> *topo, <a class="el" href="antlr3defs_8h.html#ac41f744abd0fd25144b9eb9d11b1dfd1">ANTLR3_UINT32</a> edge, <a class="el" href="antlr3defs_8h.html#ac41f744abd0fd25144b9eb9d11b1dfd1">ANTLR3_UINT32</a> dependency)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A method that adds an edge from one node to another. </p>
<p>An edge of n -&gt; m indicates that node n is dependent on node m. Note that while building these edges, it is perfectly OK to add nodes out of sequence. So, if you have edges:</p>
<p>3 -&gt; 0 2 -&gt; 1 1 -&gt; 3</p>
<p>The you can add them in that order and so add node 3 before nodes 2 and 1 </p>

<p>Referenced by <a class="el" href="antlr3defs_8h.html#a1d588197aa7151c7308e1a8c9aed7435">antlr3TopoNew()</a>.</p>

</div>
</div>
<a class="anchor" id="a347e5faba5b581d7a40cb8e991a2a4d3"></a><!-- doxytag: member="ANTLR3_TOPO_struct::cycle" ref="a347e5faba5b581d7a40cb8e991a2a4d3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="antlr3defs_8h.html#a1967e4354a0a471b539906ece8c84f26">pANTLR3_UINT32</a> <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a347e5faba5b581d7a40cb8e991a2a4d3">ANTLR3_TOPO_struct::cycle</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A vector used to detect cycles in the edge dependecies. </p>
<p>It is used as a stack and each time we descend a node to one of its edges we add the node into this stack. If we find a node that we have already visited in the stack, then it means there wasa cycle such as 9-&gt;8-&gt;1-&gt;9 as the only way a node can be on the stack is if we are currently descnding from it as we remove it from the stack as we exit from descending its dependencies </p>

<p>Referenced by <a class="el" href="antlr3defs_8h.html#a1d588197aa7151c7308e1a8c9aed7435">antlr3TopoNew()</a>, <a class="el" href="antlr3collections_8c.html#a5842e43dcd12c4b5d47f11b20bcb45dd">DFS()</a>, <a class="el" href="antlr3collections_8c.html#ae3e60b66b90f24559ffbc809117636af">freeTopo()</a>, and <a class="el" href="antlr3collections_8c.html#a5bd3858582229ea93e345c28dbac8ac4">sortToArray()</a>.</p>

</div>
</div>
<a class="anchor" id="a5ea68d5a04d801efebcbe00f700fae8b"></a><!-- doxytag: member="ANTLR3_TOPO_struct::cycleMark" ref="a5ea68d5a04d801efebcbe00f700fae8b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="antlr3defs_8h.html#ac41f744abd0fd25144b9eb9d11b1dfd1">ANTLR3_UINT32</a> <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a5ea68d5a04d801efebcbe00f700fae8b">ANTLR3_TOPO_struct::cycleMark</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A watermark used to accumulate potential cycles in the cycle array. </p>
<p>This should be zero when we are done. Check hasCycle after calling one of the sort methods and if it is ANTLR3_TRUE then you can find the cycle in cycle[0]...cycle[cycleMark-1] </p>

<p>Referenced by <a class="el" href="antlr3defs_8h.html#a1d588197aa7151c7308e1a8c9aed7435">antlr3TopoNew()</a>, and <a class="el" href="antlr3collections_8c.html#a5842e43dcd12c4b5d47f11b20bcb45dd">DFS()</a>.</p>

</div>
</div>
<a class="anchor" id="afa57fd633eb1fc880e1ed3134f9a565e"></a><!-- doxytag: member="ANTLR3_TOPO_struct::edges" ref="afa57fd633eb1fc880e1ed3134f9a565e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_a_n_t_l_r3___b_i_t_s_e_t__struct.html">pANTLR3_BITSET</a>* <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#afa57fd633eb1fc880e1ed3134f9a565e">ANTLR3_TOPO_struct::edges</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A vector of vectors of edges, built by calling the addEdge method() to indicate that node number n depends on node number m. </p>
<p>Each entry in the vector contains a bitset, which has a bit index set for each node upon which the entry node depends. </p>

<p>Referenced by <a class="el" href="antlr3collections_8c.html#a74d5edf4b361d93fa9e5522075f33bbd">addEdge()</a>, <a class="el" href="antlr3defs_8h.html#a1d588197aa7151c7308e1a8c9aed7435">antlr3TopoNew()</a>, <a class="el" href="antlr3collections_8c.html#a5842e43dcd12c4b5d47f11b20bcb45dd">DFS()</a>, <a class="el" href="antlr3collections_8c.html#ae3e60b66b90f24559ffbc809117636af">freeTopo()</a>, and <a class="el" href="antlr3collections_8c.html#a5bd3858582229ea93e345c28dbac8ac4">sortToArray()</a>.</p>

</div>
</div>
<a class="anchor" id="a6ff84907fd59bf0bb1eacbb6b6dbbd5e"></a><!-- doxytag: member="ANTLR3_TOPO_struct::free" ref="a6ff84907fd59bf0bb1eacbb6b6dbbd5e" args=")(struct ANTLR3_TOPO_struct *topo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a6ff84907fd59bf0bb1eacbb6b6dbbd5e">ANTLR3_TOPO_struct::free</a>)(struct <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html">ANTLR3_TOPO_struct</a> *topo)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A method to free this structure and any associated memory. </p>

<p>Referenced by <a class="el" href="antlr3defs_8h.html#a1d588197aa7151c7308e1a8c9aed7435">antlr3TopoNew()</a>.</p>

</div>
</div>
<a class="anchor" id="aeb46288b95c9678318d803794c6083bb"></a><!-- doxytag: member="ANTLR3_TOPO_struct::hasCycle" ref="aeb46288b95c9678318d803794c6083bb" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="antlr3defs_8h.html#a5b33dccbba3b7212539695e21df4079b">ANTLR3_BOOLEAN</a> <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#aeb46288b95c9678318d803794c6083bb">ANTLR3_TOPO_struct::hasCycle</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A flag that indicates the algorithm found a cycle in the edges such as 9-&gt;8-&gt;1-&gt;9 If this flag is set after you have called one of the sort routines then the detected cycle will be contained in the cycle array and cycleLimit will point to the one after the last entry in the cycle. </p>

<p>Referenced by <a class="el" href="antlr3defs_8h.html#a1d588197aa7151c7308e1a8c9aed7435">antlr3TopoNew()</a>, <a class="el" href="antlr3collections_8c.html#a5842e43dcd12c4b5d47f11b20bcb45dd">DFS()</a>, <a class="el" href="antlr3collections_8c.html#a5bd3858582229ea93e345c28dbac8ac4">sortToArray()</a>, and <a class="el" href="antlr3collections_8c.html#af15db2a3e4cceb56b682b3ea0de1633e">sortVector()</a>.</p>

</div>
</div>
<a class="anchor" id="a5ae29a928ef2ee25806c73978f2c96b6"></a><!-- doxytag: member="ANTLR3_TOPO_struct::limit" ref="a5ae29a928ef2ee25806c73978f2c96b6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="antlr3defs_8h.html#ac41f744abd0fd25144b9eb9d11b1dfd1">ANTLR3_UINT32</a> <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a5ae29a928ef2ee25806c73978f2c96b6">ANTLR3_TOPO_struct::limit</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>One more than the largest node index that is contained in edges/sorted. </p>

<p>Referenced by <a class="el" href="antlr3collections_8c.html#a74d5edf4b361d93fa9e5522075f33bbd">addEdge()</a>, <a class="el" href="antlr3defs_8h.html#a1d588197aa7151c7308e1a8c9aed7435">antlr3TopoNew()</a>, <a class="el" href="antlr3collections_8c.html#a5842e43dcd12c4b5d47f11b20bcb45dd">DFS()</a>, <a class="el" href="antlr3collections_8c.html#ae3e60b66b90f24559ffbc809117636af">freeTopo()</a>, <a class="el" href="antlr3collections_8c.html#a5bd3858582229ea93e345c28dbac8ac4">sortToArray()</a>, and <a class="el" href="antlr3collections_8c.html#af15db2a3e4cceb56b682b3ea0de1633e">sortVector()</a>.</p>

</div>
</div>
<a class="anchor" id="a951b50a28f80fe4adb1e3feb94a0b240"></a><!-- doxytag: member="ANTLR3_TOPO_struct::sorted" ref="a951b50a28f80fe4adb1e3feb94a0b240" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="antlr3defs_8h.html#a1967e4354a0a471b539906ece8c84f26">pANTLR3_UINT32</a> <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a951b50a28f80fe4adb1e3feb94a0b240">ANTLR3_TOPO_struct::sorted</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A vector used to build up the sorted output order. </p>
<p>Note that as the vector contains UINT32 then the maximum node index is 'limited' to 2^32, as nodes should be zero based. </p>

<p>Referenced by <a class="el" href="antlr3defs_8h.html#a1d588197aa7151c7308e1a8c9aed7435">antlr3TopoNew()</a>, <a class="el" href="antlr3collections_8c.html#a5842e43dcd12c4b5d47f11b20bcb45dd">DFS()</a>, <a class="el" href="antlr3collections_8c.html#ae3e60b66b90f24559ffbc809117636af">freeTopo()</a>, <a class="el" href="antlr3collections_8c.html#a5bd3858582229ea93e345c28dbac8ac4">sortToArray()</a>, and <a class="el" href="antlr3collections_8c.html#af15db2a3e4cceb56b682b3ea0de1633e">sortVector()</a>.</p>

</div>
</div>
<a class="anchor" id="a5778c7c2e8db3291ca33797ec9278507"></a><!-- doxytag: member="ANTLR3_TOPO_struct::sortToArray" ref="a5778c7c2e8db3291ca33797ec9278507" args=")(struct ANTLR3_TOPO_struct *topo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="antlr3defs_8h.html#a1967e4354a0a471b539906ece8c84f26">pANTLR3_UINT32</a>(* <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a5778c7c2e8db3291ca33797ec9278507">ANTLR3_TOPO_struct::sortToArray</a>)(struct <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html">ANTLR3_TOPO_struct</a> *topo)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A method that returns a pointer to an array of sorted node indexes. </p>
<p>The array is sorted in topological sorted order. Note that the array is only as large as the largest node index you created an edge for. This means that if you had an input of 32 nodes, but that largest node with an edge was 16, then the returned array will be the sorted order of the first 16 nodes and the last 16 nodes of your array are basically fine as they are as they had no dependencies and do not need any particular sort order.</p>
<p>NB: If the structure that contains the array is freed, then the sorted array will be freed too so you should use the value of limit to make a long term copy of this array if you do not want to keep the topo structure around as well. </p>

<p>Referenced by <a class="el" href="antlr3defs_8h.html#a1d588197aa7151c7308e1a8c9aed7435">antlr3TopoNew()</a>, and <a class="el" href="antlr3collections_8c.html#af15db2a3e4cceb56b682b3ea0de1633e">sortVector()</a>.</p>

</div>
</div>
<a class="anchor" id="a2a4e96e0e13c17271e067977ea2b92f3"></a><!-- doxytag: member="ANTLR3_TOPO_struct::sortVector" ref="a2a4e96e0e13c17271e067977ea2b92f3" args=")(struct ANTLR3_TOPO_struct *topo, pANTLR3_VECTOR v)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a2a4e96e0e13c17271e067977ea2b92f3">ANTLR3_TOPO_struct::sortVector</a>)(struct <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html">ANTLR3_TOPO_struct</a> *topo, <a class="el" href="struct_a_n_t_l_r3___v_e_c_t_o_r__struct.html">pANTLR3_VECTOR</a> v)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A method that sorts the supplied ANTLR3_VECTOR in place based on the previously supplied edge data. </p>

<p>Referenced by <a class="el" href="antlr3defs_8h.html#a1d588197aa7151c7308e1a8c9aed7435">antlr3TopoNew()</a>.</p>

</div>
</div>
<a class="anchor" id="a067c02a397704d719faaa2611f7fdf8e"></a><!-- doxytag: member="ANTLR3_TOPO_struct::visited" ref="a067c02a397704d719faaa2611f7fdf8e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_a_n_t_l_r3___b_i_t_s_e_t__struct.html">pANTLR3_BITSET</a> <a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html#a067c02a397704d719faaa2611f7fdf8e">ANTLR3_TOPO_struct::visited</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The set of visited nodes as determined by a set entry in the bitmap. </p>

<p>Referenced by <a class="el" href="antlr3defs_8h.html#a1d588197aa7151c7308e1a8c9aed7435">antlr3TopoNew()</a>, <a class="el" href="antlr3collections_8c.html#a5842e43dcd12c4b5d47f11b20bcb45dd">DFS()</a>, <a class="el" href="antlr3collections_8c.html#ae3e60b66b90f24559ffbc809117636af">freeTopo()</a>, and <a class="el" href="antlr3collections_8c.html#a5bd3858582229ea93e345c28dbac8ac4">sortToArray()</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/<a class="el" href="antlr3collections_8h.html">antlr3collections.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="struct_a_n_t_l_r3___t_o_p_o__struct.html">ANTLR3_TOPO_struct</a>      </li>
      <li class="footer">Generated on Tue Feb 8 2011 for ANTLR3C by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
    </ul>
  </div>

</body>
</html>