Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > dd7a95aabe1c049ac9f84beede8143d3 > files > 533

synopsis-doc-0.12-4.fc14.i686.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!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" lang="en">
<!-- Source/Synopsis/PTree/Node.hh.html -->
<!-- this view was generated by Source -->
<head>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"/>
<title >Synopsis - Synopsis/PTree/Node.hh</title>
<link href="../../../style.css" type="text/css" rel="stylesheet" />
</head>
<body class="Source">
<div class="navigation">
<span class="normal"><a href="../../../Scopes/global.html" >Global Namespace</a></span>
<span class="normal"><a href="../../../InheritanceTree.html" >Inheritance Tree</a></span>
<span class="normal"><a href="../../../InheritanceGraph.html" >Inheritance Graph</a></span>
<span class="normal"><a href="../../../NameIndex.html" >Name Index</a></span>
</div>
File: <b >Synopsis/PTree/Node.hh</b><pre class="sxr"><a id="line1"></a><span class="lineno">  1</span><span class="line">//</span>
<a id="line2"></a><span class="lineno">  2</span><span class="line">// Copyright (C) 1997-2000 Shigeru Chiba</span>
<a id="line3"></a><span class="lineno">  3</span><span class="line">// Copyright (C) 2000 Stefan Seefeld</span>
<a id="line4"></a><span class="lineno">  4</span><span class="line">// Copyright (C) 2000 Stephen Davies</span>
<a id="line5"></a><span class="lineno">  5</span><span class="line">// All rights reserved.</span>
<a id="line6"></a><span class="lineno">  6</span><span class="line">// Licensed to the public under the terms of the GNU LGPL (&gt;= 2),</span>
<a id="line7"></a><span class="lineno">  7</span><span class="line">// see the file COPYING for details.</span>
<a id="line8"></a><span class="lineno">  8</span><span class="line">//</span>
<a id="line9"></a><span class="lineno">  9</span><span class="line">#ifndef Synopsis_PTree_Node_hh_</span>
<a id="line10"></a><span class="lineno"> 10</span><span class="line">#define Synopsis_PTree_Node_hh_</span>
<a id="line11"></a><span class="lineno"> 11</span>
<a id="line12"></a><span class="lineno"> 12</span><span class="line">#include &lt;Synopsis/PTree/GC.hh&gt;</span>
<a id="line13"></a><span class="lineno"> 13</span><span class="line">#include &lt;Synopsis/PTree/Encoding.hh&gt;</span>
<a id="line14"></a><span class="lineno"> 14</span><span class="line">#include &lt;Synopsis/PTree/Visitor.hh&gt;</span>
<a id="line15"></a><span class="lineno"> 15</span><span class="line">#include &lt;Synopsis/Token.hh&gt;</span>
<a id="line16"></a><span class="lineno"> 16</span><span class="line">#include &lt;ostream&gt;</span>
<a id="line17"></a><span class="lineno"> 17</span><span class="line">#include &lt;iterator&gt;</span>
<a id="line18"></a><span class="lineno"> 18</span>
<a id="line19"></a><span class="lineno"> 19</span><span class="line"><span class="keyword">namespace</span> <a href="../../../Scopes/Synopsis.html" title="namespace Synopsis">Synopsis</a></span>
<a id="line20"></a><span class="lineno"> 20</span><span class="line">{</span>
<a id="line21"></a><span class="lineno"> 21</span><span class="line"><span class="keyword">namespace</span> <a href="../../../Scopes/Synopsis/PTree.html" title="namespace Synopsis::PTree">PTree</a></span>
<a id="line22"></a><span class="lineno"> 22</span><span class="line">{</span>
<a id="line23"></a><span class="lineno"> 23</span>
<a id="line24"></a><span class="lineno"> 24</span><span class="line"><span class="keyword">class</span> <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> : <span class="keyword">public</span> <a href="" title="typedef Synopsis::PTree::LightObject">LightObject</a> </span>
<a id="line25"></a><span class="lineno"> 25</span><span class="line">{</span>
<a id="line26"></a><span class="lineno"> 26</span><span class="line"><span class="keyword">public</span>:</span>
<a id="line27"></a><span class="lineno"> 27</span><span class="line">  virtual <a href="../../../Scopes/Synopsis/PTree/Node.html#_tNode_l_r" title="member function Synopsis::PTree::Node::~Node()">~Node</a>() {}</span>
<a id="line28"></a><span class="lineno"> 28</span><span class="line">  virtual <span class="keyword">bool</span> <a href="../../../Scopes/Synopsis/PTree/Node.html#is_atom_l_rconst" title="member function Synopsis::PTree::Node::is_atom()const">is_atom</a>() const = 0;</span>
<a id="line29"></a><span class="lineno"> 29</span><span class="line">  virtual <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/Node.html#accept_lVisitor_S_r" title="member function Synopsis::PTree::Node::accept(Visitor*)">accept</a>(<a href="../../../Scopes/Synopsis/PTree/Visitor.html" title="class Synopsis::PTree::Visitor">Visitor</a> *visitor) = 0;</span>
<a id="line30"></a><span class="lineno"> 30</span>
<a id="line31"></a><span class="lineno"> 31</span><span class="line">  <span class="comment">//. return the start address of this Ptree in the buffer</span></span>
<a id="line32"></a><span class="lineno"> 32</span><span class="line">  <span class="keyword">const</span> <span class="keyword">char</span> *<a href="../../../Scopes/Synopsis/PTree/Node.html#begin_l_rconst" title="member function Synopsis::PTree::Node::begin()const">begin</a>() const;</span>
<a id="line33"></a><span class="lineno"> 33</span><span class="line">  <span class="comment">//. return the one-past-the-end address of this Ptree in the buffer</span></span>
<a id="line34"></a><span class="lineno"> 34</span><span class="line">  <span class="keyword">const</span> <span class="keyword">char</span> *<a href="../../../Scopes/Synopsis/PTree/Node.html#end_l_rconst" title="member function Synopsis::PTree::Node::end()const">end</a>() const;</span>
<a id="line35"></a><span class="lineno"> 35</span>
<a id="line36"></a><span class="lineno"> 36</span><span class="line">  <span class="keyword">const</span> <span class="keyword">char</span> *<a href="../../../Scopes/Synopsis/PTree/Node.html#position_l_rconst" title="member function Synopsis::PTree::Node::position()const">position</a>() const { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Node.html#my_data" title="data member Synopsis::PTree::Node::my_data">my_data</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097.html#leaf" title="data member Synopsis::PTree::Node::`0097::leaf">leaf</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097/`0099.html#position" title="data member Synopsis::PTree::Node::`0097::`0099::position">position</a>;}</span>
<a id="line37"></a><span class="lineno"> 37</span><span class="line">  <a href="" title="typedef size_t">size_t</a> <a href="../../../Scopes/Synopsis/PTree/Node.html#length_l_rconst" title="member function Synopsis::PTree::Node::length()const">length</a>() const { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Node.html#my_data" title="data member Synopsis::PTree::Node::my_data">my_data</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097.html#leaf" title="data member Synopsis::PTree::Node::`0097::leaf">leaf</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097/`0099.html#length" title="data member Synopsis::PTree::Node::`0097::`0099::length">length</a>;}</span>
<a id="line38"></a><span class="lineno"> 38</span>
<a id="line39"></a><span class="lineno"> 39</span><span class="line">  <span class="keyword">const</span> <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Node.html#car_l_rconst" title="member function Synopsis::PTree::Node::car()const">car</a>() const { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Node.html#my_data" title="data member Synopsis::PTree::Node::my_data">my_data</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097.html#nonleaf" title="data member Synopsis::PTree::Node::`0097::nonleaf">nonleaf</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097/`0098.html#child" title="data member Synopsis::PTree::Node::`0097::`0098::child">child</a>;}</span>
<a id="line40"></a><span class="lineno"> 40</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Node.html#car_l_r" title="member function Synopsis::PTree::Node::car()">car</a>() { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Node.html#my_data" title="data member Synopsis::PTree::Node::my_data">my_data</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097.html#nonleaf" title="data member Synopsis::PTree::Node::`0097::nonleaf">nonleaf</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097/`0098.html#child" title="data member Synopsis::PTree::Node::`0097::`0098::child">child</a>;}</span>
<a id="line41"></a><span class="lineno"> 41</span><span class="line">  <span class="keyword">const</span> <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Node.html#cdr_l_rconst" title="member function Synopsis::PTree::Node::cdr()const">cdr</a>() const { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Node.html#my_data" title="data member Synopsis::PTree::Node::my_data">my_data</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097.html#nonleaf" title="data member Synopsis::PTree::Node::`0097::nonleaf">nonleaf</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097/`0098.html#next" title="data member Synopsis::PTree::Node::`0097::`0098::next">next</a>;}</span>
<a id="line42"></a><span class="lineno"> 42</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Node.html#cdr_l_r" title="member function Synopsis::PTree::Node::cdr()">cdr</a>() { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Node.html#my_data" title="data member Synopsis::PTree::Node::my_data">my_data</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097.html#nonleaf" title="data member Synopsis::PTree::Node::`0097::nonleaf">nonleaf</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097/`0098.html#next" title="data member Synopsis::PTree::Node::`0097::`0098::next">next</a>;}</span>
<a id="line43"></a><span class="lineno"> 43</span><span class="line">  <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/Node.html#set_car_lNode_S_r" title="member function Synopsis::PTree::Node::set_car(Node*)">set_car</a>(<a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *p) { <a href="../../../Scopes/Synopsis/PTree/Node.html#my_data" title="data member Synopsis::PTree::Node::my_data">my_data</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097.html#nonleaf" title="data member Synopsis::PTree::Node::`0097::nonleaf">nonleaf</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097/`0098.html#child" title="data member Synopsis::PTree::Node::`0097::`0098::child">child</a> = <a href="" title="parameter p">p</a>;}</span>
<a id="line44"></a><span class="lineno"> 44</span><span class="line">  <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/Node.html#set_cdr_lNode_S_r" title="member function Synopsis::PTree::Node::set_cdr(Node*)">set_cdr</a>(<a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *p) { <a href="../../../Scopes/Synopsis/PTree/Node.html#my_data" title="data member Synopsis::PTree::Node::my_data">my_data</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097.html#nonleaf" title="data member Synopsis::PTree::Node::`0097::nonleaf">nonleaf</a>.<a href="../../../Scopes/Synopsis/PTree/Node/`0097/`0098.html#next" title="data member Synopsis::PTree::Node::`0097::`0098::next">next</a> = <a href="" title="parameter p">p</a>;}</span>
<a id="line45"></a><span class="lineno"> 45</span>
<a id="line46"></a><span class="lineno"> 46</span><span class="line">  virtual <a href="../../../Scopes/Synopsis/PTree/Encoding.html" title="class Synopsis::PTree::Encoding">Encoding</a> <a href="../../../Scopes/Synopsis/PTree/Node.html#encoded_type_l_rconst" title="member function Synopsis::PTree::Node::encoded_type()const">encoded_type</a>() const { <span class="keyword">return</span> Encoding();}</span>
<a id="line47"></a><span class="lineno"> 47</span><span class="line">  virtual <a href="../../../Scopes/Synopsis/PTree/Encoding.html" title="class Synopsis::PTree::Encoding">Encoding</a> <a href="../../../Scopes/Synopsis/PTree/Node.html#encoded_name_l_rconst" title="member function Synopsis::PTree::Node::encoded_name()const">encoded_name</a>() const { <span class="keyword">return</span> Encoding();}</span>
<a id="line48"></a><span class="lineno"> 48</span>
<a id="line49"></a><span class="lineno"> 49</span><span class="line"><span class="keyword">protected</span>:</span>
<a id="line50"></a><span class="lineno"> 50</span><span class="line">  <span class="comment">//. used by Atom</span></span>
<a id="line51"></a><span class="lineno"> 51</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html#Node_lconst.char_S_csize_t_r" title="member function Synopsis::PTree::Node::Node(const char*,size_t)">Node</a>(<span class="keyword">const</span> <span class="keyword">char</span> *ptr, <a href="" title="typedef size_t">size_t</a> len);</span>
<a id="line52"></a><span class="lineno"> 52</span><span class="line">  <span class="comment">//. used by List</span></span>
<a id="line53"></a><span class="lineno"> 53</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html#Node_lNode_S_cNode_S_r" title="member function Synopsis::PTree::Node::Node(Node*,Node*)">Node</a>(<a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *p, <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *q);</span>
<a id="line54"></a><span class="lineno"> 54</span>
<a id="line55"></a><span class="lineno"> 55</span><span class="line"><span class="keyword">private</span>:</span>
<a id="line56"></a><span class="lineno"> 56</span><span class="line">  <span class="keyword">union</span> </span>
<a id="line57"></a><span class="lineno"> 57</span><span class="line">  {</span>
<a id="line58"></a><span class="lineno"> 58</span><span class="line">    <span class="keyword">struct</span> </span>
<a id="line59"></a><span class="lineno"> 59</span><span class="line">    {</span>
<a id="line60"></a><span class="lineno"> 60</span><span class="line">      <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Node/`0097/`0098.html#child" title="data member Synopsis::PTree::Node::`0097::`0098::child">child</a>;</span>
<a id="line61"></a><span class="lineno"> 61</span><span class="line">      <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Node/`0097/`0098.html#next" title="data member Synopsis::PTree::Node::`0097::`0098::next">next</a>;</span>
<a id="line62"></a><span class="lineno"> 62</span><span class="line">    } <a href="../../../Scopes/Synopsis/PTree/Node/`0097.html#nonleaf" title="data member Synopsis::PTree::Node::`0097::nonleaf">nonleaf</a>;</span>
<a id="line63"></a><span class="lineno"> 63</span><span class="line">    <span class="keyword">struct</span> </span>
<a id="line64"></a><span class="lineno"> 64</span><span class="line">    {</span>
<a id="line65"></a><span class="lineno"> 65</span><span class="line">      <span class="keyword">const</span> <span class="keyword">char</span>* <a href="../../../Scopes/Synopsis/PTree/Node/`0097/`0099.html#position" title="data member Synopsis::PTree::Node::`0097::`0099::position">position</a>;</span>
<a id="line66"></a><span class="lineno"> 66</span><span class="line">      <span class="keyword">int</span>  <a href="../../../Scopes/Synopsis/PTree/Node/`0097/`0099.html#length" title="data member Synopsis::PTree::Node::`0097::`0099::length">length</a>;</span>
<a id="line67"></a><span class="lineno"> 67</span><span class="line">    } <a href="../../../Scopes/Synopsis/PTree/Node/`0097.html#leaf" title="data member Synopsis::PTree::Node::`0097::leaf">leaf</a>;</span>
<a id="line68"></a><span class="lineno"> 68</span><span class="line">  } <a href="../../../Scopes/Synopsis/PTree/Node.html#my_data" title="data member Synopsis::PTree::Node::my_data">my_data</a>;</span>
<a id="line69"></a><span class="lineno"> 69</span><span class="line">};</span>
<a id="line70"></a><span class="lineno"> 70</span>
<a id="line71"></a><span class="lineno"> 71</span><span class="line"><span class="keyword">class</span> <a href="../../../Scopes/Synopsis/PTree/Iterator.html" title="class Synopsis::PTree::Iterator">Iterator</a> : <span class="keyword">public</span> <a href="" title="typedef Synopsis::PTree::LightObject">LightObject</a> </span>
<a id="line72"></a><span class="lineno"> 72</span><span class="line">{</span>
<a id="line73"></a><span class="lineno"> 73</span><span class="line"><span class="keyword">public</span>:</span>
<a id="line74"></a><span class="lineno"> 74</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Iterator.html#Iterator_lNode_S_r" title="member function Synopsis::PTree::Iterator::Iterator(Node*)">Iterator</a>(<a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *p) { <a href="../../../Scopes/Synopsis/PTree/Iterator.html#ptree" title="data member Synopsis::PTree::Iterator::ptree">ptree</a> = <a href="" title="parameter p">p</a>;}</span>
<a id="line75"></a><span class="lineno"> 75</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Iterator.html#operator_l_r_l_r" title="member function Synopsis::PTree::Iterator::operator()()">operator ()</a> () { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Iterator.html#pop_l_r" title="member function Synopsis::PTree::Iterator::pop()">pop</a>();}</span>
<a id="line76"></a><span class="lineno"> 76</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Iterator.html#pop_l_r" title="member function Synopsis::PTree::Iterator::pop()">pop</a>();</span>
<a id="line77"></a><span class="lineno"> 77</span><span class="line">  <span class="keyword">bool</span> <a href="../../../Scopes/Synopsis/PTree/Iterator.html#next_lNode_S_A_r" title="member function Synopsis::PTree::Iterator::next(Node*&amp;)">next</a>(<a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *&amp;);</span>
<a id="line78"></a><span class="lineno"> 78</span><span class="line">  <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/Iterator.html#reset_lNode_S_r" title="member function Synopsis::PTree::Iterator::reset(Node*)">reset</a>(<a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *p) { <a href="../../../Scopes/Synopsis/PTree/Iterator.html#ptree" title="data member Synopsis::PTree::Iterator::ptree">ptree</a> = <a href="" title="parameter p">p</a>;}</span>
<a id="line79"></a><span class="lineno"> 79</span>
<a id="line80"></a><span class="lineno"> 80</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Iterator.html#get_l_r" title="member function Synopsis::PTree::Iterator::get()">get</a>() { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Iterator.html#ptree" title="data member Synopsis::PTree::Iterator::ptree">ptree</a> ? <a href="../../../Scopes/Synopsis/PTree/Iterator.html#ptree" title="data member Synopsis::PTree::Iterator::ptree">ptree</a>-&gt;<a href="../../../Scopes/Synopsis/PTree/Node.html#car_l_rconst" title="member function Synopsis::PTree::Node::car()const">car</a>() : <span class="literal">0</span>;}</span>
<a id="line81"></a><span class="lineno"> 81</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Iterator.html#operator_S_l_r" title="member function Synopsis::PTree::Iterator::operator*()">operator *</a>() { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Iterator.html#get_l_r" title="member function Synopsis::PTree::Iterator::get()">get</a>();}</span>
<a id="line82"></a><span class="lineno"> 82</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Iterator.html#operator_p_p_l_r" title="member function Synopsis::PTree::Iterator::operator++()">operator ++</a>() { <a href="../../../Scopes/Synopsis/PTree/Iterator.html#pop_l_r" title="member function Synopsis::PTree::Iterator::pop()">pop</a>(); <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Iterator.html#get_l_r" title="member function Synopsis::PTree::Iterator::get()">get</a>();}</span>
<a id="line83"></a><span class="lineno"> 83</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Iterator.html#operator_p_p_lint_r" title="member function Synopsis::PTree::Iterator::operator++(int)">operator ++</a>(<span class="keyword">int</span>) { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Iterator.html#pop_l_r" title="member function Synopsis::PTree::Iterator::pop()">pop</a>();}</span>
<a id="line84"></a><span class="lineno"> 84</span><span class="line">  <span class="keyword">bool</span> <a href="../../../Scopes/Synopsis/PTree/Iterator.html#empty_l_r" title="member function Synopsis::PTree::Iterator::empty()">empty</a>() { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Iterator.html#ptree" title="data member Synopsis::PTree::Iterator::ptree">ptree</a> == <span class="literal">0</span>;}</span>
<a id="line85"></a><span class="lineno"> 85</span><span class="line"><span class="keyword">private</span>:</span>
<a id="line86"></a><span class="lineno"> 86</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Iterator.html#ptree" title="data member Synopsis::PTree::Iterator::ptree">ptree</a>;</span>
<a id="line87"></a><span class="lineno"> 87</span><span class="line">};</span>
<a id="line88"></a><span class="lineno"> 88</span>
<a id="line89"></a><span class="lineno"> 89</span><span class="line"><span class="keyword">class</span> <a href="../../../Scopes/Synopsis/PTree/Array.html" title="class Synopsis::PTree::Array">Array</a> : <span class="keyword">public</span> <a href="" title="typedef Synopsis::PTree::LightObject">LightObject</a> </span>
<a id="line90"></a><span class="lineno"> 90</span><span class="line">{</span>
<a id="line91"></a><span class="lineno"> 91</span><span class="line"><span class="keyword">public</span>:</span>
<a id="line92"></a><span class="lineno"> 92</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Array.html#Array_lsize_t_r" title="member function Synopsis::PTree::Array::Array(size_t)">Array</a>(<a href="" title="typedef size_t">size_t</a> = 8);</span>
<a id="line93"></a><span class="lineno"> 93</span><span class="line">  <a href="" title="typedef size_t">size_t</a> <a href="../../../Scopes/Synopsis/PTree/Array.html#number_l_r" title="member function Synopsis::PTree::Array::number()">number</a>() { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Array.html#num" title="data member Synopsis::PTree::Array::num">num</a>;}</span>
<a id="line94"></a><span class="lineno"> 94</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *&amp;<a href="../../../Scopes/Synopsis/PTree/Array.html#operator_b_B_lsize_t_r" title="member function Synopsis::PTree::Array::operator[](size_t)">operator []</a> (<a href="" title="typedef size_t">size_t</a> index) { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Array.html#ref_lsize_t_r" title="member function Synopsis::PTree::Array::ref(size_t)">ref</a>(<a href="" title="parameter index">index</a>);}</span>
<a id="line95"></a><span class="lineno"> 95</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *&amp;<a href="../../../Scopes/Synopsis/PTree/Array.html#ref_lsize_t_r" title="member function Synopsis::PTree::Array::ref(size_t)">ref</a>(<a href="" title="typedef size_t">size_t</a> index);</span>
<a id="line96"></a><span class="lineno"> 96</span><span class="line">  <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/Array.html#append_lNode_S_r" title="member function Synopsis::PTree::Array::append(Node*)">append</a>(<a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *);</span>
<a id="line97"></a><span class="lineno"> 97</span><span class="line">  <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/Array.html#clear_l_r" title="member function Synopsis::PTree::Array::clear()">clear</a>() { <a href="../../../Scopes/Synopsis/PTree/Array.html#num" title="data member Synopsis::PTree::Array::num">num</a> = <span class="literal">0</span>;}</span>
<a id="line98"></a><span class="lineno"> 98</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Array.html#all_l_r" title="member function Synopsis::PTree::Array::all()">all</a>();</span>
<a id="line99"></a><span class="lineno"> 99</span><span class="line"><span class="keyword">private</span>:</span>
<a id="line100"></a><span class="lineno">100</span><span class="line">  <a href="" title="typedef size_t">size_t</a> <a href="../../../Scopes/Synopsis/PTree/Array.html#num" title="data member Synopsis::PTree::Array::num">num</a>, <a href="../../../Scopes/Synopsis/PTree/Array.html#size" title="data member Synopsis::PTree::Array::size">size</a>;</span>
<a id="line101"></a><span class="lineno">101</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> **<a href="../../../Scopes/Synopsis/PTree/Array.html#array" title="data member Synopsis::PTree::Array::array">array</a>;</span>
<a id="line102"></a><span class="lineno">102</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/Array.html#default_buf" title="data member Synopsis::PTree::Array::default_buf">default_buf</a>[8];</span>
<a id="line103"></a><span class="lineno">103</span><span class="line">};</span>
<a id="line104"></a><span class="lineno">104</span>
<a id="line105"></a><span class="lineno">105</span><span class="line"><span class="keyword">class</span> <a href="../../../Scopes/Synopsis/PTree/Atom.html" title="class Synopsis::PTree::Atom">Atom</a> : <span class="keyword">public</span> <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a></span>
<a id="line106"></a><span class="lineno">106</span><span class="line">{</span>
<a id="line107"></a><span class="lineno">107</span><span class="line"><span class="keyword">public</span>:</span>
<a id="line108"></a><span class="lineno">108</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Atom.html#Atom_lconst.char_S_csize_t_r" title="member function Synopsis::PTree::Atom::Atom(const char*,size_t)">Atom</a>(<span class="keyword">const</span> <span class="keyword">char</span> *p, <a href="" title="typedef size_t">size_t</a> l) : Node(p, l) {}</span>
<a id="line109"></a><span class="lineno">109</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Atom.html#Atom_lconst.Token_A_r" title="member function Synopsis::PTree::Atom::Atom(const Token&amp;)">Atom</a>(<span class="keyword">const</span> <a href="../../../Scopes/Synopsis/Token.html" title="struct Synopsis::Token">Token</a> &amp;t) : Node(t.ptr, t.length) {}</span>
<a id="line110"></a><span class="lineno">110</span><span class="line">  <span class="keyword">bool</span> <a href="../../../Scopes/Synopsis/PTree/Atom.html#is_atom_l_rconst" title="member function Synopsis::PTree::Atom::is_atom()const">is_atom</a>() const { <span class="keyword">return</span> true;}</span>
<a id="line111"></a><span class="lineno">111</span><span class="line">  virtual <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/Atom.html#accept_lVisitor_S_r" title="member function Synopsis::PTree::Atom::accept(Visitor*)">accept</a>(<a href="../../../Scopes/Synopsis/PTree/Visitor.html" title="class Synopsis::PTree::Visitor">Visitor</a> *visitor) { <a href="" title="parameter visitor">visitor</a>-&gt;<a href="../../../Scopes/Synopsis/PTree/Visitor.html#visit_lNode_S_r" title="member function Synopsis::PTree::Visitor::visit(Node*)">visit</a>(<span class="keyword">this</span>);}</span>
<a id="line112"></a><span class="lineno">112</span><span class="line">};</span>
<a id="line113"></a><span class="lineno">113</span>
<a id="line114"></a><span class="lineno">114</span><span class="line"><span class="keyword">class</span> <a href="../../../Scopes/Synopsis/PTree/List.html" title="class Synopsis::PTree::List">List</a> : <span class="keyword">public</span> <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a></span>
<a id="line115"></a><span class="lineno">115</span><span class="line">{</span>
<a id="line116"></a><span class="lineno">116</span><span class="line"><span class="keyword">public</span>:</span>
<a id="line117"></a><span class="lineno">117</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/List.html#List_lNode_S_cNode_S_r" title="member function Synopsis::PTree::List::List(Node*,Node*)">List</a>(<a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *p, <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *q) : Node(p, q) {}</span>
<a id="line118"></a><span class="lineno">118</span><span class="line">  <span class="keyword">bool</span> <a href="../../../Scopes/Synopsis/PTree/List.html#is_atom_l_rconst" title="member function Synopsis::PTree::List::is_atom()const">is_atom</a>() const { <span class="keyword">return</span> false;}</span>
<a id="line119"></a><span class="lineno">119</span><span class="line">  virtual <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/List.html#accept_lVisitor_S_r" title="member function Synopsis::PTree::List::accept(Visitor*)">accept</a>(<a href="../../../Scopes/Synopsis/PTree/Visitor.html" title="class Synopsis::PTree::Visitor">Visitor</a> *visitor) { <a href="" title="parameter visitor">visitor</a>-&gt;<a href="../../../Scopes/Synopsis/PTree/Visitor.html#visit_lNode_S_r" title="member function Synopsis::PTree::Visitor::visit(Node*)">visit</a>(<span class="keyword">this</span>);}</span>
<a id="line120"></a><span class="lineno">120</span><span class="line">};</span>
<a id="line121"></a><span class="lineno">121</span>
<a id="line122"></a><span class="lineno">122</span><span class="line">}</span>
<a id="line123"></a><span class="lineno">123</span><span class="line">}</span>
<a id="line124"></a><span class="lineno">124</span>
<a id="line125"></a><span class="lineno">125</span><span class="line">#endif</span>
</pre>
<div class="logo">Generated on Thu Apr 16 16:28:04 2009 by 
<br/>
<a href="http://synopsis.fresco.org" target="_blank"><img src="../../../synopsis.png" alt="logo"/> synopsis</a> (version devel)</div>
</body>
</html>