Sophie

Sophie

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

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/Atoms.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/Atoms.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/Atoms.hh</b><pre class="sxr"><a id="line1"></a><span class="lineno"> 1</span><span class="line"><span class="comment">//</span></span>
<a id="line2"></a><span class="lineno"> 2</span><span class="line"><span class="comment">// Copyright (C) 2004 Stefan Seefeld</span></span>
<a id="line3"></a><span class="lineno"> 3</span><span class="line"><span class="comment">// All rights reserved.</span></span>
<a id="line4"></a><span class="lineno"> 4</span><span class="line"><span class="comment">// Licensed to the public under the terms of the GNU LGPL (&gt;= 2),</span></span>
<a id="line5"></a><span class="lineno"> 5</span><span class="line"><span class="comment">// see the file COPYING for details.</span></span>
<a id="line6"></a><span class="lineno"> 6</span><span class="line"><span class="comment">//</span></span>
<a id="line7"></a><span class="lineno"> 7</span><span class="line">#ifndef Synopsis_PTree_Atoms_hh_</span>
<a id="line8"></a><span class="lineno"> 8</span><span class="line">#define Synopsis_PTree_Atoms_hh_</span>
<a id="line9"></a><span class="lineno"> 9</span>
<a id="line10"></a><span class="lineno">10</span><span class="line">#include &lt;Synopsis/PTree/NodesFwd.hh&gt;</span>
<a id="line11"></a><span class="lineno">11</span><span class="line">#include &lt;Synopsis/PTree/Node.hh&gt;</span>
<a id="line12"></a><span class="lineno">12</span>
<a id="line13"></a><span class="lineno">13</span><span class="line"><span class="keyword">namespace</span> <a href="../../../Scopes/Synopsis.html" title="namespace Synopsis">Synopsis</a></span>
<a id="line14"></a><span class="lineno">14</span><span class="line">{</span>
<a id="line15"></a><span class="lineno">15</span><span class="line"><span class="keyword">namespace</span> <a href="../../../Scopes/Synopsis/PTree.html" title="namespace Synopsis::PTree">PTree</a></span>
<a id="line16"></a><span class="lineno">16</span><span class="line">{</span>
<a id="line17"></a><span class="lineno">17</span>
<a id="line18"></a><span class="lineno">18</span><span class="line"><span class="keyword">class</span> <a href="../../../Scopes/Synopsis/PTree/Literal.html" title="class Synopsis::PTree::Literal">Literal</a> : <span class="keyword">public</span> <a href="../../../Scopes/Synopsis/PTree/Atom.html" title="class Synopsis::PTree::Atom">Atom</a></span>
<a id="line19"></a><span class="lineno">19</span><span class="line">{</span>
<a id="line20"></a><span class="lineno">20</span><span class="line"><span class="keyword">public</span>:</span>
<a id="line21"></a><span class="lineno">21</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Literal.html#Literal_lconst.Token_A_r" title="member function Synopsis::PTree::Literal::Literal(const Token&amp;)">Literal</a>(<a href="../../../Scopes/Synopsis/Token.html" title="struct Synopsis::Token">Token const</a> &amp;tk) : Atom(tk), my_type(tk.type) {}</span>
<a id="line22"></a><span class="lineno">22</span><span class="line">  virtual <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/Literal.html#accept_lVisitor_S_r" title="member function Synopsis::PTree::Literal::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="line23"></a><span class="lineno">23</span><span class="line">  <a href="../../../Scopes/Synopsis/Token.html#Type" title="typedef Synopsis::Token::Type">Token::Type</a> <a href="../../../Scopes/Synopsis/PTree/Literal.html#type_l_rconst" title="member function Synopsis::PTree::Literal::type()const">type</a>() const { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/Literal.html#my_type" title="data member Synopsis::PTree::Literal::my_type">my_type</a>;}</span>
<a id="line24"></a><span class="lineno">24</span><span class="line"><span class="keyword">private</span>:</span>
<a id="line25"></a><span class="lineno">25</span><span class="line">  <a href="../../../Scopes/Synopsis/Token.html#Type" title="typedef Synopsis::Token::Type">Token::Type</a> <a href="../../../Scopes/Synopsis/PTree/Literal.html#my_type" title="data member Synopsis::PTree::Literal::my_type">my_type</a>;</span>
<a id="line26"></a><span class="lineno">26</span><span class="line">};</span>
<a id="line27"></a><span class="lineno">27</span>
<a id="line28"></a><span class="lineno">28</span><span class="line"><span class="keyword">class</span> <a href="../../../Scopes/Synopsis/PTree/CommentedAtom.html" title="class Synopsis::PTree::CommentedAtom">CommentedAtom</a> : <span class="keyword">public</span> <a href="../../../Scopes/Synopsis/PTree/Atom.html" title="class Synopsis::PTree::Atom">Atom</a></span>
<a id="line29"></a><span class="lineno">29</span><span class="line">{</span>
<a id="line30"></a><span class="lineno">30</span><span class="line"><span class="keyword">public</span>:</span>
<a id="line31"></a><span class="lineno">31</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/CommentedAtom.html#CommentedAtom_lconst.Token_A_cNode_S_r" title="member function Synopsis::PTree::CommentedAtom::CommentedAtom(const Token&amp;,Node*)">CommentedAtom</a>(<a href="../../../Scopes/Synopsis/Token.html" title="struct Synopsis::Token">Token const</a> &amp;tk, <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *c = 0) : Atom(tk), my_comments(c) {}</span>
<a id="line32"></a><span class="lineno">32</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/CommentedAtom.html#CommentedAtom_lconst.char_S_csize_t_cNode_S_r" title="member function Synopsis::PTree::CommentedAtom::CommentedAtom(const char*,size_t,Node*)">CommentedAtom</a>(<span class="keyword">char const</span> *p, <a href="" title="typedef size_t">size_t</a> l, <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *c = 0) : Atom(p, l), my_comments(c) {}</span>
<a id="line33"></a><span class="lineno">33</span><span class="line">  virtual <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/CommentedAtom.html#accept_lVisitor_S_r" title="member function Synopsis::PTree::CommentedAtom::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="line34"></a><span class="lineno">34</span>
<a id="line35"></a><span class="lineno">35</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/CommentedAtom.html#get_comments_l_r" title="member function Synopsis::PTree::CommentedAtom::get_comments()">get_comments</a>() { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/CommentedAtom.html#my_comments" title="data member Synopsis::PTree::CommentedAtom::my_comments">my_comments</a>;}</span>
<a id="line36"></a><span class="lineno">36</span><span class="line">  <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/CommentedAtom.html#set_comments_lNode_S_r" title="member function Synopsis::PTree::CommentedAtom::set_comments(Node*)">set_comments</a>(<a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *c) { <a href="../../../Scopes/Synopsis/PTree/CommentedAtom.html#my_comments" title="data member Synopsis::PTree::CommentedAtom::my_comments">my_comments</a> = <a href="" title="parameter c">c</a>;}</span>
<a id="line37"></a><span class="lineno">37</span><span class="line"><span class="keyword">private</span>:</span>
<a id="line38"></a><span class="lineno">38</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Node.html" title="class Synopsis::PTree::Node">Node</a> *<a href="../../../Scopes/Synopsis/PTree/CommentedAtom.html#my_comments" title="data member Synopsis::PTree::CommentedAtom::my_comments">my_comments</a>;</span>
<a id="line39"></a><span class="lineno">39</span><span class="line">};</span>
<a id="line40"></a><span class="lineno">40</span>
<a id="line41"></a><span class="lineno">41</span><span class="line"><span class="comment">// class DupLeaf is used by Ptree::Make() and QuoteClass (qMake()).</span></span>
<a id="line42"></a><span class="lineno">42</span><span class="line"><span class="comment">// The string given to the constructors are duplicated.</span></span>
<a id="line43"></a><span class="lineno">43</span>
<a id="line44"></a><span class="lineno">44</span><span class="line"><span class="keyword">class</span> <a href="../../../Scopes/Synopsis/PTree/DupAtom.html" title="class Synopsis::PTree::DupAtom">DupAtom</a> : <span class="keyword">public</span> <a href="../../../Scopes/Synopsis/PTree/CommentedAtom.html" title="class Synopsis::PTree::CommentedAtom">CommentedAtom</a> </span>
<a id="line45"></a><span class="lineno">45</span><span class="line">{</span>
<a id="line46"></a><span class="lineno">46</span><span class="line"><span class="keyword">public</span>:</span>
<a id="line47"></a><span class="lineno">47</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/DupAtom.html#DupAtom_lconst.char_S_csize_t_r" title="member function Synopsis::PTree::DupAtom::DupAtom(const char*,size_t)">DupAtom</a>(<span class="keyword">char const</span> *, <a href="" title="typedef size_t">size_t</a>);</span>
<a id="line48"></a><span class="lineno">48</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/DupAtom.html#DupAtom_lconst.char_S_csize_t_cconst.char_S_csize_t_r" title="member function Synopsis::PTree::DupAtom::DupAtom(const char*,size_t,const char*,size_t)">DupAtom</a>(<span class="keyword">char const</span> *, <a href="" title="typedef size_t">size_t</a>, <span class="keyword">char const</span> *, <a href="" title="typedef size_t">size_t</a>);</span>
<a id="line49"></a><span class="lineno">49</span><span class="line">  virtual <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/DupAtom.html#accept_lVisitor_S_r" title="member function Synopsis::PTree::DupAtom::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="line50"></a><span class="lineno">50</span><span class="line">};</span>
<a id="line51"></a><span class="lineno">51</span>
<a id="line52"></a><span class="lineno">52</span><span class="line"><span class="keyword">class</span> <a href="../../../Scopes/Synopsis/PTree/Identifier.html" title="class Synopsis::PTree::Identifier">Identifier</a> : <span class="keyword">public</span> <a href="../../../Scopes/Synopsis/PTree/CommentedAtom.html" title="class Synopsis::PTree::CommentedAtom">CommentedAtom</a></span>
<a id="line53"></a><span class="lineno">53</span><span class="line">{</span>
<a id="line54"></a><span class="lineno">54</span><span class="line"><span class="keyword">public</span>:</span>
<a id="line55"></a><span class="lineno">55</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Identifier.html#Identifier_lconst.Token_A_r" title="member function Synopsis::PTree::Identifier::Identifier(const Token&amp;)">Identifier</a>(<a href="../../../Scopes/Synopsis/Token.html" title="struct Synopsis::Token">Token const</a> &amp;t) : CommentedAtom(t) {}</span>
<a id="line56"></a><span class="lineno">56</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Identifier.html#Identifier_lconst.char_S_csize_t_r" title="member function Synopsis::PTree::Identifier::Identifier(const char*,size_t)">Identifier</a>(<span class="keyword">char const</span> *p, <a href="" title="typedef size_t">size_t</a> l) : CommentedAtom(p, l) {}</span>
<a id="line57"></a><span class="lineno">57</span><span class="line">  virtual <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/Identifier.html#accept_lVisitor_S_r" title="member function Synopsis::PTree::Identifier::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="line58"></a><span class="lineno">58</span><span class="line">};</span>
<a id="line59"></a><span class="lineno">59</span>
<a id="line60"></a><span class="lineno">60</span><span class="line"><span class="keyword">class</span> <a href="../../../Scopes/Synopsis/PTree/Keyword.html" title="class Synopsis::PTree::Keyword">Keyword</a> : <span class="keyword">public</span> <a href="../../../Scopes/Synopsis/PTree/CommentedAtom.html" title="class Synopsis::PTree::CommentedAtom">CommentedAtom</a></span>
<a id="line61"></a><span class="lineno">61</span><span class="line">{</span>
<a id="line62"></a><span class="lineno">62</span><span class="line"><span class="keyword">public</span>:</span>
<a id="line63"></a><span class="lineno">63</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Keyword.html#Keyword_lconst.Token_A_r" title="member function Synopsis::PTree::Keyword::Keyword(const Token&amp;)">Keyword</a>(<a href="../../../Scopes/Synopsis/Token.html" title="struct Synopsis::Token">Token const</a> &amp;t) : CommentedAtom(t) {}</span>
<a id="line64"></a><span class="lineno">64</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/Keyword.html#Keyword_lconst.char_S_cint_r" title="member function Synopsis::PTree::Keyword::Keyword(const char*,int)">Keyword</a>(<span class="keyword">char const</span> *str, <span class="keyword">int</span> len) : CommentedAtom(str, len) {}</span>
<a id="line65"></a><span class="lineno">65</span><span class="line">  virtual <a href="../../../Scopes/Synopsis/Token.html#Type" title="typedef Synopsis::Token::Type">Token::Type</a> <a href="../../../Scopes/Synopsis/PTree/Keyword.html#token_l_rconst" title="member function Synopsis::PTree::Keyword::token()const">token</a>() const = 0;</span>
<a id="line66"></a><span class="lineno">66</span><span class="line">  virtual <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/Keyword.html#accept_lVisitor_S_r" title="member function Synopsis::PTree::Keyword::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="line67"></a><span class="lineno">67</span><span class="line">};</span>
<a id="line68"></a><span class="lineno">68</span>
<a id="line69"></a><span class="lineno">69</span><span class="line">template &lt;Token::Type t&gt;</span>
<a id="line70"></a><span class="lineno">70</span><span class="line"><span class="keyword">class</span> <a href="../../../Scopes/Synopsis/PTree/KeywordT.html" title="class Synopsis::PTree::KeywordT">KeywordT</a> : <span class="keyword">public</span> <a href="../../../Scopes/Synopsis/PTree/Keyword.html" title="class Synopsis::PTree::Keyword">Keyword</a></span>
<a id="line71"></a><span class="lineno">71</span><span class="line">{</span>
<a id="line72"></a><span class="lineno">72</span><span class="line"><span class="keyword">public</span>:</span>
<a id="line73"></a><span class="lineno">73</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/KeywordT.html#KeywordT_lconst.Token_A_r" title="member function Synopsis::PTree::KeywordT::KeywordT(const Token&amp;)">KeywordT</a>(<a href="../../../Scopes/Synopsis/Token.html" title="struct Synopsis::Token">Token const</a> &amp;tk) : Keyword(tk) {}</span>
<a id="line74"></a><span class="lineno">74</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/KeywordT.html#KeywordT_lconst.char_S_csize_t_r" title="member function Synopsis::PTree::KeywordT::KeywordT(const char*,size_t)">KeywordT</a>(<span class="keyword">char const</span> *ptr, <a href="" title="typedef size_t">size_t</a> length) : Keyword(ptr, length) {}</span>
<a id="line75"></a><span class="lineno">75</span><span class="line">  virtual <a href="../../../Scopes/Synopsis/Token.html#Type" title="typedef Synopsis::Token::Type">Token::Type</a> <a href="../../../Scopes/Synopsis/PTree/KeywordT.html#token_l_rconst" title="member function Synopsis::PTree::KeywordT::token()const">token</a>() const { <span class="keyword">return</span> t;}</span>
<a id="line76"></a><span class="lineno">76</span><span class="line">  virtual <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/KeywordT.html#accept_lVisitor_S_r" title="member function Synopsis::PTree::KeywordT::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="line77"></a><span class="lineno">77</span><span class="line">};</span>
<a id="line78"></a><span class="lineno">78</span>
<a id="line79"></a><span class="lineno">79</span><span class="line"><span class="keyword">class</span> <a href="../../../Scopes/Synopsis/PTree/UserKeyword.html" title="class Synopsis::PTree::UserKeyword">UserKeyword</a> : <span class="keyword">public</span> <a href="../../../Scopes/Synopsis/PTree/Keyword.html" title="class Synopsis::PTree::Keyword">Keyword</a></span>
<a id="line80"></a><span class="lineno">80</span><span class="line">{</span>
<a id="line81"></a><span class="lineno">81</span><span class="line"><span class="keyword">public</span>:</span>
<a id="line82"></a><span class="lineno">82</span><span class="line">  <a href="../../../Scopes/Synopsis/PTree/UserKeyword.html#UserKeyword_lconst.Token_A_r" title="member function Synopsis::PTree::UserKeyword::UserKeyword(const Token&amp;)">UserKeyword</a>(<a href="../../../Scopes/Synopsis/Token.html" title="struct Synopsis::Token">Token const</a> &amp;t) : Keyword(t) {}</span>
<a id="line83"></a><span class="lineno">83</span><span class="line">  virtual <a href="../../../Scopes/Synopsis/Token.html#Type" title="typedef Synopsis::Token::Type">Token::Type</a> <a href="../../../Scopes/Synopsis/PTree/UserKeyword.html#token_l_rconst" title="member function Synopsis::PTree::UserKeyword::token()const">token</a>() const { <span class="keyword">return</span> <a href="../../../Scopes/Synopsis/PTree/UserKeyword.html#my_type" title="data member Synopsis::PTree::UserKeyword::my_type">my_type</a>;}</span>
<a id="line84"></a><span class="lineno">84</span><span class="line">  virtual <span class="keyword">void</span> <a href="../../../Scopes/Synopsis/PTree/UserKeyword.html#accept_lVisitor_S_r" title="member function Synopsis::PTree::UserKeyword::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="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/Token.html#Type" title="typedef Synopsis::Token::Type">Token::Type</a> <a href="../../../Scopes/Synopsis/PTree/UserKeyword.html#my_type" title="data member Synopsis::PTree::UserKeyword::my_type">my_type</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>
<a id="line90"></a><span class="lineno">90</span><span class="line">}</span>
<a id="line91"></a><span class="lineno">91</span>
<a id="line92"></a><span class="lineno">92</span><span class="line">#endif</span>
</pre>
<div class="logo">Generated on Thu Apr 16 16:28:03 2009 by 
<br/>
<a href="http://synopsis.fresco.org" target="_blank"><img src="../../../synopsis.png" alt="logo"/> synopsis</a> (version devel)</div>
</body>
</html>