aboutsummaryrefslogtreecommitdiff
path: root/doc/oscl_html/oscl__bin__stream_8h_source.html
blob: 2772993ebd1ffbb4f321182fb5b358cdb303fda3 (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
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<!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"/>
<title>oscl: oscl_bin_stream.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<h1>oscl_bin_stream.h</h1><a href="oscl__bin__stream_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- c++ -*-</span>
<a name="l00002"></a>00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
<a name="l00003"></a>00003 
<a name="l00004"></a>00004 <span class="comment">//                 O S C L _ B I N _ S T R E A M</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
<a name="l00007"></a>00007 
<a name="l00021"></a>00021 <span class="comment">/*</span>
<a name="l00022"></a>00022 <span class="comment">**   File:   oscl_bin_stream.h</span>
<a name="l00023"></a>00023 <span class="comment">**</span>
<a name="l00024"></a>00024 <span class="comment">**   Description:</span>
<a name="l00025"></a>00025 <span class="comment">**       This module defines a set of binary stream classes to provide portability of code accross</span>
<a name="l00026"></a>00026 <span class="comment">**       different platforms and compilers. Output and input stream classes are defined both for</span>
<a name="l00027"></a>00027 <span class="comment">**       little endian and big endian byte orders. These classes should be used when sharing</span>
<a name="l00028"></a>00028 <span class="comment">**       information across platforms (e.g. sending messages) instead of C structures. The classes</span>
<a name="l00029"></a>00029 <span class="comment">**       will read/write in the correct byte order regardless of the platform you are running on.</span>
<a name="l00030"></a>00030 <span class="comment">**       The classes are:</span>
<a name="l00031"></a>00031 <span class="comment">**           OsclBinIStreamBigEndian - Input stream for big endian byte order.</span>
<a name="l00032"></a>00032 <span class="comment">**           OsclBinIStreamLittleEndian - Input stream for little endian byte order.</span>
<a name="l00033"></a>00033 <span class="comment">**           OsclBinOStreamBigEndian - Output stream for big endian byte order.</span>
<a name="l00034"></a>00034 <span class="comment">**           OsclBinIStreamLittleEndian - Input stream for little endian byte order.</span>
<a name="l00035"></a>00035 <span class="comment">**</span>
<a name="l00036"></a>00036 <span class="comment">**      The preprocessor defined constants BYTE_ORDER_BIG_ENDIAN, BYTE_ORDER_LITTLE_ENDIAN are defined</span>
<a name="l00037"></a>00037 <span class="comment">**      in oscl_base.h and tell this module the byte order used by the native platform. This is used</span>
<a name="l00038"></a>00038 <span class="comment">**      to decide if we can do a straight copy or we need to manipulate the field one byte at a time.</span>
<a name="l00039"></a>00039 <span class="comment">**      The preprocessor defined constant INTEGERS_BYTE_ALIGNED tells us if the platform supports</span>
<a name="l00040"></a>00040 <span class="comment">**      accessing integers at any address.</span>
<a name="l00041"></a>00041 <span class="comment">*/</span>
<a name="l00042"></a>00042 <span class="preprocessor">#ifndef OSCL_BIN_STREAM_H_INCLUDED</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_BIN_STREAM_H_INCLUDED</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span>
<a name="l00045"></a>00045 <span class="comment">/*</span>
<a name="l00046"></a>00046 <span class="comment">** Includes</span>
<a name="l00047"></a>00047 <span class="comment">*/</span>
<a name="l00048"></a>00048 <span class="preprocessor">#ifndef OSCL_BASE_H_INCLUDED</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="oscl__base_8h.html" title="The file oscl_base.h is the public header that should be included to pick up the...">oscl_base.h</a>&quot;</span>
<a name="l00050"></a>00050 <span class="preprocessor">#endif</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span>
<a name="l00052"></a>00052 
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 <span class="comment">/*</span>
<a name="l00055"></a>00055 <span class="comment">** Classes</span>
<a name="l00056"></a>00056 <span class="comment">*/</span>
<a name="l00057"></a>00057 
<a name="l00058"></a><a class="code" href="classOsclBinStream.html">00058</a> <span class="keyword">class </span><a class="code" href="classOsclBinStream.html">OsclBinStream</a>
<a name="l00059"></a>00059 {
<a name="l00060"></a>00060     <span class="keyword">public</span>:
<a name="l00061"></a><a class="code" href="classOsclBinStream.html#ac4ee3c9ac494bae8189b665eb98d109a">00061</a>         <a class="code" href="classOsclBinStream.html#ac4ee3c9ac494bae8189b665eb98d109a">OsclBinStream</a>()
<a name="l00062"></a>00062                 : <a class="code" href="classOsclBinStream.html#ad579a7a482dc5d3434e9941be1f25d4e">state</a>(<a class="code" href="classOsclBinStream.html#afff79e0cd8c2a2383cfd87d51fa2b11ea72d4dfc6990d60f1a8e37276ab0bbe54">GOOD_STATE</a>),
<a name="l00063"></a>00063                 <a class="code" href="classOsclBinStream.html#a5d2e42f2e0554b5a68f8ef9ceb754778">pBasePosition</a>(0),
<a name="l00064"></a>00064                 <a class="code" href="classOsclBinStream.html#a3ea5bed4848bdb69e84919b64d3cf6dd">pPosition</a>(0)
<a name="l00065"></a>00065         {
<a name="l00066"></a>00066         }
<a name="l00067"></a>00067 
<a name="l00069"></a>00069 
<a name="l00072"></a>00072         <span class="keywordtype">bool</span> <a class="code" href="classOsclBinStream.html#ab8a231f78cb30cc0ba22ba7a312f15dc" title="This method determines if the stream is ok.">good</a>();
<a name="l00073"></a>00073 
<a name="l00075"></a>00075 
<a name="l00078"></a>00078         <span class="keywordtype">bool</span> <a class="code" href="classOsclBinStream.html#af4c6b2676736ef7fe2b2abd3c9ce11cc" title="This method determines if end of stream has been reached.">eof</a>();
<a name="l00079"></a>00079 
<a name="l00081"></a>00081 
<a name="l00084"></a>00084         <span class="keywordtype">bool</span> <a class="code" href="classOsclBinStream.html#a9c20f9d9016d9ad3ed0fb08050ed2f6e" title="This method determines if an error has occured in the stream.">fail</a>();
<a name="l00085"></a>00085 
<a name="l00086"></a>00086 
<a name="l00088"></a>00088 
<a name="l00092"></a>00092         <span class="keywordtype">void</span> <a class="code" href="classOsclBinStream.html#ab1bc205aa9166213e8cfe9520a72e5e9" title="This methods specifies the data buffer to attach to the stream.">Attach</a>(<span class="keywordtype">void</span> * buffer, uint32 l_length);
<a name="l00093"></a>00093 
<a name="l00095"></a>00095 
<a name="l00100"></a>00100         <span class="keywordtype">void</span> <a class="code" href="classOsclBinStream.html#ab1bc205aa9166213e8cfe9520a72e5e9" title="This methods specifies the data buffer to attach to the stream.">Attach</a>(<span class="keyword">const</span> uint32 numFragments, <span class="keyword">const</span> <a class="code" href="structOsclMemoryFragment.html">OsclMemoryFragment</a> * fragPtr);
<a name="l00101"></a>00101 
<a name="l00102"></a>00102 
<a name="l00104"></a>00104 
<a name="l00108"></a>00108         uint32 <a class="code" href="classOsclBinStream.html#ab2047709b0fd82b572c7f76f5b37938b" title="This method returns the current stream position.">tellg</a>();
<a name="l00109"></a>00109 
<a name="l00111"></a>00111 
<a name="l00114"></a>00114         <span class="keywordtype">void</span> <a class="code" href="classOsclBinStream.html#a6c1fc8ad0270041431beaad2f105f084" title="This method seeks to the specified stream position.">Seek</a>(uint32 absPosition);
<a name="l00115"></a>00115 
<a name="l00117"></a>00117 
<a name="l00120"></a>00120         uint32 <a class="code" href="classOsclBinStream.html#a94fa65db270d94ad62e70ac754ac027d" title="This method returns the current stream position.">PositionInBlock</a>();
<a name="l00121"></a>00121 
<a name="l00122"></a>00122 
<a name="l00124"></a>00124 
<a name="l00127"></a>00127         <span class="keywordtype">void</span> <a class="code" href="classOsclBinStream.html#a661f4d2e64894a8631b80efcdc0bf49e" title="This method seeks to the specified offset from the current location.">seekFromCurrentPosition</a>(int32 offset);
<a name="l00128"></a>00128 
<a name="l00129"></a>00129 
<a name="l00130"></a>00130 
<a name="l00131"></a>00131     <span class="keyword">protected</span>:
<a name="l00132"></a>00132 
<a name="l00133"></a>00133         <span class="comment">/*</span>
<a name="l00134"></a>00134 <span class="comment">        ** Description:</span>
<a name="l00135"></a>00135 <span class="comment">        **      Reserves space for storing/reading. If no space is available it sets the stream state</span>
<a name="l00136"></a>00136 <span class="comment">        **      to fail and returns false. If the end of the stream has been reached, it sets the state</span>
<a name="l00137"></a>00137 <span class="comment">        **      to end of stream.</span>
<a name="l00138"></a>00138 <span class="comment">        **</span>
<a name="l00139"></a>00139 <span class="comment">        ** Returns: true if space was successfully reserved.</span>
<a name="l00140"></a>00140 <span class="comment">        ** Side effects: None.</span>
<a name="l00141"></a>00141 <span class="comment">        */</span>
<a name="l00142"></a>00142         <span class="keywordtype">bool</span> <a class="code" href="classOsclBinStream.html#a8d91c12278e661c28ba57b84f99d093f">ReserveSpace</a>(uint32 size);
<a name="l00143"></a>00143 
<a name="l00144"></a>00144         <span class="keywordtype">bool</span> <a class="code" href="classOsclBinStream.html#a5900b0f207db2c2ed27fd7021098b231">HaveRoomInCurrentBlock</a>(uint32 size);
<a name="l00145"></a>00145 
<a name="l00146"></a><a class="code" href="classOsclBinStream.html#afff79e0cd8c2a2383cfd87d51fa2b11e">00146</a>         <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00147"></a>00147         {
<a name="l00148"></a><a class="code" href="classOsclBinStream.html#afff79e0cd8c2a2383cfd87d51fa2b11ea72d4dfc6990d60f1a8e37276ab0bbe54">00148</a>             <a class="code" href="classOsclBinStream.html#afff79e0cd8c2a2383cfd87d51fa2b11ea72d4dfc6990d60f1a8e37276ab0bbe54">GOOD_STATE</a>,
<a name="l00149"></a><a class="code" href="classOsclBinStream.html#afff79e0cd8c2a2383cfd87d51fa2b11eaf1ebf0dac858cbce268268d5d6df766b">00149</a>             <a class="code" href="classOsclBinStream.html#afff79e0cd8c2a2383cfd87d51fa2b11eaf1ebf0dac858cbce268268d5d6df766b">EOF_STATE</a>,
<a name="l00150"></a><a class="code" href="classOsclBinStream.html#afff79e0cd8c2a2383cfd87d51fa2b11ea8ffabb777fc3fd0a36b69f8dfb4a6070">00150</a>             <a class="code" href="classOsclBinStream.html#afff79e0cd8c2a2383cfd87d51fa2b11ea8ffabb777fc3fd0a36b69f8dfb4a6070">FAIL_STATE</a>
<a name="l00151"></a>00151         } <a class="code" href="classOsclBinStream.html#afff79e0cd8c2a2383cfd87d51fa2b11e">state_t</a>;
<a name="l00152"></a>00152 
<a name="l00153"></a><a class="code" href="classOsclBinStream.html#ad579a7a482dc5d3434e9941be1f25d4e">00153</a>         <a class="code" href="classOsclBinStream.html#afff79e0cd8c2a2383cfd87d51fa2b11e">state_t</a> <a class="code" href="classOsclBinStream.html#ad579a7a482dc5d3434e9941be1f25d4e">state</a>;
<a name="l00154"></a>00154 
<a name="l00155"></a>00155         <span class="comment">/* Position of the beginning of the data buffer */</span>
<a name="l00156"></a><a class="code" href="classOsclBinStream.html#a5d2e42f2e0554b5a68f8ef9ceb754778">00156</a>         uint8 * <a class="code" href="classOsclBinStream.html#a5d2e42f2e0554b5a68f8ef9ceb754778">pBasePosition</a>;
<a name="l00157"></a>00157 
<a name="l00158"></a>00158         <span class="comment">/* Current data buffer position */</span>
<a name="l00159"></a><a class="code" href="classOsclBinStream.html#a3ea5bed4848bdb69e84919b64d3cf6dd">00159</a>         uint8 * <a class="code" href="classOsclBinStream.html#a3ea5bed4848bdb69e84919b64d3cf6dd">pPosition</a>;
<a name="l00160"></a>00160 
<a name="l00161"></a>00161         <span class="comment">/* length of data buffer */</span>
<a name="l00162"></a><a class="code" href="classOsclBinStream.html#ab900fe9af50fba5dd938b4f29dfcec1f">00162</a>         uint32            <a class="code" href="classOsclBinStream.html#ab900fe9af50fba5dd938b4f29dfcec1f">length</a>;
<a name="l00163"></a>00163 
<a name="l00164"></a><a class="code" href="classOsclBinStream.html#a13eb2efcc4d2ef4528cdc7ad0610a783">00164</a>         <span class="keyword">const</span> <a class="code" href="structOsclMemoryFragment.html">OsclMemoryFragment</a> *  <a class="code" href="classOsclBinStream.html#a13eb2efcc4d2ef4528cdc7ad0610a783">nextFragPtr</a>;
<a name="l00165"></a><a class="code" href="classOsclBinStream.html#a922b262906ba43921e1662e97e7f0b7e">00165</a>         <span class="keywordtype">int</span>               <a class="code" href="classOsclBinStream.html#a922b262906ba43921e1662e97e7f0b7e">fragsLeft</a>;
<a name="l00166"></a>00166 
<a name="l00167"></a><a class="code" href="classOsclBinStream.html#a1f591680408243d4522e7bfd0ad71e51">00167</a>         <span class="keyword">const</span> <a class="code" href="structOsclMemoryFragment.html">OsclMemoryFragment</a> *  <a class="code" href="classOsclBinStream.html#a1f591680408243d4522e7bfd0ad71e51">firstFragPtr</a>;
<a name="l00168"></a><a class="code" href="classOsclBinStream.html#a35bbcd13ec357ddf03bd66ca9094cd5d">00168</a>         <span class="keywordtype">int</span>               <a class="code" href="classOsclBinStream.html#a35bbcd13ec357ddf03bd66ca9094cd5d">numFrags</a>;
<a name="l00169"></a><a class="code" href="classOsclBinStream.html#a9aee90c00aeebfb8820a153759108221">00169</a>         <a class="code" href="structOsclMemoryFragment.html">OsclMemoryFragment</a>   <a class="code" href="classOsclBinStream.html#a9aee90c00aeebfb8820a153759108221">specialFragBuffer</a>;
<a name="l00170"></a>00170 
<a name="l00171"></a>00171 };
<a name="l00172"></a>00172 
<a name="l00173"></a>00173 <span class="comment">/*</span>
<a name="l00174"></a>00174 <span class="comment">** Class OsclBinIStream</span>
<a name="l00175"></a>00175 <span class="comment">**      This class implements the basic stream functions for an input stream.</span>
<a name="l00176"></a>00176 <span class="comment">*/</span>
<a name="l00177"></a><a class="code" href="classOsclBinIStream.html">00177</a> <span class="keyword">class </span><a class="code" href="classOsclBinIStream.html">OsclBinIStream</a> : <span class="keyword">public</span> <a class="code" href="classOsclBinStream.html">OsclBinStream</a>
<a name="l00178"></a>00178 {
<a name="l00179"></a>00179     <span class="keyword">private</span>:
<a name="l00180"></a>00180     <span class="keyword">public</span>:
<a name="l00181"></a>00181         <span class="comment">/*</span>
<a name="l00182"></a>00182 <span class="comment">        ** Description:</span>
<a name="l00183"></a>00183 <span class="comment">        **      Constructor.</span>
<a name="l00184"></a>00184 <span class="comment">        **</span>
<a name="l00185"></a>00185 <span class="comment">        ** Returns: None.</span>
<a name="l00186"></a>00186 <span class="comment">        ** Side effects: None.</span>
<a name="l00187"></a>00187 <span class="comment">        */</span>
<a name="l00188"></a><a class="code" href="classOsclBinIStream.html#a6635e10a9e9044698840930a9893847f">00188</a>         <a class="code" href="classOsclBinIStream.html#a6635e10a9e9044698840930a9893847f">OsclBinIStream</a>()
<a name="l00189"></a>00189         {
<a name="l00190"></a>00190         }
<a name="l00191"></a>00191 
<a name="l00192"></a>00192         <span class="comment">/*</span>
<a name="l00193"></a>00193 <span class="comment">        ** Description:</span>
<a name="l00194"></a>00194 <span class="comment">        **      Destructor.</span>
<a name="l00195"></a>00195 <span class="comment">        **</span>
<a name="l00196"></a>00196 <span class="comment">        ** Returns: None.</span>
<a name="l00197"></a>00197 <span class="comment">        ** Side effects: None.</span>
<a name="l00198"></a>00198 <span class="comment">        */</span>
<a name="l00199"></a><a class="code" href="classOsclBinIStream.html#a9886c576630091cd9d15acdfee19e04e">00199</a>         <a class="code" href="classOsclBinIStream.html#a9886c576630091cd9d15acdfee19e04e">~OsclBinIStream</a>()
<a name="l00200"></a>00200         {
<a name="l00201"></a>00201         }
<a name="l00202"></a>00202 
<a name="l00204"></a>00204 
<a name="l00207"></a>00207         uint8 <a class="code" href="classOsclBinIStream.html#aa8726b4e5e383096d8ae39f0077840ee" title="This method reads an unsigned short from the stream.">Read_uint8</a>();
<a name="l00208"></a>00208 
<a name="l00210"></a>00210 
<a name="l00214"></a>00214         <a class="code" href="classOsclBinIStream.html">OsclBinIStream</a> &amp; <span class="keyword">get</span>(
<a name="l00215"></a>00215             int8 * data,
<a name="l00216"></a>00216             int32 size
<a name="l00217"></a>00217         );
<a name="l00218"></a>00218 
<a name="l00219"></a>00219     <span class="keyword">protected</span>:
<a name="l00220"></a>00220 
<a name="l00221"></a>00221 
<a name="l00222"></a>00222 };
<a name="l00223"></a>00223 
<a name="l00224"></a>00224 <span class="comment">/*</span>
<a name="l00225"></a>00225 <span class="comment">** Class OsclBinIStreamLittleEndian</span>
<a name="l00226"></a>00226 <span class="comment">**      This class implements a binary input stream using little endian byte ordering</span>
<a name="l00227"></a>00227 <span class="comment">*/</span>
<a name="l00228"></a><a class="code" href="classOsclBinIStreamLittleEndian.html">00228</a> <span class="keyword">class </span><a class="code" href="classOsclBinIStreamLittleEndian.html">OsclBinIStreamLittleEndian</a> : <span class="keyword">public</span> <a class="code" href="classOsclBinIStream.html">OsclBinIStream</a>
<a name="l00229"></a>00229 {
<a name="l00230"></a>00230     <span class="keyword">public</span>:
<a name="l00231"></a><a class="code" href="classOsclBinIStreamLittleEndian.html#a3464208ce7254b9ea81148d0490a9676">00231</a>         <a class="code" href="classOsclBinIStreamLittleEndian.html#a3464208ce7254b9ea81148d0490a9676">OsclBinIStreamLittleEndian</a>()
<a name="l00232"></a>00232         {
<a name="l00233"></a>00233         }
<a name="l00234"></a>00234 
<a name="l00236"></a>00236         <a class="code" href="classOsclBinIStreamLittleEndian.html">OsclBinIStreamLittleEndian</a> &amp; <a class="code" href="classOsclBinIStreamLittleEndian.html#acfeacadaec42b38d4f16b1fd9aada67d" title="This method reads a int8 from the stream and stores it in &amp;#39;data&amp;#39;.">operator&gt;&gt;</a>(int8 &amp; data);
<a name="l00237"></a>00237 
<a name="l00239"></a>00239         <a class="code" href="classOsclBinIStreamLittleEndian.html">OsclBinIStreamLittleEndian</a> &amp; <a class="code" href="classOsclBinIStreamLittleEndian.html#acfeacadaec42b38d4f16b1fd9aada67d" title="This method reads a int8 from the stream and stores it in &amp;#39;data&amp;#39;.">operator&gt;&gt;</a>(uint8 &amp; data);
<a name="l00240"></a>00240 
<a name="l00242"></a>00242         <a class="code" href="classOsclBinIStreamLittleEndian.html">OsclBinIStreamLittleEndian</a> &amp; <a class="code" href="classOsclBinIStreamLittleEndian.html#acfeacadaec42b38d4f16b1fd9aada67d" title="This method reads a int8 from the stream and stores it in &amp;#39;data&amp;#39;.">operator&gt;&gt;</a>(int16 &amp; data);
<a name="l00243"></a>00243 
<a name="l00245"></a>00245         <a class="code" href="classOsclBinIStreamLittleEndian.html">OsclBinIStreamLittleEndian</a> &amp; <a class="code" href="classOsclBinIStreamLittleEndian.html#acfeacadaec42b38d4f16b1fd9aada67d" title="This method reads a int8 from the stream and stores it in &amp;#39;data&amp;#39;.">operator&gt;&gt;</a>(uint16 &amp; data);
<a name="l00246"></a>00246 
<a name="l00248"></a>00248         <a class="code" href="classOsclBinIStreamLittleEndian.html">OsclBinIStreamLittleEndian</a> &amp; <a class="code" href="classOsclBinIStreamLittleEndian.html#acfeacadaec42b38d4f16b1fd9aada67d" title="This method reads a int8 from the stream and stores it in &amp;#39;data&amp;#39;.">operator&gt;&gt;</a>(int32 &amp; data);
<a name="l00249"></a>00249 
<a name="l00251"></a>00251         <a class="code" href="classOsclBinIStreamLittleEndian.html">OsclBinIStreamLittleEndian</a> &amp; <a class="code" href="classOsclBinIStreamLittleEndian.html#acfeacadaec42b38d4f16b1fd9aada67d" title="This method reads a int8 from the stream and stores it in &amp;#39;data&amp;#39;.">operator&gt;&gt;</a>(uint32 &amp; data);
<a name="l00252"></a>00252 
<a name="l00253"></a>00253     <span class="keyword">protected</span>:
<a name="l00254"></a>00254 
<a name="l00255"></a>00255         <span class="comment">/*</span>
<a name="l00256"></a>00256 <span class="comment">        ** Description:</span>
<a name="l00257"></a>00257 <span class="comment">        **      Reads an unsigned short from the stream.</span>
<a name="l00258"></a>00258 <span class="comment">        **</span>
<a name="l00259"></a>00259 <span class="comment">        ** Returns: Unsigned short read from the stream.</span>
<a name="l00260"></a>00260 <span class="comment">        ** Side effects: None.</span>
<a name="l00261"></a>00261 <span class="comment">        */</span>
<a name="l00262"></a>00262         uint16 <a class="code" href="classOsclBinIStreamLittleEndian.html#ad0ea8eba37477c8b8126f3752736bd7e">Read_uint16</a>();
<a name="l00263"></a>00263         <span class="comment">/*</span>
<a name="l00264"></a>00264 <span class="comment">        ** Description:</span>
<a name="l00265"></a>00265 <span class="comment">        **      Reads an unsigned long from the stream.</span>
<a name="l00266"></a>00266 <span class="comment">        **</span>
<a name="l00267"></a>00267 <span class="comment">        ** Returns: Unsigned long read from the stream.</span>
<a name="l00268"></a>00268 <span class="comment">        ** Side effects: None.</span>
<a name="l00269"></a>00269 <span class="comment">        */</span>
<a name="l00270"></a>00270         uint32 <a class="code" href="classOsclBinIStreamLittleEndian.html#a12523dc06d35a40ca30b6f5df245c40a">Read_uint32</a>();
<a name="l00271"></a>00271 };
<a name="l00272"></a>00272 
<a name="l00273"></a>00273 
<a name="l00274"></a>00274 <span class="comment">/*</span>
<a name="l00275"></a>00275 <span class="comment">** Class OsclBinIStreamBigEndian</span>
<a name="l00276"></a>00276 <span class="comment">**      This class implements a binary input stream using big endian byte ordering</span>
<a name="l00277"></a>00277 <span class="comment">*/</span>
<a name="l00278"></a><a class="code" href="classOsclBinIStreamBigEndian.html">00278</a> <span class="keyword">class </span><a class="code" href="classOsclBinIStreamBigEndian.html">OsclBinIStreamBigEndian</a> : <span class="keyword">public</span> <a class="code" href="classOsclBinIStream.html">OsclBinIStream</a>
<a name="l00279"></a>00279 {
<a name="l00280"></a>00280     <span class="keyword">public</span>:
<a name="l00281"></a><a class="code" href="classOsclBinIStreamBigEndian.html#a72f4227cf350322dc57710e492788805">00281</a>         <a class="code" href="classOsclBinIStreamBigEndian.html#a72f4227cf350322dc57710e492788805">OsclBinIStreamBigEndian</a>()
<a name="l00282"></a>00282         {
<a name="l00283"></a>00283         }
<a name="l00284"></a>00284 
<a name="l00285"></a>00285         <span class="keywordtype">void</span> <a class="code" href="classOsclBinIStreamBigEndian.html#afa0df6e802d31f7eaf4528c995cc16db">Read</a>(int8 &amp; data);
<a name="l00286"></a>00286 
<a name="l00287"></a>00287         <span class="keywordtype">void</span> <a class="code" href="classOsclBinIStreamBigEndian.html#afa0df6e802d31f7eaf4528c995cc16db">Read</a>(uint8 &amp; data);
<a name="l00288"></a>00288 
<a name="l00289"></a>00289         <span class="keywordtype">void</span> <a class="code" href="classOsclBinIStreamBigEndian.html#afa0df6e802d31f7eaf4528c995cc16db">Read</a>(int16 &amp; data);
<a name="l00290"></a>00290 
<a name="l00291"></a>00291         <span class="keywordtype">void</span> <a class="code" href="classOsclBinIStreamBigEndian.html#afa0df6e802d31f7eaf4528c995cc16db">Read</a>(uint16 &amp; data);
<a name="l00292"></a>00292 
<a name="l00293"></a>00293         <span class="keywordtype">void</span> <a class="code" href="classOsclBinIStreamBigEndian.html#afa0df6e802d31f7eaf4528c995cc16db">Read</a>(int32 &amp; data);
<a name="l00294"></a>00294 
<a name="l00295"></a>00295         <span class="keywordtype">void</span> <a class="code" href="classOsclBinIStreamBigEndian.html#afa0df6e802d31f7eaf4528c995cc16db">Read</a>(uint32 &amp; data);
<a name="l00296"></a>00296 
<a name="l00298"></a>00298         <a class="code" href="classOsclBinIStreamBigEndian.html">OsclBinIStreamBigEndian</a> &amp; <a class="code" href="classOsclBinIStreamBigEndian.html#a316dae94cb1bde2504dbb00e08f67b35" title="This method reads a int8 from the stream and stores it in &amp;#39;data&amp;#39;.">operator&gt;&gt;</a>(int8 &amp; data);
<a name="l00299"></a>00299 
<a name="l00301"></a>00301         <a class="code" href="classOsclBinIStream.html">OsclBinIStream</a> &amp; <a class="code" href="classOsclBinIStreamBigEndian.html#a316dae94cb1bde2504dbb00e08f67b35" title="This method reads a int8 from the stream and stores it in &amp;#39;data&amp;#39;.">operator&gt;&gt;</a>(uint8 &amp; data);
<a name="l00302"></a>00302 
<a name="l00304"></a>00304         <a class="code" href="classOsclBinIStreamBigEndian.html">OsclBinIStreamBigEndian</a> &amp; <a class="code" href="classOsclBinIStreamBigEndian.html#a316dae94cb1bde2504dbb00e08f67b35" title="This method reads a int8 from the stream and stores it in &amp;#39;data&amp;#39;.">operator&gt;&gt;</a>(int16 &amp; data);
<a name="l00305"></a>00305 
<a name="l00307"></a>00307         <a class="code" href="classOsclBinIStreamBigEndian.html">OsclBinIStreamBigEndian</a> &amp; <a class="code" href="classOsclBinIStreamBigEndian.html#a316dae94cb1bde2504dbb00e08f67b35" title="This method reads a int8 from the stream and stores it in &amp;#39;data&amp;#39;.">operator&gt;&gt;</a>(uint16 &amp; data);
<a name="l00308"></a>00308 
<a name="l00310"></a>00310         <a class="code" href="classOsclBinIStreamBigEndian.html">OsclBinIStreamBigEndian</a> &amp; <a class="code" href="classOsclBinIStreamBigEndian.html#a316dae94cb1bde2504dbb00e08f67b35" title="This method reads a int8 from the stream and stores it in &amp;#39;data&amp;#39;.">operator&gt;&gt;</a>(int32 &amp; data);
<a name="l00311"></a>00311 
<a name="l00313"></a>00313         <a class="code" href="classOsclBinIStreamBigEndian.html">OsclBinIStreamBigEndian</a> &amp; <a class="code" href="classOsclBinIStreamBigEndian.html#a316dae94cb1bde2504dbb00e08f67b35" title="This method reads a int8 from the stream and stores it in &amp;#39;data&amp;#39;.">operator&gt;&gt;</a>(uint32 &amp; data);
<a name="l00314"></a>00314 
<a name="l00316"></a>00316 
<a name="l00319"></a>00319         uint16 <a class="code" href="classOsclBinIStreamBigEndian.html#ae44724f451821ef56a87f3b5747b8a41" title="This method reads an unsigned short from the stream.">Read_uint16</a>();
<a name="l00320"></a>00320 
<a name="l00322"></a>00322 
<a name="l00325"></a>00325         uint32 <a class="code" href="classOsclBinIStreamBigEndian.html#ac8a4f940e8d48eb7dd14fcfb1e85bb0f" title="This method reads an unsigned long from the stream.">Read_uint32</a>();
<a name="l00326"></a>00326     <span class="keyword">protected</span>:
<a name="l00327"></a>00327 
<a name="l00328"></a>00328 };
<a name="l00329"></a>00329 
<a name="l00330"></a>00330 
<a name="l00332"></a><a class="code" href="classOsclBinOStream.html">00332</a> <span class="keyword">class </span><a class="code" href="classOsclBinOStream.html" title="Class OsclBinOStream implements the basic stream functions for an output stream.">OsclBinOStream</a> : <span class="keyword">public</span> <a class="code" href="classOsclBinStream.html">OsclBinStream</a>
<a name="l00333"></a>00333 {
<a name="l00334"></a>00334     <span class="keyword">public</span>:
<a name="l00335"></a><a class="code" href="classOsclBinOStream.html#a1a3286c3aa80971193e32bbb54eb7986">00335</a>         <a class="code" href="classOsclBinOStream.html#a1a3286c3aa80971193e32bbb54eb7986">OsclBinOStream</a>()
<a name="l00336"></a>00336         {
<a name="l00337"></a>00337         }
<a name="l00338"></a>00338 
<a name="l00339"></a><a class="code" href="classOsclBinOStream.html#a0a325a04776c212f7f95c06e085f44a0">00339</a>         <span class="keyword">virtual</span> <a class="code" href="classOsclBinOStream.html#a0a325a04776c212f7f95c06e085f44a0">~OsclBinOStream</a>()
<a name="l00340"></a>00340         {
<a name="l00341"></a>00341         }
<a name="l00342"></a>00342 
<a name="l00344"></a>00344         <a class="code" href="classOsclBinOStream.html" title="Class OsclBinOStream implements the basic stream functions for an output stream.">OsclBinOStream</a> &amp; <a class="code" href="classOsclBinOStream.html#ac7be329c5c3ee127f3f1a2106d484156" title="This method writes &amp;#39;length&amp;#39; number of bytes stored in &amp;#39;data&amp;#39; to the...">write</a>(
<a name="l00345"></a>00345             <span class="keyword">const</span> int8 * data,      <span class="comment">/* data to store */</span>
<a name="l00346"></a>00346             int32 size      <span class="comment">/* length of data to store */</span>
<a name="l00347"></a>00347         );
<a name="l00348"></a>00348 
<a name="l00349"></a>00349     <span class="keyword">protected</span>:
<a name="l00350"></a>00350 };
<a name="l00351"></a>00351 
<a name="l00353"></a><a class="code" href="classOsclBinOStreamLittleEndian.html">00353</a> <span class="keyword">class </span><a class="code" href="classOsclBinOStreamLittleEndian.html" title="Class OsclBinOStreamLittleEndian implements a binary output stream using little endian...">OsclBinOStreamLittleEndian</a> : <span class="keyword">public</span> <a class="code" href="classOsclBinOStream.html" title="Class OsclBinOStream implements the basic stream functions for an output stream.">OsclBinOStream</a>
<a name="l00354"></a>00354 {
<a name="l00355"></a>00355     <span class="keyword">public</span>:
<a name="l00356"></a><a class="code" href="classOsclBinOStreamLittleEndian.html#aca24fb76058a036e13e2c71c622df22b">00356</a>         <a class="code" href="classOsclBinOStreamLittleEndian.html#aca24fb76058a036e13e2c71c622df22b">OsclBinOStreamLittleEndian</a>()
<a name="l00357"></a>00357         {
<a name="l00358"></a>00358         }
<a name="l00359"></a>00359 
<a name="l00361"></a>00361         <a class="code" href="classOsclBinOStreamLittleEndian.html" title="Class OsclBinOStreamLittleEndian implements a binary output stream using little endian...">OsclBinOStreamLittleEndian</a> &amp; <a class="code" href="classOsclBinOStreamLittleEndian.html#a492d415b0b74eb7abb6e7adcfa106dfe" title="This method writes a int8 from &amp;#39;data&amp;#39; to the stream.">operator&lt;&lt;</a>(<span class="keyword">const</span> int8 &amp; data);
<a name="l00362"></a>00362 
<a name="l00364"></a>00364         <a class="code" href="classOsclBinOStreamLittleEndian.html" title="Class OsclBinOStreamLittleEndian implements a binary output stream using little endian...">OsclBinOStreamLittleEndian</a> &amp; <a class="code" href="classOsclBinOStreamLittleEndian.html#a492d415b0b74eb7abb6e7adcfa106dfe" title="This method writes a int8 from &amp;#39;data&amp;#39; to the stream.">operator&lt;&lt;</a>(<span class="keyword">const</span> uint8 &amp; data);
<a name="l00365"></a>00365 
<a name="l00367"></a>00367         <a class="code" href="classOsclBinOStreamLittleEndian.html" title="Class OsclBinOStreamLittleEndian implements a binary output stream using little endian...">OsclBinOStreamLittleEndian</a> &amp; <a class="code" href="classOsclBinOStreamLittleEndian.html#a492d415b0b74eb7abb6e7adcfa106dfe" title="This method writes a int8 from &amp;#39;data&amp;#39; to the stream.">operator&lt;&lt;</a>(<span class="keyword">const</span> int16 &amp; data);
<a name="l00368"></a>00368 
<a name="l00370"></a>00370         <a class="code" href="classOsclBinOStreamLittleEndian.html" title="Class OsclBinOStreamLittleEndian implements a binary output stream using little endian...">OsclBinOStreamLittleEndian</a> &amp; <a class="code" href="classOsclBinOStreamLittleEndian.html#a492d415b0b74eb7abb6e7adcfa106dfe" title="This method writes a int8 from &amp;#39;data&amp;#39; to the stream.">operator&lt;&lt;</a>(<span class="keyword">const</span> uint16 &amp; data);
<a name="l00371"></a>00371 
<a name="l00373"></a>00373         <a class="code" href="classOsclBinOStreamLittleEndian.html" title="Class OsclBinOStreamLittleEndian implements a binary output stream using little endian...">OsclBinOStreamLittleEndian</a> &amp; <a class="code" href="classOsclBinOStreamLittleEndian.html#a492d415b0b74eb7abb6e7adcfa106dfe" title="This method writes a int8 from &amp;#39;data&amp;#39; to the stream.">operator&lt;&lt;</a>(<span class="keyword">const</span> int32 &amp; data);
<a name="l00374"></a>00374 
<a name="l00376"></a>00376         <a class="code" href="classOsclBinOStreamLittleEndian.html" title="Class OsclBinOStreamLittleEndian implements a binary output stream using little endian...">OsclBinOStreamLittleEndian</a> &amp; <a class="code" href="classOsclBinOStreamLittleEndian.html#a492d415b0b74eb7abb6e7adcfa106dfe" title="This method writes a int8 from &amp;#39;data&amp;#39; to the stream.">operator&lt;&lt;</a>(<span class="keyword">const</span> uint32 &amp; data);
<a name="l00377"></a>00377 
<a name="l00378"></a>00378     <span class="keyword">protected</span>:
<a name="l00379"></a>00379 
<a name="l00381"></a>00381         <span class="keywordtype">void</span> <a class="code" href="classOsclBinOStreamLittleEndian.html#a93ca6275531dff7be4bf7cd94d14f9e9" title="This method writes &amp;#39;data&amp;#39; (unsigned short) to the stream.">WriteUnsignedShort</a>(<span class="keyword">const</span> uint16 data);
<a name="l00382"></a>00382 
<a name="l00384"></a>00384         <span class="keywordtype">void</span> <a class="code" href="classOsclBinOStreamLittleEndian.html#ace0355d710a49f195e11cf247426c1b0" title="This method writes &amp;#39;data&amp;#39; (unsigned long) to the stream.">WriteUnsignedLong</a>(<span class="keyword">const</span> uint32 data);
<a name="l00385"></a>00385 
<a name="l00386"></a>00386 };
<a name="l00387"></a>00387 
<a name="l00388"></a>00388 
<a name="l00390"></a><a class="code" href="classOsclBinOStreamBigEndian.html">00390</a> <span class="keyword">class </span><a class="code" href="classOsclBinOStreamBigEndian.html" title="Class OsclBinOStreamBigEndian implements a binary output stream using big endian...">OsclBinOStreamBigEndian</a> : <span class="keyword">public</span> <a class="code" href="classOsclBinOStream.html" title="Class OsclBinOStream implements the basic stream functions for an output stream.">OsclBinOStream</a>
<a name="l00391"></a>00391 {
<a name="l00392"></a>00392     <span class="keyword">public</span>:
<a name="l00393"></a><a class="code" href="classOsclBinOStreamBigEndian.html#ab747eb0d07249ce4c0005c8f9113571b">00393</a>         <a class="code" href="classOsclBinOStreamBigEndian.html#ab747eb0d07249ce4c0005c8f9113571b">OsclBinOStreamBigEndian</a>()
<a name="l00394"></a>00394         {
<a name="l00395"></a>00395         }
<a name="l00396"></a>00396 
<a name="l00398"></a>00398         <a class="code" href="classOsclBinOStreamBigEndian.html" title="Class OsclBinOStreamBigEndian implements a binary output stream using big endian...">OsclBinOStreamBigEndian</a> &amp; <a class="code" href="classOsclBinOStreamBigEndian.html#aa49dc65f51ad12c190958ae5e6ed2480" title="This method writes a int8 from &amp;#39;data&amp;#39; to the stream.">operator&lt;&lt;</a>(<span class="keyword">const</span> int8 &amp; data);
<a name="l00399"></a>00399 
<a name="l00401"></a>00401         <a class="code" href="classOsclBinOStreamBigEndian.html" title="Class OsclBinOStreamBigEndian implements a binary output stream using big endian...">OsclBinOStreamBigEndian</a> &amp; <a class="code" href="classOsclBinOStreamBigEndian.html#aa49dc65f51ad12c190958ae5e6ed2480" title="This method writes a int8 from &amp;#39;data&amp;#39; to the stream.">operator&lt;&lt;</a>(<span class="keyword">const</span> uint8 &amp; data);
<a name="l00402"></a>00402 
<a name="l00404"></a>00404         <a class="code" href="classOsclBinOStreamBigEndian.html" title="Class OsclBinOStreamBigEndian implements a binary output stream using big endian...">OsclBinOStreamBigEndian</a> &amp; <a class="code" href="classOsclBinOStreamBigEndian.html#aa49dc65f51ad12c190958ae5e6ed2480" title="This method writes a int8 from &amp;#39;data&amp;#39; to the stream.">operator&lt;&lt;</a>(<span class="keyword">const</span> int16 &amp; data);
<a name="l00405"></a>00405 
<a name="l00407"></a>00407         <a class="code" href="classOsclBinOStreamBigEndian.html" title="Class OsclBinOStreamBigEndian implements a binary output stream using big endian...">OsclBinOStreamBigEndian</a> &amp; <a class="code" href="classOsclBinOStreamBigEndian.html#aa49dc65f51ad12c190958ae5e6ed2480" title="This method writes a int8 from &amp;#39;data&amp;#39; to the stream.">operator&lt;&lt;</a>(<span class="keyword">const</span> uint16 &amp; data);
<a name="l00408"></a>00408 
<a name="l00410"></a>00410         <a class="code" href="classOsclBinOStreamBigEndian.html" title="Class OsclBinOStreamBigEndian implements a binary output stream using big endian...">OsclBinOStreamBigEndian</a> &amp; <a class="code" href="classOsclBinOStreamBigEndian.html#aa49dc65f51ad12c190958ae5e6ed2480" title="This method writes a int8 from &amp;#39;data&amp;#39; to the stream.">operator&lt;&lt;</a>(<span class="keyword">const</span> int32 &amp; data);
<a name="l00411"></a>00411 
<a name="l00413"></a>00413         <a class="code" href="classOsclBinOStreamBigEndian.html" title="Class OsclBinOStreamBigEndian implements a binary output stream using big endian...">OsclBinOStreamBigEndian</a> &amp; <a class="code" href="classOsclBinOStreamBigEndian.html#aa49dc65f51ad12c190958ae5e6ed2480" title="This method writes a int8 from &amp;#39;data&amp;#39; to the stream.">operator&lt;&lt;</a>(<span class="keyword">const</span> uint32 &amp; data);
<a name="l00414"></a>00414 
<a name="l00415"></a>00415     <span class="keyword">protected</span>:
<a name="l00416"></a>00416 
<a name="l00417"></a>00417         <span class="comment">/*</span>
<a name="l00418"></a>00418 <span class="comment">        ** Description:</span>
<a name="l00419"></a>00419 <span class="comment">        **      Writes &#39;data&#39; (unsigned short) to the stream.</span>
<a name="l00420"></a>00420 <span class="comment">        **</span>
<a name="l00421"></a>00421 <span class="comment">        ** Returns: None.</span>
<a name="l00422"></a>00422 <span class="comment">        ** Side effects: None.</span>
<a name="l00423"></a>00423 <span class="comment">        */</span>
<a name="l00424"></a>00424         <span class="keywordtype">void</span> <a class="code" href="classOsclBinOStreamBigEndian.html#a7e1da8a71f7e1fa260eb1e4983b967ae">WriteUnsignedShort</a>(<span class="keyword">const</span> uint16 data);
<a name="l00425"></a>00425 
<a name="l00426"></a>00426         <span class="comment">/*</span>
<a name="l00427"></a>00427 <span class="comment">        ** Description:</span>
<a name="l00428"></a>00428 <span class="comment">        **      Writes &#39;data&#39; (unsigned long) to the stream.</span>
<a name="l00429"></a>00429 <span class="comment">        **</span>
<a name="l00430"></a>00430 <span class="comment">        ** Returns: None.</span>
<a name="l00431"></a>00431 <span class="comment">        ** Side effects: None.</span>
<a name="l00432"></a>00432 <span class="comment">        */</span>
<a name="l00433"></a>00433         <span class="keywordtype">void</span> <a class="code" href="classOsclBinOStreamBigEndian.html#a4e986dbdbfe527c69f60d6a196a582ec">WriteUnsignedLong</a>(<span class="keyword">const</span> uint32 data);
<a name="l00434"></a>00434 };
<a name="l00435"></a>00435 
<a name="l00436"></a>00436 <span class="preprocessor">#if (!OSCL_DISABLE_INLINES)</span>
<a name="l00437"></a>00437 <span class="preprocessor"></span><span class="preprocessor">#include &quot;oscl_bin_stream.inl&quot;</span>
<a name="l00438"></a>00438 <span class="preprocessor">#endif</span>
<a name="l00439"></a>00439 <span class="preprocessor"></span>
<a name="l00440"></a>00440 <span class="preprocessor">#endif</span>
<a name="l00441"></a>00441 <span class="preprocessor"></span>
</pre></div></div>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: CORE_9.002.1.1 </small>
</small></address>
</body>
</html>