summaryrefslogtreecommitdiffstats
path: root/ue4/doxygen/cdatset_8h-source.html
blob: ee161cf25f30622badc4bf04c12aeae9d0c1a7d0 (plain)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>mycpu: mycpu/cdatset.h Source File</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="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="annotated.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
  </ul>
</div>
<h1>mycpu/cdatset.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef CDATSET_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define CDATSET_H 1</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include "cdat.h"</span>
<a name="l00013"></a>00013 
<a name="l00019"></a><a class="code" href="classCDatSet.html">00019</a> <span class="keyword">class </span><a class="code" href="classCDatSet.html">CDatSet</a>
<a name="l00020"></a>00020   : <span class="keyword">public</span> <a class="code" href="classCDat.html">CDat</a>&lt;int&gt;, <span class="keyword">public</span> boost::operators&lt;CDatSet&gt;
<a name="l00021"></a>00021 {
<a name="l00022"></a>00022   <span class="keyword">public</span>:
<a name="l00033"></a><a class="code" href="classCDatSet.html#d354b5990871cf1b9d26aa724e72fd17">00033</a>     <a class="code" href="classCDatSet.html#d354b5990871cf1b9d26aa724e72fd17" title="Default ctor.">CDatSet</a>()
<a name="l00034"></a>00034     {}
<a name="l00035"></a>00035 
<a name="l00046"></a><a class="code" href="classCDatSet.html#c1cf333206e167172d8e342ea486ac8c">00046</a>     <a class="code" href="classCDatSet.html#d354b5990871cf1b9d26aa724e72fd17" title="Default ctor.">CDatSet</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> newval)
<a name="l00047"></a>00047       : <a class="code" href="classCDat.html">CDat</a>&lt;int&gt;(newval)
<a name="l00048"></a>00048     {}
<a name="l00049"></a>00049 
<a name="l00061"></a><a class="code" href="classCDatSet.html#a292977146873e95e5774944386f69ba">00061</a>     <span class="keyword">friend</span> std::istream&amp; <a class="code" href="classCDatSet.html#a292977146873e95e5774944386f69ba" title="Shift/read operator for inputstream.">operator&gt;&gt;</a>(std::istream &amp; stream, <a class="code" href="classCDatSet.html">CDatSet</a>&amp; cdat)
<a name="l00062"></a>00062     {
<a name="l00063"></a>00063       <span class="keywordtype">unsigned</span> count = 0;
<a name="l00064"></a>00064       <span class="keywordflow">while</span>(stream.good() &amp;&amp; !stream.eof())
<a name="l00065"></a>00065       {
<a name="l00066"></a>00066         <span class="keywordtype">int</span> val = stream.get();
<a name="l00067"></a>00067         <span class="keywordflow">if</span> (val != <span class="charliteral">'o'</span>)
<a name="l00068"></a>00068           <span class="keywordflow">break</span>;
<a name="l00069"></a>00069         ++count;
<a name="l00070"></a>00070       }
<a name="l00071"></a>00071       stream.clear();
<a name="l00072"></a>00072       cdat.<a class="code" href="classCDat.html#1d94d662d16c73e78d103adc57dbb2db">m_value</a> = count;
<a name="l00073"></a>00073       <span class="keywordflow">return</span> stream;
<a name="l00074"></a>00074     }
<a name="l00075"></a>00075 };
<a name="l00076"></a>00076 
<a name="l00077"></a>00077 <span class="preprocessor">#endif</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span>
<a name="l00079"></a>00079 <span class="comment">/* vim: set et sw=2 ts=2: */</span>
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Sat May 30 16:32:35 2009 for mycpu by&nbsp;
<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>