1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>LibOFX: ofx_preproc.cpp File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>ofx_preproc.cpp File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Preprocessing of the OFX files before parsing.
<p>
Implements the pre-treatement of the OFX file prior to parsing: OFX header striping, OFX proprietary tags and SGML comment striping, locating the appropriate DTD.
<p>Definition in file <a class="el" href="ofx__preproc_8cpp-source.html">ofx_preproc.cpp</a>.</p>
<p>
<p>
<a href="ofx__preproc_8cpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09a61c3060675652c8264d4a2ed4fce9"></a><!-- doxytag: member="ofx_preproc.cpp::LIBOFX_DEFAULT_INPUT_ENCODING" ref="09a61c3060675652c8264d4a2ed4fce9" args="" -->
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#09a61c3060675652c8264d4a2ed4fce9">LIBOFX_DEFAULT_INPUT_ENCODING</a> "CP1252"</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c27a6a130c3778f9fafbc6cc6b85481a"></a><!-- doxytag: member="ofx_preproc.cpp::LIBOFX_DEFAULT_OUTPUT_ENCODING" ref="c27a6a130c3778f9fafbc6cc6b85481a" args="" -->
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#c27a6a130c3778f9fafbc6cc6b85481a">LIBOFX_DEFAULT_OUTPUT_ENCODING</a> "UTF-8"</td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">CFCT int </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#f2eca18ef5a500e7f76ed180d0af8a0a">ofx_proc_file</a> (<a class="el" href="libofx-0_89_80_2inc_2libofx_8h.html#cb05196108aab07092d1b4931577b87c">LibofxContextPtr</a> ctx, const char *p_filename)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">File pre-processing of OFX AND for OFC files. <a href="#f2eca18ef5a500e7f76ed180d0af8a0a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">CFCT int </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#02ee3c0b61d866f98fd0f15775d06895">libofx_proc_buffer</a> (<a class="el" href="libofx-0_89_80_2inc_2libofx_8h.html#cb05196108aab07092d1b4931577b87c">LibofxContextPtr</a> ctx, const char *s, unsigned int size)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#cdbd49c3c11946411dd76016609bd333">sanitize_proprietary_tags</a> (string input_string)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes proprietary tags and comments. <a href="#cdbd49c3c11946411dd76016609bd333"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#a45231657cddffcb50db295076956183">find_dtd</a> (<a class="el" href="libofx-0_89_80_2inc_2libofx_8h.html#cb05196108aab07092d1b4931577b87c">LibofxContextPtr</a> ctx, string dtd_filename)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Find the appropriate DTD for the file version. <a href="#a45231657cddffcb50db295076956183"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="877a644df33a5047e92386446c5cce88"></a><!-- doxytag: member="ofx_preproc.cpp::DTD_SEARCH_PATH_NUM" ref="877a644df33a5047e92386446c5cce88" args="" -->
const int </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#877a644df33a5047e92386446c5cce88">DTD_SEARCH_PATH_NUM</a> = 3</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The number of different paths to search for DTDs. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#760a72b5e13c14b54c8eb0af7a4000d3">DTD_SEARCH_PATH</a> [<a class="el" href="fx-0_89_80_2lib_2ofx__preproc_8cpp.html#877a644df33a5047e92386446c5cce88">DTD_SEARCH_PATH_NUM</a>]</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The list of paths to search for the DTDs. <a href="#760a72b5e13c14b54c8eb0af7a4000d3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3a4f15870bd5573d14fceb17c65162ee"></a><!-- doxytag: member="ofx_preproc.cpp::READ_BUFFER_SIZE" ref="3a4f15870bd5573d14fceb17c65162ee" args="" -->
const unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#3a4f15870bd5573d14fceb17c65162ee">READ_BUFFER_SIZE</a> = 1024</td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="a45231657cddffcb50db295076956183"></a><!-- doxytag: member="ofx_preproc.cpp::find_dtd" ref="a45231657cddffcb50db295076956183" args="(LibofxContextPtr ctx, string dtd_filename)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string find_dtd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="libofx-0_89_80_2inc_2libofx_8h.html#cb05196108aab07092d1b4931577b87c">LibofxContextPtr</a> </td>
<td class="paramname"> <em>ctx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">string </td>
<td class="paramname"> <em>dtd_filename</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Find the appropriate DTD for the file version.
<p>
This function will try to find a DTD matching the requested_version and return the full path of the DTD found (or an empty string if unsuccessfull)<p>
Please note that currently the function will ALWAYS look for version 160, since OpenSP can't parse the 201 DTD correctly
<p>Definition at line <a class="el" href="ofx__preproc_8cpp-source.html#l00514">514</a> of file <a class="el" href="ofx__preproc_8cpp-source.html">ofx_preproc.cpp</a>.</p>
<p>Referenced by <a class="el" href="ofx__preproc_8cpp-source.html#l00280">libofx_proc_buffer()</a>, and <a class="el" href="ofx__preproc_8cpp-source.html#l00070">ofx_proc_file()</a>.</p>
</div>
</div><p>
<a class="anchor" name="02ee3c0b61d866f98fd0f15775d06895"></a><!-- doxytag: member="ofx_preproc.cpp::libofx_proc_buffer" ref="02ee3c0b61d866f98fd0f15775d06895" args="(LibofxContextPtr ctx, const char *s, unsigned int size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">CFCT int libofx_proc_buffer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="libofx-0_89_80_2inc_2libofx_8h.html#cb05196108aab07092d1b4931577b87c">LibofxContextPtr</a> </td>
<td class="paramname"> <em>ctx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>s</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Parses the content of the given buffer.
<p>Definition at line <a class="el" href="ofx__preproc_8cpp-source.html#l00280">280</a> of file <a class="el" href="ofx__preproc_8cpp-source.html">ofx_preproc.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="f2eca18ef5a500e7f76ed180d0af8a0a"></a><!-- doxytag: member="ofx_preproc.cpp::ofx_proc_file" ref="f2eca18ef5a500e7f76ed180d0af8a0a" args="(LibofxContextPtr ctx, const char *p_filename)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">CFCT int ofx_proc_file </td>
<td>(</td>
<td class="paramtype"><a class="el" href="libofx-0_89_80_2inc_2libofx_8h.html#cb05196108aab07092d1b4931577b87c">LibofxContextPtr</a> </td>
<td class="paramname"> <em>ctx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>p_filename</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
File pre-processing of OFX AND for OFC files.
<p>
ofx_proc_file process an ofx or ofc file.<p>
Takes care of comment striping, dtd locating, etc.
<p>Definition at line <a class="el" href="ofx__preproc_8cpp-source.html#l00070">70</a> of file <a class="el" href="ofx__preproc_8cpp-source.html">ofx_preproc.cpp</a>.</p>
<p>Referenced by <a class="el" href="file__preproc_8cpp-source.html#l00067">libofx_proc_file()</a>.</p>
</div>
</div><p>
<a class="anchor" name="cdbd49c3c11946411dd76016609bd333"></a><!-- doxytag: member="ofx_preproc.cpp::sanitize_proprietary_tags" ref="cdbd49c3c11946411dd76016609bd333" args="(string input_string)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string sanitize_proprietary_tags </td>
<td>(</td>
<td class="paramtype">string </td>
<td class="paramname"> <em>input_string</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Removes proprietary tags and comments.
<p>
This function will strip all the OFX proprietary tags and SGML comments from the SGML string passed to it
<p>Definition at line <a class="el" href="ofx__preproc_8cpp-source.html#l00411">411</a> of file <a class="el" href="ofx__preproc_8cpp-source.html">ofx_preproc.cpp</a>.</p>
<p>Referenced by <a class="el" href="ofx__preproc_8cpp-source.html#l00280">libofx_proc_buffer()</a>, and <a class="el" href="ofx__preproc_8cpp-source.html#l00070">ofx_proc_file()</a>.</p>
</div>
</div><p>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="760a72b5e13c14b54c8eb0af7a4000d3"></a><!-- doxytag: member="ofx_preproc.cpp::DTD_SEARCH_PATH" ref="760a72b5e13c14b54c8eb0af7a4000d3" args="[DTD_SEARCH_PATH_NUM]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* <a class="el" href="fx-0_89_80_2lib_2ofx__preproc_8cpp.html#760a72b5e13c14b54c8eb0af7a4000d3">DTD_SEARCH_PATH</a>[<a class="el" href="fx-0_89_80_2lib_2ofx__preproc_8cpp.html#877a644df33a5047e92386446c5cce88">DTD_SEARCH_PATH_NUM</a>] </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Initial value:</b><div class="fragment"><pre class="fragment"> {
<span class="stringliteral">"/usr/local/share/libofx/dtd/"</span>,
<span class="stringliteral">"/usr/share/libofx/dtd/"</span>,
<span class="stringliteral">"~/"</span>}
</pre></div>The list of paths to search for the DTDs.
<p>
<p>Definition at line <a class="el" href="ofx__preproc_8cpp-source.html#l00057">57</a> of file <a class="el" href="ofx__preproc_8cpp-source.html">ofx_preproc.cpp</a>.</p>
<p>Referenced by <a class="el" href="ofx__preproc_8cpp-source.html#l00514">find_dtd()</a>.</p>
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Nov 19 20:28:00 2007 for LibOFX by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>
|