~ubuntu-branches/ubuntu/natty/libofx/natty

« back to all changes in this revision

Viewing changes to doc/html/ofx__container__security_8cpp-source.html

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2005-11-29 00:12:00 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051129001200-aplj8zbj80f68xby
Tags: 1:0.8.0-9
Generate autotools using Debian libtool (rerun libtoolize --copy
--force, aclocal-1.9, autoconf). (Closes: #341190)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<title>LibOFX: ofx_container_security.cpp Source File</title>
4
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
5
</head><body>
6
 
<!-- Generated by Doxygen 1.3.7 -->
 
6
<!-- Generated by Doxygen 1.3.9.1 -->
7
7
<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
8
 
<h1>ofx_container_security.cpp</h1><a href="ofx__container__security_8cpp.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/***************************************************************************</span>
 
8
<div class="nav">
 
9
<a class="el" href="dir_000002.html">lib</a></div>
 
10
<h1>ofx_container_security.cpp</h1><a href="ofx__container__security_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/***************************************************************************</span>
9
11
00002 <span class="comment">         ofx_container_security.cpp </span>
10
12
00003 <span class="comment">                             -------------------</span>
11
13
00004 <span class="comment">    copyright            : (C) 2002 by Benoit Gr�goire</span>
26
28
00023 <span class="preprocessor"></span>
27
29
00024 <span class="preprocessor">#include &lt;string&gt;</span>
28
30
00025 <span class="preprocessor">#include "<a class="code" href="messages_8hh.html">messages.hh</a>"</span>
29
 
00026 <span class="preprocessor">#include "<a class="code" href="libofx-0_87_80_2inc_2libofx_8h.html">libofx.h</a>"</span>
 
31
00026 <span class="preprocessor">#include "<a class="code" href="libofx-0_88_80_2inc_2libofx_8h.html">libofx.h</a>"</span>
30
32
00027 <span class="preprocessor">#include "<a class="code" href="ofx__containers_8hh.html">ofx_containers.hh</a>"</span>
31
33
00028 <span class="preprocessor">#include "<a class="code" href="ofx__utilities_8hh.html">ofx_utilities.hh</a>"</span>
32
34
00029 
48
50
<a name="l00045"></a><a class="code" href="classOfxSecurityContainer.html#a2">00045</a> <span class="keywordtype">void</span> <a class="code" href="classOfxSecurityContainer.html#a2">OfxSecurityContainer::add_attribute</a>(<span class="keyword">const</span> string identifier, <span class="keyword">const</span> string value)
49
51
00046 {
50
52
00047   <span class="keywordflow">if</span>(identifier==<span class="stringliteral">"UNIQUEID"</span>){
51
 
00048     strncpy(data.<a class="code" href="structOfxSecurityData.html#z4_0">unique_id</a>,value.c_str(), <span class="keyword">sizeof</span>(data.<a class="code" href="structOfxSecurityData.html#z4_0">unique_id</a>));
52
 
00049     data.<a class="code" href="structOfxSecurityData.html#z4_1">unique_id_valid</a> = <span class="keyword">true</span>;
 
53
00048     strncpy(data.<a class="code" href="structOfxSecurityData.html#z12_0">unique_id</a>,value.c_str(), <span class="keyword">sizeof</span>(data.<a class="code" href="structOfxSecurityData.html#z12_0">unique_id</a>));
 
54
00049     data.<a class="code" href="structOfxSecurityData.html#z12_1">unique_id_valid</a> = <span class="keyword">true</span>;
53
55
00050   }
54
56
00051   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(identifier==<span class="stringliteral">"UNIQUEIDTYPE"</span>){
55
 
00052     strncpy(data.<a class="code" href="structOfxSecurityData.html#z4_2">unique_id_type</a>,value.c_str(), <span class="keyword">sizeof</span>(data.<a class="code" href="structOfxSecurityData.html#z4_2">unique_id_type</a>));
56
 
00053     data.<a class="code" href="structOfxSecurityData.html#z4_3">unique_id_type_valid</a> = <span class="keyword">true</span>;
 
57
00052     strncpy(data.<a class="code" href="structOfxSecurityData.html#z12_2">unique_id_type</a>,value.c_str(), <span class="keyword">sizeof</span>(data.<a class="code" href="structOfxSecurityData.html#z12_2">unique_id_type</a>));
 
58
00053     data.<a class="code" href="structOfxSecurityData.html#z12_3">unique_id_type_valid</a> = <span class="keyword">true</span>;
57
59
00054   }
58
60
00055   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(identifier==<span class="stringliteral">"SECNAME"</span>){
59
 
00056     strncpy(data.<a class="code" href="structOfxSecurityData.html#z4_4">secname</a>,value.c_str(), <span class="keyword">sizeof</span>(data.<a class="code" href="structOfxSecurityData.html#z4_4">secname</a>));
60
 
00057     data.<a class="code" href="structOfxSecurityData.html#z4_5">secname_valid</a> = <span class="keyword">true</span>;
 
61
00056     strncpy(data.<a class="code" href="structOfxSecurityData.html#z12_4">secname</a>,value.c_str(), <span class="keyword">sizeof</span>(data.<a class="code" href="structOfxSecurityData.html#z12_4">secname</a>));
 
62
00057     data.<a class="code" href="structOfxSecurityData.html#z12_5">secname_valid</a> = <span class="keyword">true</span>;
61
63
00058   }
62
64
00059   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(identifier==<span class="stringliteral">"TICKER"</span>){
63
 
00060     strncpy(data.<a class="code" href="structOfxSecurityData.html#z5_0">ticker</a>,value.c_str(), <span class="keyword">sizeof</span>(data.<a class="code" href="structOfxSecurityData.html#z5_0">ticker</a>));
64
 
00061     data.<a class="code" href="structOfxSecurityData.html#z5_1">ticker_valid</a> = <span class="keyword">true</span>;
 
65
00060     strncpy(data.<a class="code" href="structOfxSecurityData.html#z13_0">ticker</a>,value.c_str(), <span class="keyword">sizeof</span>(data.<a class="code" href="structOfxSecurityData.html#z13_0">ticker</a>));
 
66
00061     data.<a class="code" href="structOfxSecurityData.html#z13_1">ticker_valid</a> = <span class="keyword">true</span>;
65
67
00062   }
66
68
00063   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(identifier==<span class="stringliteral">"UNITPRICE"</span>){
67
 
00064     data.<a class="code" href="structOfxSecurityData.html#z5_2">unitprice</a>=<a class="code" href="fx-0_87_80_2lib_2ofx__utilities_8hh.html#a5">ofxamount_to_double</a>(value);
68
 
00065     data.<a class="code" href="structOfxSecurityData.html#z5_3">unitprice_valid</a> = <span class="keyword">true</span>;
 
69
00064     data.<a class="code" href="structOfxSecurityData.html#z13_2">unitprice</a>=<a class="code" href="fx-0_88_80_2lib_2ofx__utilities_8hh.html#a5">ofxamount_to_double</a>(value);
 
70
00065     data.<a class="code" href="structOfxSecurityData.html#z13_3">unitprice_valid</a> = <span class="keyword">true</span>;
69
71
00066   }
70
72
00067   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(identifier==<span class="stringliteral">"DTASOF"</span>){
71
 
00068     data.<a class="code" href="structOfxSecurityData.html#z5_4">date_unitprice</a> = <a class="code" href="fx-0_87_80_2lib_2ofx__utilities_8hh.html#a4">ofxdate_to_time_t</a>(value);
72
 
00069     data.<a class="code" href="structOfxSecurityData.html#z5_5">date_unitprice_valid</a> = <span class="keyword">true</span>;
 
73
00068     data.<a class="code" href="structOfxSecurityData.html#z13_4">date_unitprice</a> = <a class="code" href="fx-0_88_80_2lib_2ofx__utilities_8hh.html#a4">ofxdate_to_time_t</a>(value);
 
74
00069     data.<a class="code" href="structOfxSecurityData.html#z13_5">date_unitprice_valid</a> = <span class="keyword">true</span>;
73
75
00070   }
74
76
00071   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(identifier==<span class="stringliteral">"CURDEF"</span>){
75
 
00072     strncpy(data.<a class="code" href="structOfxSecurityData.html#z5_6">currency</a>,value.c_str(),OFX_CURRENCY_LENGTH);
76
 
00073     data.<a class="code" href="structOfxSecurityData.html#z5_7">currency_valid</a>=<span class="keyword">true</span>;
 
77
00072     strncpy(data.<a class="code" href="structOfxSecurityData.html#z13_6">currency</a>,value.c_str(),OFX_CURRENCY_LENGTH);
 
78
00073     data.<a class="code" href="structOfxSecurityData.html#z13_7">currency_valid</a>=<span class="keyword">true</span>;
77
79
00074   }
78
80
00075   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(identifier==<span class="stringliteral">"MEMO"</span> || identifier==<span class="stringliteral">"MEMO2"</span>){
79
 
00076     strncpy(data.<a class="code" href="structOfxSecurityData.html#z5_8">memo</a>,value.c_str(), <span class="keyword">sizeof</span>(data.<a class="code" href="structOfxSecurityData.html#z5_8">memo</a>));
80
 
00077     data.<a class="code" href="structOfxSecurityData.html#z5_9">memo_valid</a> = <span class="keyword">true</span>;
 
81
00076     strncpy(data.<a class="code" href="structOfxSecurityData.html#z13_8">memo</a>,value.c_str(), <span class="keyword">sizeof</span>(data.<a class="code" href="structOfxSecurityData.html#z13_8">memo</a>));
 
82
00077     data.<a class="code" href="structOfxSecurityData.html#z13_9">memo_valid</a> = <span class="keyword">true</span>;
81
83
00078  }
82
84
00079   <span class="keywordflow">else</span>{
83
85
00080     <span class="comment">/* Redirect unknown identifiers to the base class */</span>
84
 
00081     OfxGenericContainer::add_attribute(identifier, value);
 
86
00081     <a class="code" href="classOfxGenericContainer.html#a4">OfxGenericContainer::add_attribute</a>(identifier, value);
85
87
00082   }
86
88
00083 }
87
89
<a name="l00084"></a><a class="code" href="classOfxSecurityContainer.html#a3">00084</a> <span class="keywordtype">int</span>  <a class="code" href="classOfxSecurityContainer.html#a3">OfxSecurityContainer::gen_event</a>()
102
104
00099     }
103
105
00100 }
104
106
00101   
105
 
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 8 20:34:47 2004 for LibOFX by
 
107
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Jul 31 15:38:34 2005 for LibOFX by&nbsp;
106
108
<a href="http://www.doxygen.org/index.html">
107
 
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address>
 
109
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
108
110
</body>
109
111
</html>