<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>GBFHTMLHREF class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.2.15 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> <hr><h1>GBFHTMLHREF Class Reference</h1>this filter converts GBF text to HTML text with hrefs. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="gbfhtmlhref_8h-source.html">gbfhtmlhref.h</a>></code> <p> Inheritance diagram for GBFHTMLHREF:<p><center><img src="class_g_b_f_h_t_m_l_h_r_e_f__inherit__graph.png" border="0" usemap="#_g_b_f_h_t_m_l_h_r_e_f__inherit__map" alt="Inheritance graph"></center> <map name="_g_b_f_h_t_m_l_h_r_e_f__inherit__map"> <area href="class_s_w_basic_filter.html" shape="rect" coords="19,15,115,34" alt=""> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for GBFHTMLHREF:<p><center><img src="class_g_b_f_h_t_m_l_h_r_e_f__coll__graph.png" border="0" usemap="#_g_b_f_h_t_m_l_h_r_e_f__coll__map" alt="Collaboration graph"></center> <map name="_g_b_f_h_t_m_l_h_r_e_f__coll__map"> <area href="class_s_w_basic_filter.html" shape="rect" coords="206,481,302,500" alt=""> <area href="class_s_w_key.html" shape="rect" coords="150,196,206,215" alt=""> <area href="class_s_w_module.html" shape="rect" coords="179,391,254,409" alt=""> <area href="class_list_key.html" shape="rect" coords="75,293,129,312" alt=""> <area href="class_s_w_object.html" shape="rect" coords="226,105,298,124" alt=""> <area href="class_s_w_display.html" shape="rect" coords="309,196,383,215" alt=""> <area href="class_s_w_class.html" shape="rect" coords="151,15,215,33" alt=""> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_g_b_f_h_t_m_l_h_r_e_f-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> <tr><td nowrap align=right valign=top><a name="a0" doxytag="GBFHTMLHREF::GBFHTMLHREF"></a> </td><td valign=bottom><b>GBFHTMLHREF</b> ()</td></tr> <tr><td colspan=2><br><h2>Protected Methods</h2></td></tr> <tr><td nowrap align=right valign=top>virtual bool </td><td valign=bottom><a class="el" href="class_g_b_f_h_t_m_l_h_r_e_f.html#b0">handleToken</a> (char **buf, const char *token, DualStringMap &userData)</td></tr> <tr><td> </td><td><font size=-1><em>This function is called for every token encountered in the input text.</em> <a href="#b0">More...</a><em></em></font><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> this filter converts GBF text to HTML text with hrefs. <p> <p> Definition at line <a class="el" href="gbfhtmlhref_8h-source.html#l00026">26</a> of file <a class="el" href="gbfhtmlhref_8h-source.html">gbfhtmlhref.h</a>.<hr><h2>Member Function Documentation</h2> <a name="b0" doxytag="GBFHTMLHREF::handleToken"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool GBFHTMLHREF::handleToken </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char ** </td> <td class="mdname" nowrap> <em>buf</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>token</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>DualStringMap & </td> <td class="mdname" nowrap> <em>userData</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [protected, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> This function is called for every token encountered in the input text. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>buf</em> </td><td> the output buffer (FIXME: what is its size?) </td></tr> <tr><td valign=top><em>token</em> </td><td> the token (e.g. <code>"p align='left'"</code> </td></tr> <tr><td valign=top><em>userData</em> </td><td> FIXME: document this </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> <code>false</code> if was not handled and should be handled in the default way (by just substituting). </dl> <p> Reimplemented from <a class="el" href="class_s_w_basic_filter.html#b13">SWBasicFilter</a>. <p> Definition at line <a class="el" href="gbfhtmlhref_8cpp-source.html#l00060">60</a> of file <a class="el" href="gbfhtmlhref_8cpp-source.html">gbfhtmlhref.cpp</a>. <p> References <a class="el" href="swbasicfilter_8cpp-source.html#l00110">SWBasicFilter::pushString</a>(). <p> <div class="fragment"><pre>00060 { 00061 <font class="keyword">const</font> <font class="keywordtype">char</font> *tok; 00062 00063 <font class="keywordflow">if</font> (!substituteToken(buf, token)) { 00064 <font class="keywordflow">if</font> (!strncmp(token, <font class="stringliteral">"WG"</font>, 2) || !strncmp(token, <font class="stringliteral">"WH"</font>, 2)) { <font class="comment">// strong's numbers</font> 00065 <a class="code" href="class_s_w_basic_filter.html#b12">pushString</a>(buf, <font class="stringliteral">" <small><em>&lt;<a href=\"#"</font>); 00066 <font class="keywordflow">for</font> (tok = token+1; *tok; tok++) 00067 <font class="comment">//if(token[i] != '\"')</font> 00068 *(*buf)++ = *tok; 00069 *(*buf)++ = <font class="charliteral">'\"'</font>; 00070 *(*buf)++ = <font class="charliteral">'>'</font>; 00071 <font class="keywordflow">for</font> (tok = token + 2; *tok; tok++) 00072 <font class="comment">//if(token[i] != '\"')</font> 00073 *(*buf)++ = *tok; 00074 <a class="code" href="class_s_w_basic_filter.html#b12">pushString</a>(buf, <font class="stringliteral">"</a>&gt;</em></small>"</font>); 00075 } 00076 00077 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(token, <font class="stringliteral">"WTG"</font>, 3) || !strncmp(token, <font class="stringliteral">"WTH"</font>, 3)) { <font class="comment">// strong's numbers tense</font> 00078 <a class="code" href="class_s_w_basic_filter.html#b12">pushString</a>(buf, <font class="stringliteral">" <small><em>(<A HREF=\"#"</font>); 00079 <font class="keywordflow">for</font> (tok = token + 2; *tok; tok++) 00080 <font class="keywordflow">if</font>(*tok != <font class="charliteral">'\"'</font>) 00081 *(*buf)++ = *tok; 00082 *(*buf)++ = <font class="charliteral">'\"'</font>; 00083 *(*buf)++ = <font class="charliteral">'>'</font>; 00084 <font class="keywordflow">for</font> (tok = token + 3; *tok; tok++) 00085 <font class="keywordflow">if</font>(*tok != <font class="charliteral">'\"'</font>) 00086 *(*buf)++ = *tok; 00087 <a class="code" href="class_s_w_basic_filter.html#b12">pushString</a>(buf, <font class="stringliteral">"</a>)</em></small>"</font>); 00088 } 00089 00090 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(token, <font class="stringliteral">"WT"</font>, 2) && strncmp(token, <font class="stringliteral">"WTH"</font>, 3) && strncmp(token, <font class="stringliteral">"WTG"</font>, 3)) { <font class="comment">// morph tags</font> 00091 <a class="code" href="class_s_w_basic_filter.html#b12">pushString</a>(buf, <font class="stringliteral">" <small><em>(<a href=\"M"</font>); 00092 <font class="keywordflow">for</font> (tok = token + 2; *tok; tok++) 00093 <font class="keywordflow">if</font>(*tok != <font class="charliteral">'\"'</font>) 00094 *(*buf)++ = *tok; 00095 *(*buf)++ = <font class="charliteral">'\"'</font>; 00096 *(*buf)++ = <font class="charliteral">'>'</font>; 00097 <font class="keywordflow">for</font> (tok = token + 2; *tok; tok++) 00098 <font class="keywordflow">if</font>(*tok != <font class="charliteral">'\"'</font>) 00099 *(*buf)++ = *tok; 00100 <a class="code" href="class_s_w_basic_filter.html#b12">pushString</a>(buf, <font class="stringliteral">"</a>)</em></small>"</font>); 00101 } 00102 00103 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(token, <font class="stringliteral">"RX"</font>, 2)) { 00104 <a class="code" href="class_s_w_basic_filter.html#b12">pushString</a>(buf, <font class="stringliteral">"<a href=\""</font>); 00105 <font class="keywordflow">for</font> (tok = token + 3; *tok; tok++) { 00106 <font class="keywordflow">if</font>(*tok != <font class="charliteral">'<'</font> && *tok+1 != <font class="charliteral">'R'</font> && *tok+2 != <font class="charliteral">'x'</font>) { 00107 *(*buf)++ = *tok; 00108 } 00109 <font class="keywordflow">else</font> { 00110 <font class="keywordflow">break</font>; 00111 } 00112 } 00113 *(*buf)++ = <font class="charliteral">'\"'</font>; 00114 *(*buf)++ = <font class="charliteral">'>'</font>; 00115 } 00116 00117 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(token, <font class="stringliteral">"RB"</font>, 2)) { 00118 <a class="code" href="class_s_w_basic_filter.html#b12">pushString</a>(buf, <font class="stringliteral">"<i>"</font>); 00119 userData[<font class="stringliteral">"hasFootnotePreTag"</font>] = <font class="stringliteral">"true"</font>; 00120 } 00121 00122 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(token, <font class="stringliteral">"RF"</font>, 2)) { 00123 <font class="keywordflow">if</font>(userData[<font class="stringliteral">"hasFootnotePreTag"</font>] == <font class="stringliteral">"true"</font>) { 00124 userData[<font class="stringliteral">"hasFootnotePreTag"</font>] = <font class="stringliteral">"false"</font>; 00125 <a class="code" href="class_s_w_basic_filter.html#b12">pushString</a>(buf, <font class="stringliteral">"</i> "</font>); 00126 } 00127 <a class="code" href="class_s_w_basic_filter.html#b12">pushString</a>(buf, <font class="stringliteral">"<font color=\"#800000\"><small> ("</font>); 00128 } 00129 00130 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(token, <font class="stringliteral">"FN"</font>, 2)) { 00131 <a class="code" href="class_s_w_basic_filter.html#b12">pushString</a>(buf, <font class="stringliteral">"<font face=\""</font>); 00132 <font class="keywordflow">for</font> (tok = token + 2; *tok; tok++) 00133 <font class="keywordflow">if</font>(*tok != <font class="charliteral">'\"'</font>) 00134 *(*buf)++ = *tok; 00135 *(*buf)++ = <font class="charliteral">'\"'</font>; 00136 *(*buf)++ = <font class="charliteral">'>'</font>; 00137 } 00138 00139 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(token, <font class="stringliteral">"CA"</font>, 2)) { <font class="comment">// ASCII value</font> 00140 *(*buf)++ = (char)atoi(&token[2]); 00141 } 00142 00143 <font class="keywordflow">else</font> { 00144 <font class="keywordflow">return</font> <font class="keyword">false</font>; 00145 } 00146 } 00147 <font class="keywordflow">return</font> <font class="keyword">true</font>; 00148 } </pre></div> </td> </tr> </table> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="gbfhtmlhref_8h-source.html">gbfhtmlhref.h</a><li><a class="el" href="gbfhtmlhref_8cpp-source.html">gbfhtmlhref.cpp</a></ul> <hr><address align="right"><small>Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.15 </small></address> </body> </html>