File: ofx__preproc_8cpp.html

package info (click to toggle)
libofx 1%3A0.9.10-1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 11,192 kB
  • sloc: sh: 11,428; cpp: 6,240; ansic: 2,459; makefile: 170; xml: 61
file content (257 lines) | stat: -rw-r--r-- 14,285 bytes parent folder | download | duplicates (3)
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>LibOFX: ofx_preproc.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">LibOFX
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('ofx__preproc_8cpp.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">ofx_preproc.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Preprocessing of the OFX files before parsing.  
<a href="#details">More...</a></p>

<p><a href="ofx__preproc_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a2c89f3449c0cc91f289ecbef54188d8d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c89f3449c0cc91f289ecbef54188d8d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>DIRSEP</b>&#160;&#160;&#160;&quot;/&quot;</td></tr>
<tr class="separator:a2c89f3449c0cc91f289ecbef54188d8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09a61c3060675652c8264d4a2ed4fce9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09a61c3060675652c8264d4a2ed4fce9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>LIBOFX_DEFAULT_INPUT_ENCODING</b>&#160;&#160;&#160;&quot;CP1252&quot;</td></tr>
<tr class="separator:a09a61c3060675652c8264d4a2ed4fce9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac27a6a130c3778f9fafbc6cc6b85481a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac27a6a130c3778f9fafbc6cc6b85481a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>LIBOFX_DEFAULT_OUTPUT_ENCODING</b>&#160;&#160;&#160;&quot;UTF-8&quot;</td></tr>
<tr class="separator:ac27a6a130c3778f9fafbc6cc6b85481a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:af1f5bbdc804d79403fc544e2829b3e0f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#af1f5bbdc804d79403fc544e2829b3e0f">ofx_proc_file</a> (LibofxContextPtr ctx, const char *p_filename)</td></tr>
<tr class="memdesc:af1f5bbdc804d79403fc544e2829b3e0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">File pre-processing of OFX AND for OFC files.  <a href="#af1f5bbdc804d79403fc544e2829b3e0f">More...</a><br/></td></tr>
<tr class="separator:af1f5bbdc804d79403fc544e2829b3e0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdbd49c3c11946411dd76016609bd333"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#acdbd49c3c11946411dd76016609bd333">sanitize_proprietary_tags</a> (string input_string)</td></tr>
<tr class="memdesc:acdbd49c3c11946411dd76016609bd333"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes proprietary tags and comments.  <a href="#acdbd49c3c11946411dd76016609bd333">More...</a><br/></td></tr>
<tr class="separator:acdbd49c3c11946411dd76016609bd333"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3b2254621c5a5edc71df97ac5e345a7"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#ad3b2254621c5a5edc71df97ac5e345a7">find_dtd</a> (LibofxContextPtr ctx, const std::string &amp;dtd_filename)</td></tr>
<tr class="memdesc:ad3b2254621c5a5edc71df97ac5e345a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find the appropriate DTD for the file version.  <a href="#ad3b2254621c5a5edc71df97ac5e345a7">More...</a><br/></td></tr>
<tr class="separator:ad3b2254621c5a5edc71df97ac5e345a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a877a644df33a5047e92386446c5cce88"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a877a644df33a5047e92386446c5cce88"></a>
const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#a877a644df33a5047e92386446c5cce88">DTD_SEARCH_PATH_NUM</a> = 3</td></tr>
<tr class="memdesc:a877a644df33a5047e92386446c5cce88"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of different paths to search for DTDs. <br/></td></tr>
<tr class="separator:a877a644df33a5047e92386446c5cce88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a760a72b5e13c14b54c8eb0af7a4000d3"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__preproc_8cpp.html#a760a72b5e13c14b54c8eb0af7a4000d3">DTD_SEARCH_PATH</a> [<a class="el" href="fx-0_89_810_2lib_2ofx__preproc_8cpp.html#a877a644df33a5047e92386446c5cce88">DTD_SEARCH_PATH_NUM</a>]</td></tr>
<tr class="memdesc:a760a72b5e13c14b54c8eb0af7a4000d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">The list of paths to search for the DTDs.  <a href="#a760a72b5e13c14b54c8eb0af7a4000d3">More...</a><br/></td></tr>
<tr class="separator:a760a72b5e13c14b54c8eb0af7a4000d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a4f15870bd5573d14fceb17c65162ee"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3a4f15870bd5573d14fceb17c65162ee"></a>
const unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>READ_BUFFER_SIZE</b> = 1024</td></tr>
<tr class="separator:a3a4f15870bd5573d14fceb17c65162ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Preprocessing of the OFX files before parsing. </p>
<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>

<p>Definition in file <a class="el" href="ofx__preproc_8cpp_source.html">ofx_preproc.cpp</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ad3b2254621c5a5edc71df97ac5e345a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string find_dtd </td>
          <td>(</td>
          <td class="paramtype">LibofxContextPtr&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>dtd_filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Find the appropriate DTD for the file version. </p>
<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 unsuccessful)</p>
<p>Please note that currently the function will ALWAYS look for version 160, since OpenSP can't parse the 201 DTD correctly</p>
<p>It will look, in (order)</p>
<p>1- The environment variable OFX_DTD_PATH (if present) 2- On windows only, a relative path specified by get_dtd_installation_directory() 3- The path specified by the makefile in MAKEFILE_DTD_PATH, thru LIBOFX_DTD_DIR in configure (if present) 4- Any hardcoded paths in DTD_SEARCH_PATH </p>

<p>Definition at line <a class="el" href="ofx__preproc_8cpp_source.html#l00569">569</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#l00081">ofx_proc_file()</a>.</p>

</div>
</div>
<a class="anchor" id="af1f5bbdc804d79403fc544e2829b3e0f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ofx_proc_file </td>
          <td>(</td>
          <td class="paramtype">LibofxContextPtr&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>p_filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>File pre-processing of OFX AND for OFC files. </p>
<p>ofx_proc_file process an ofx or ofc file.</p>
<p>Takes care of comment striping, dtd locating, etc. </p>

<p>Definition at line <a class="el" href="ofx__preproc_8cpp_source.html#l00081">81</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>
<a class="anchor" id="acdbd49c3c11946411dd76016609bd333"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string sanitize_proprietary_tags </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>input_string</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes proprietary tags and comments. </p>
<p>This function will strip all the OFX proprietary tags and SGML comments from the SGML string passed to it </p>

<p>Definition at line <a class="el" href="ofx__preproc_8cpp_source.html#l00417">417</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#l00081">ofx_proc_file()</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="a760a72b5e13c14b54c8eb0af7a4000d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* DTD_SEARCH_PATH[<a class="el" href="fx-0_89_810_2lib_2ofx__preproc_8cpp.html#a877a644df33a5047e92386446c5cce88">DTD_SEARCH_PATH_NUM</a>]</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">=</div>
<div class="line">{</div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line">  <span class="stringliteral">&quot;/usr/local/share/libofx/dtd&quot;</span>,</div>
<div class="line">  <span class="stringliteral">&quot;/usr/share/libofx/dtd&quot;</span>,</div>
<div class="line">  <span class="stringliteral">&quot;~&quot;</span></div>
<div class="line">}</div>
</div><!-- fragment -->
<p>The list of paths to search for the DTDs. </p>

<p>Definition at line <a class="el" href="ofx__preproc_8cpp_source.html#l00066">66</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#l00569">find_dtd()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_92da12de3a7e435e6ac7f35fe8c95afc.html">lib</a></li><li class="navelem"><a class="el" href="ofx__preproc_8cpp.html">ofx_preproc.cpp</a></li>
    <li class="footer">Generated on Fri Sep 12 2014 15:59:21 for LibOFX by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>