1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>LibOFX: fx-0.7.0/lib/ofx_preproc.cpp File Reference</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
<!-- Generated by Doxygen 1.3.7 -->
7
<div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
8
<h1>ofx_preproc.cpp File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
9
Preprocessing of the OFX files before parsing.
11
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.
13
Definition in file <a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp-source.html">fx-0.7.0/lib/ofx_preproc.cpp</a>.
17
<a href="fx-0_87_80_2lib_2ofx__preproc_8cpp-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
19
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
20
<tr><td class="memItemLeft" nowrap align=right valign=top>CFCT int </td><td class="memItemRight" valign=bottom><a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp.html#a3">ofx_proc_file</a> (LibofxContextPtr ctx, const char *p_filename)</td></tr>
22
<tr><td class="mdescLeft"> </td><td class="mdescRight">ofx_proc_file process an ofx or ofc file. <a href="#a3"></a><br><br></td></tr>
23
<tr><td class="memItemLeft" nowrap align=right valign=top>CFCT int </td><td class="memItemRight" valign=bottom><a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp.html#a4">libofx_proc_buffer</a> (LibofxContextPtr ctx, const char *s, unsigned int size)</td></tr>
25
<tr><td class="memItemLeft" nowrap align=right valign=top>string </td><td class="memItemRight" valign=bottom><a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp.html#a5">sanitize_proprietary_tags</a> (string input_string)</td></tr>
27
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes proprietary tags and comments. <a href="#a5"></a><br><br></td></tr>
28
<tr><td class="memItemLeft" nowrap align=right valign=top>string </td><td class="memItemRight" valign=bottom><a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp.html#a6">find_dtd</a> (string dtd_filename)</td></tr>
30
<tr><td class="mdescLeft"> </td><td class="mdescRight">Find the appropriate DTD for the file version. <a href="#a6"></a><br><br></td></tr>
31
<tr><td colspan=2><br><h2>Variables</h2></td></tr>
32
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a0" doxytag="fx-0.7.0/lib/ofx_preproc.cpp::DTD_SEARCH_PATH_NUM" ></a>
33
const int </td><td class="memItemRight" valign=bottom><a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp.html#a0">DTD_SEARCH_PATH_NUM</a> = 3</td></tr>
35
<tr><td class="mdescLeft"> </td><td class="mdescRight">The number of different paths to search for DTDs. <br><br></td></tr>
36
<tr><td class="memItemLeft" nowrap align=right valign=top>const char * </td><td class="memItemRight" valign=bottom><a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp.html#a1">DTD_SEARCH_PATH</a> [<a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp.html#a0">DTD_SEARCH_PATH_NUM</a>]</td></tr>
38
<tr><td class="mdescLeft"> </td><td class="mdescRight">The list of paths to search for the DTDs. <a href="#a1"></a><br><br></td></tr>
39
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a2" doxytag="fx-0.7.0/lib/ofx_preproc.cpp::READ_BUFFER_SIZE" ></a>
40
const unsigned int </td><td class="memItemRight" valign=bottom><b>READ_BUFFER_SIZE</b> = 1024</td></tr>
43
<hr><h2>Function Documentation</h2>
44
<a class="anchor" name="a6" doxytag="fx-0.7.0/lib/ofx_preproc.cpp::find_dtd" ></a><p>
45
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
48
<table cellpadding="0" cellspacing="0" border="0">
50
<td class="md" nowrap valign="top"> string find_dtd </td>
51
<td class="md" valign="top">( </td>
52
<td class="md" nowrap valign="top">string </td>
53
<td class="mdname1" valign="top" nowrap> <em>dtd_filename</em> </td>
54
<td class="md" valign="top"> ) </td>
55
<td class="md" nowrap></td>
61
<table cellspacing=5 cellpadding=0 border=0>
69
Find the appropriate DTD for the file version.
71
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>
72
Please note that currently the function will ALWAYS look for version 160, since OpenSP can't parse the 201 DTD correctly
74
Definition at line <a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp-source.html#l00434">434</a> of file <a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp-source.html">fx-0.7.0/lib/ofx_preproc.cpp</a>.
76
Referenced by <a class="el" href="ofx__preproc_8cpp-source.html#l00201">libofx_proc_buffer()</a>, and <a class="el" href="ofx__preproc_8cpp-source.html#l00058">ofx_proc_file()</a>. </td>
79
<a class="anchor" name="a4" doxytag="fx-0.7.0/lib/ofx_preproc.cpp::libofx_proc_buffer" ></a><p>
80
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
83
<table cellpadding="0" cellspacing="0" border="0">
85
<td class="md" nowrap valign="top"> CFCT int libofx_proc_buffer </td>
86
<td class="md" valign="top">( </td>
87
<td class="md" nowrap valign="top">LibofxContextPtr </td>
88
<td class="mdname" nowrap> <em>ctx</em>, </td>
91
<td class="md" nowrap align="right"></td>
93
<td class="md" nowrap>const char * </td>
94
<td class="mdname" nowrap> <em>s</em>, </td>
97
<td class="md" nowrap align="right"></td>
99
<td class="md" nowrap>unsigned int </td>
100
<td class="mdname" nowrap> <em>size</em></td>
104
<td class="md">) </td>
105
<td class="md" colspan="2"></td>
111
<table cellspacing=5 cellpadding=0 border=0>
119
Parses the content of the given buffer.
121
Definition at line <a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp-source.html#l00201">201</a> of file <a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp-source.html">fx-0.7.0/lib/ofx_preproc.cpp</a>. </td>
124
<a class="anchor" name="a3" doxytag="fx-0.7.0/lib/ofx_preproc.cpp::ofx_proc_file" ></a><p>
125
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
128
<table cellpadding="0" cellspacing="0" border="0">
130
<td class="md" nowrap valign="top"> CFCT int ofx_proc_file </td>
131
<td class="md" valign="top">( </td>
132
<td class="md" nowrap valign="top">LibofxContextPtr </td>
133
<td class="mdname" nowrap> <em>ctx</em>, </td>
136
<td class="md" nowrap align="right"></td>
138
<td class="md" nowrap>const char * </td>
139
<td class="mdname" nowrap> <em>p_filename</em></td>
143
<td class="md">) </td>
144
<td class="md" colspan="2"></td>
150
<table cellspacing=5 cellpadding=0 border=0>
158
ofx_proc_file process an ofx or ofc file.
160
Takes care of comment striping, dtd locating, etc.
162
Definition at line <a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp-source.html#l00058">58</a> of file <a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp-source.html">fx-0.7.0/lib/ofx_preproc.cpp</a>. </td>
165
<a class="anchor" name="a5" doxytag="fx-0.7.0/lib/ofx_preproc.cpp::sanitize_proprietary_tags" ></a><p>
166
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
169
<table cellpadding="0" cellspacing="0" border="0">
171
<td class="md" nowrap valign="top"> string sanitize_proprietary_tags </td>
172
<td class="md" valign="top">( </td>
173
<td class="md" nowrap valign="top">string </td>
174
<td class="mdname1" valign="top" nowrap> <em>input_string</em> </td>
175
<td class="md" valign="top"> ) </td>
176
<td class="md" nowrap></td>
182
<table cellspacing=5 cellpadding=0 border=0>
190
Removes proprietary tags and comments.
192
This function will strip all the OFX proprietary tags and SGML comments from the SGML string passed to it
194
Definition at line <a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp-source.html#l00331">331</a> of file <a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp-source.html">fx-0.7.0/lib/ofx_preproc.cpp</a>.
196
Referenced by <a class="el" href="ofx__preproc_8cpp-source.html#l00201">libofx_proc_buffer()</a>, and <a class="el" href="ofx__preproc_8cpp-source.html#l00058">ofx_proc_file()</a>. </td>
199
<hr><h2>Variable Documentation</h2>
200
<a class="anchor" name="a1" doxytag="fx-0.7.0/lib/ofx_preproc.cpp::DTD_SEARCH_PATH" ></a><p>
201
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
204
<table cellpadding="0" cellspacing="0" border="0">
206
<td class="md" nowrap valign="top"> const char* <a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp.html#a1">DTD_SEARCH_PATH</a>[<a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp.html#a0">DTD_SEARCH_PATH_NUM</a>] </td>
212
<table cellspacing=5 cellpadding=0 border=0>
220
<b>Initial value:</b><pre class="fragment"><div> {
224
<span class="stringliteral">"/usr/local/share/libofx/dtd/"</span>,
225
<span class="stringliteral">"/usr/share/libofx/dtd/"</span>,
226
<span class="stringliteral">"~/"</span>}
227
</div></pre>The list of paths to search for the DTDs.
231
Definition at line <a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp-source.html#l00045">45</a> of file <a class="el" href="fx-0_87_80_2lib_2ofx__preproc_8cpp-source.html">fx-0.7.0/lib/ofx_preproc.cpp</a>. </td>
234
<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 8 20:34:48 2004 for LibOFX by
235
<a href="http://www.doxygen.org/index.html">
236
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address>