1
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">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
3
<title>LibOFX: ofx_utilities.hh File Reference</title>
4
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.4.6 -->
7
<!-- Generated by Doxygen 1.5.3 -->
10
10
<li><a href="main.html"><span>Main Page</span></a></li>
11
11
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
12
12
<li><a href="annotated.html"><span>Data Structures</span></a></li>
13
<li id="current"><a href="files.html"><span>Files</span></a></li>
17
<li><a href="files.html"><span>File List</span></a></li>
18
<li><a href="globals.html"><span>Globals</span></a></li>
13
<li class="current"><a href="files.html"><span>Files</span></a></li>
20
16
<h1>ofx_utilities.hh File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
21
17
Various simple functions for type conversion & al.
25
Definition in file <a class="el" href="ofx__utilities_8hh-source.html">ofx_utilities.hh</a>.
20
<p>Definition in file <a class="el" href="ofx__utilities_8hh-source.html">ofx_utilities.hh</a>.</p>
29
25
<a href="ofx__utilities_8hh-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
31
27
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
32
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="095339d14cabfdc91293958f37f871f7"></a><!-- doxytag: member="ofx_utilities.hh::operator<<" ref="095339d14cabfdc91293958f37f871f7" args="(ostream &os, SGMLApplication::CharString s)" -->
33
ostream & </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#095339d14cabfdc91293958f37f871f7">operator<<</a> (ostream &os, SGMLApplication::CharString s)</td></tr>
28
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="39ffcaaff3de66030e3e59c2e3e98f8e"></a><!-- doxytag: member="ofx_utilities.hh::operator<<" ref="39ffcaaff3de66030e3e59c2e3e98f8e" args="(ostream &os, SGMLApplication::CharString s)" -->
29
ostream & </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#39ffcaaff3de66030e3e59c2e3e98f8e">operator<<</a> (ostream &os, SGMLApplication::CharString s)</td></tr>
35
31
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert OpenSP CharString to a C++ stream. <br></td></tr>
36
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="53f86c2bd09208cb164d2cb70f2938b3"></a><!-- doxytag: member="ofx_utilities.hh::CharStringtowchar_t" ref="53f86c2bd09208cb164d2cb70f2938b3" args="(SGMLApplication::CharString source, wchar_t *dest)" -->
37
wchar_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#53f86c2bd09208cb164d2cb70f2938b3">CharStringtowchar_t</a> (SGMLApplication::CharString source, wchar_t *dest)</td></tr>
32
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2fd46abc036e918fce7b04d9200b3e75"></a><!-- doxytag: member="ofx_utilities.hh::CharStringtowchar_t" ref="2fd46abc036e918fce7b04d9200b3e75" args="(SGMLApplication::CharString source, wchar_t *dest)" -->
33
wchar_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#2fd46abc036e918fce7b04d9200b3e75">CharStringtowchar_t</a> (SGMLApplication::CharString source, wchar_t *dest)</td></tr>
39
35
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert OpenSP CharString and put it in the C wchar_t string provided. <br></td></tr>
40
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#0d78db2f18e9d8b4a9916b90819d073e">CharStringtostring</a> (const SGMLApplication::CharString source, string &dest)</td></tr>
36
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#e7575392f9f9c464ede10057dec0e8e4">CharStringtostring</a> (const SGMLApplication::CharString source, string &dest)</td></tr>
42
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert OpenSP CharString to a C++ STL string. <a href="#0d78db2f18e9d8b4a9916b90819d073e"></a><br></td></tr>
43
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f54953e915499daefb8959d8b15fa6f0"></a><!-- doxytag: member="ofx_utilities.hh::AppendCharStringtostring" ref="f54953e915499daefb8959d8b15fa6f0" args="(const SGMLApplication::CharString source, string &dest)" -->
44
string </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#f54953e915499daefb8959d8b15fa6f0">AppendCharStringtostring</a> (const SGMLApplication::CharString source, string &dest)</td></tr>
38
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert OpenSP CharString to a C++ STL string. <a href="#e7575392f9f9c464ede10057dec0e8e4"></a><br></td></tr>
39
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="50b88c84b759d3058397336e7ea42c32"></a><!-- doxytag: member="ofx_utilities.hh::AppendCharStringtostring" ref="50b88c84b759d3058397336e7ea42c32" args="(const SGMLApplication::CharString source, string &dest)" -->
40
string </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#50b88c84b759d3058397336e7ea42c32">AppendCharStringtostring</a> (const SGMLApplication::CharString source, string &dest)</td></tr>
46
42
<tr><td class="mdescLeft"> </td><td class="mdescRight">Append an OpenSP CharString to an existing C++ STL string. <br></td></tr>
47
<tr><td class="memItemLeft" nowrap align="right" valign="top">time_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#a82c89f166fafe7ac376f2ecc7f1059a">ofxdate_to_time_t</a> (const string ofxdate)</td></tr>
49
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a C++ string containing a time in OFX format to a C time_t. <a href="#a82c89f166fafe7ac376f2ecc7f1059a"></a><br></td></tr>
50
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#ca59f589043d9d418168b8092809d0a1">ofxamount_to_double</a> (const string ofxamount)</td></tr>
52
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert OFX amount of money to double float. <a href="#ca59f589043d9d418168b8092809d0a1"></a><br></td></tr>
53
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#eb4379d3bf0c6900bda8b5f2feb9db92">strip_whitespace</a> (const string para_string)</td></tr>
55
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sanitize a string coming from OpenSP. <a href="#eb4379d3bf0c6900bda8b5f2feb9db92"></a><br></td></tr>
43
<tr><td class="memItemLeft" nowrap align="right" valign="top">time_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#5fdbbc08f8d80a534f8db03d25316d7a">ofxdate_to_time_t</a> (const string ofxdate)</td></tr>
45
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a C++ string containing a time in OFX format to a C time_t. <a href="#5fdbbc08f8d80a534f8db03d25316d7a"></a><br></td></tr>
46
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#bfca5b423e5d7b194eb53c53f706f6ba">ofxamount_to_double</a> (const string ofxamount)</td></tr>
48
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert OFX amount of money to double float. <a href="#bfca5b423e5d7b194eb53c53f706f6ba"></a><br></td></tr>
49
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#34933785dd934134973847e58a700733">strip_whitespace</a> (const string para_string)</td></tr>
51
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sanitize a string coming from OpenSP. <a href="#34933785dd934134973847e58a700733"></a><br></td></tr>
52
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0e945c824a3012017b4babd721d9f38"></a><!-- doxytag: member="ofx_utilities.hh::mkTempFileName" ref="a0e945c824a3012017b4babd721d9f38" args="(const char *tmpl, char *buffer, unsigned int size)" -->
53
int </td><td class="memItemRight" valign="bottom"><a class="el" href="ofx__utilities_8hh.html#a0e945c824a3012017b4babd721d9f38">mkTempFileName</a> (const char *tmpl, char *buffer, unsigned int size)</td></tr>
57
56
<hr><h2>Function Documentation</h2>
58
<a class="anchor" name="0d78db2f18e9d8b4a9916b90819d073e"></a><!-- doxytag: member="ofx_utilities.hh::CharStringtostring" ref="0d78db2f18e9d8b4a9916b90819d073e" args="(const SGMLApplication::CharString source, string &dest)" --><p>
59
<table class="mdTable" cellpadding="2" cellspacing="0">
62
<table cellpadding="0" cellspacing="0" border="0">
64
<td class="md" nowrap valign="top">string CharStringtostring </td>
65
<td class="md" valign="top">( </td>
66
<td class="md" nowrap valign="top">const SGMLApplication::CharString </td>
67
<td class="mdname" nowrap> <em>source</em>, </td>
70
<td class="md" nowrap align="right"></td>
72
<td class="md" nowrap>string & </td>
73
<td class="mdname" nowrap> <em>dest</em></td>
77
<td class="md">) </td>
78
<td class="md" colspan="2"></td>
57
<a class="anchor" name="e7575392f9f9c464ede10057dec0e8e4"></a><!-- doxytag: member="ofx_utilities.hh::CharStringtostring" ref="e7575392f9f9c464ede10057dec0e8e4" args="(const SGMLApplication::CharString source, string &dest)" -->
59
<div class="memproto">
60
<table class="memname">
62
<td class="memname">string CharStringtostring </td>
64
<td class="paramtype">const SGMLApplication::CharString </td>
65
<td class="paramname"> <em>source</em>, </td>
68
<td class="paramkey"></td>
70
<td class="paramtype">string & </td>
71
<td class="paramname"> <em>dest</em></td><td> </td>
76
<td></td><td></td><td width="100%"></td>
84
<table cellspacing="5" cellpadding="0" border="0">
92
83
Convert OpenSP CharString to a C++ STL string.
94
85
Convert an OpenSP CharString directly to a C++ stream, to enable the use of cout directly for debugging.
96
Definition at line <a class="el" href="ofx__utilities_8cpp-source.html#l00060">60</a> of file <a class="el" href="ofx__utilities_8cpp-source.html">ofx_utilities.cpp</a>. </td>
99
<a class="anchor" name="ca59f589043d9d418168b8092809d0a1"></a><!-- doxytag: member="ofx_utilities.hh::ofxamount_to_double" ref="ca59f589043d9d418168b8092809d0a1" args="(const string ofxamount)" --><p>
100
<table class="mdTable" cellpadding="2" cellspacing="0">
103
<table cellpadding="0" cellspacing="0" border="0">
86
<p>Definition at line <a class="el" href="ofx__utilities_8cpp-source.html#l00069">69</a> of file <a class="el" href="ofx__utilities_8cpp-source.html">ofx_utilities.cpp</a>.</p>
90
<a class="anchor" name="bfca5b423e5d7b194eb53c53f706f6ba"></a><!-- doxytag: member="ofx_utilities.hh::ofxamount_to_double" ref="bfca5b423e5d7b194eb53c53f706f6ba" args="(const string ofxamount)" -->
92
<div class="memproto">
93
<table class="memname">
105
<td class="md" nowrap valign="top">double ofxamount_to_double </td>
106
<td class="md" valign="top">( </td>
107
<td class="md" nowrap valign="top">const string </td>
108
<td class="mdname1" valign="top" nowrap> <em>ofxamount</em> </td>
109
<td class="md" valign="top"> ) </td>
110
<td class="md" nowrap></td>
95
<td class="memname">double ofxamount_to_double </td>
97
<td class="paramtype">const string </td>
98
<td class="paramname"> <em>ofxamount</em> </td>
99
<td> ) </td>
100
<td width="100%"></td>
116
<table cellspacing="5" cellpadding="0" border="0">
124
107
Convert OFX amount of money to double float.
126
Convert a C++ string containing an amount of money as specified by the OFX standard and convert it to a double float. <dl compact><dt><b>Note:</b></dt><dd>The ofx number format is the following: "." or "," as decimal separator, NO thousands separator. </dd></dl>
129
Definition at line <a class="el" href="ofx__utilities_8cpp-source.html#l00165">165</a> of file <a class="el" href="ofx__utilities_8cpp-source.html">ofx_utilities.cpp</a>. </td>
132
<a class="anchor" name="a82c89f166fafe7ac376f2ecc7f1059a"></a><!-- doxytag: member="ofx_utilities.hh::ofxdate_to_time_t" ref="a82c89f166fafe7ac376f2ecc7f1059a" args="(const string ofxdate)" --><p>
133
<table class="mdTable" cellpadding="2" cellspacing="0">
136
<table cellpadding="0" cellspacing="0" border="0">
109
Convert a C++ string containing an amount of money as specified by the OFX standard and convert it to a double float. <dl class="note" compact><dt><b>Note:</b></dt><dd>The ofx number format is the following: "." or "," as decimal separator, NO thousands separator. </dd></dl>
111
<p>Definition at line <a class="el" href="ofx__utilities_8cpp-source.html#l00174">174</a> of file <a class="el" href="ofx__utilities_8cpp-source.html">ofx_utilities.cpp</a>.</p>
115
<a class="anchor" name="5fdbbc08f8d80a534f8db03d25316d7a"></a><!-- doxytag: member="ofx_utilities.hh::ofxdate_to_time_t" ref="5fdbbc08f8d80a534f8db03d25316d7a" args="(const string ofxdate)" -->
116
<div class="memitem">
117
<div class="memproto">
118
<table class="memname">
138
<td class="md" nowrap valign="top">time_t ofxdate_to_time_t </td>
139
<td class="md" valign="top">( </td>
140
<td class="md" nowrap valign="top">const string </td>
141
<td class="mdname1" valign="top" nowrap> <em>ofxdate</em> </td>
142
<td class="md" valign="top"> ) </td>
143
<td class="md" nowrap></td>
120
<td class="memname">time_t ofxdate_to_time_t </td>
122
<td class="paramtype">const string </td>
123
<td class="paramname"> <em>ofxdate</em> </td>
124
<td> ) </td>
125
<td width="100%"></td>
149
<table cellspacing="5" cellpadding="0" border="0">
157
132
Convert a C++ string containing a time in OFX format to a C time_t.
178
153
-When a timezone is specified, it is always used to properly convert in local time, following the spec. </dd></dl>
181
Definition at line <a class="el" href="ofx__utilities_8cpp-source.html#l00097">97</a> of file <a class="el" href="ofx__utilities_8cpp-source.html">ofx_utilities.cpp</a>. </td>
184
<a class="anchor" name="eb4379d3bf0c6900bda8b5f2feb9db92"></a><!-- doxytag: member="ofx_utilities.hh::strip_whitespace" ref="eb4379d3bf0c6900bda8b5f2feb9db92" args="(const string para_string)" --><p>
185
<table class="mdTable" cellpadding="2" cellspacing="0">
188
<table cellpadding="0" cellspacing="0" border="0">
155
<p>Definition at line <a class="el" href="ofx__utilities_8cpp-source.html#l00106">106</a> of file <a class="el" href="ofx__utilities_8cpp-source.html">ofx_utilities.cpp</a>.</p>
159
<a class="anchor" name="34933785dd934134973847e58a700733"></a><!-- doxytag: member="ofx_utilities.hh::strip_whitespace" ref="34933785dd934134973847e58a700733" args="(const string para_string)" -->
160
<div class="memitem">
161
<div class="memproto">
162
<table class="memname">
190
<td class="md" nowrap valign="top">string strip_whitespace </td>
191
<td class="md" valign="top">( </td>
192
<td class="md" nowrap valign="top">const string </td>
193
<td class="mdname1" valign="top" nowrap> <em>para_string</em> </td>
194
<td class="md" valign="top"> ) </td>
195
<td class="md" nowrap></td>
164
<td class="memname">string strip_whitespace </td>
166
<td class="paramtype">const string </td>
167
<td class="paramname"> <em>para_string</em> </td>
168
<td> ) </td>
169
<td width="100%"></td>
201
<table cellspacing="5" cellpadding="0" border="0">
209
176
Sanitize a string coming from OpenSP.
211
178
Many weird caracters can be present inside a SGML element, as a result on the transfer protocol, or for any reason. This function greatly enhances the reliability of the library by zapping those gremlins (backspace,formfeed,newline,carriage return, horizontal and vertical tabs) as well as removing whitespace at the begining and end of the string. Otherwise, many problems will occur during stringmatching.
213
Definition at line <a class="el" href="ofx__utilities_8cpp-source.html#l00186">186</a> of file <a class="el" href="ofx__utilities_8cpp-source.html">ofx_utilities.cpp</a>. </td>
216
<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 25 13:25:22 2006 for LibOFX by
179
<p>Definition at line <a class="el" href="ofx__utilities_8cpp-source.html#l00195">195</a> of file <a class="el" href="ofx__utilities_8cpp-source.html">ofx_utilities.cpp</a>.</p>
183
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Nov 19 20:28:00 2007 for LibOFX by
217
184
<a href="http://www.doxygen.org/index.html">
218
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
185
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>