File: classExiv2_1_1MemIo.html

package info (click to toggle)
exiv2 0.10-1.4
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 13,124 kB
  • ctags: 5,665
  • sloc: cpp: 20,697; xml: 15,118; sh: 10,526; ansic: 1,887; makefile: 367; awk: 64; python: 36
file content (668 lines) | stat: -rw-r--r-- 37,287 bytes parent folder | download | duplicates (2)
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
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Exiv2: Exiv2::MemIo Class Reference</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.4.6 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li id="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="examples.html"><span>Examples</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="namespaceExiv2.html">Exiv2</a>::<a class="el" href="classExiv2_1_1MemIo.html">MemIo</a></div>
<h1>Exiv2::MemIo Class Reference</h1><!-- doxytag: class="Exiv2::MemIo" --><!-- doxytag: inherits="Exiv2::BasicIo" -->Provides binary IO on blocks of memory by implementing the <a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> interface. A copy-on-write implementation ensures that the data passed in is only copied when necessary, i.e., as soon as data is written to the <a class="el" href="classExiv2_1_1MemIo.html">MemIo</a>. The original data is only used for reading. If writes are performed, the changed data can be retrieved using the read methods (since the data used in construction is never modified).  
<a href="#_details">More...</a>
<p>
<code>#include &lt;basicio.hpp&gt;</code>
<p>
Inheritance diagram for Exiv2::MemIo:<p><center><img src="classExiv2_1_1MemIo__inherit__graph.png" border="0" usemap="#Exiv2_1_1MemIo__inherit__map" alt="Inheritance graph"></center>
<map name="Exiv2_1_1MemIo__inherit__map">
<area href="classExiv2_1_1BasicIo.html" shape="rect" coords="5,7,112,31" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for Exiv2::MemIo:<p><center><img src="classExiv2_1_1MemIo__coll__graph.png" border="0" usemap="#Exiv2_1_1MemIo__coll__map" alt="Collaboration graph"></center>
<map name="Exiv2_1_1MemIo__coll__map">
<area href="classExiv2_1_1BasicIo.html" shape="rect" coords="5,7,112,31" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classExiv2_1_1MemIo-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Creators</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b2273b64e44e90f6cdbf785b132d9dc8"></a><!-- doxytag: member="Exiv2::MemIo::MemIo" ref="b2273b64e44e90f6cdbf785b132d9dc8" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#b2273b64e44e90f6cdbf785b132d9dc8">MemIo</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor that results in an empty object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#d65869d43163ab8d38484a1d36448f3d">MemIo</a> (const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *data, long size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor that accepts a block of memory. A copy-on-write algorithm allows read operations directly from the original data and will create a copy of the buffer on the first write operation.  <a href="#d65869d43163ab8d38484a1d36448f3d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e73e710bb84dac0cae62a7eea9f5fd19"></a><!-- doxytag: member="Exiv2::MemIo::~MemIo" ref="e73e710bb84dac0cae62a7eea9f5fd19" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#e73e710bb84dac0cae62a7eea9f5fd19">~MemIo</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. Releases all managed memory. <br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Manipulators</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#32f5d13aff64550f03dbc93692d27d16">open</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Memory IO is always open for reading and writing. This method therefore only resets the IO position to the start.  <a href="#32f5d13aff64550f03dbc93692d27d16"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#7c87d3a1b552a4a93fe38255b43d0fc5">close</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Does nothing on <a class="el" href="classExiv2_1_1MemIo.html">MemIo</a> objects.  <a href="#7c87d3a1b552a4a93fe38255b43d0fc5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#b34c91ef04dd9b8f5faf51d380aa55b9">write</a> (const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *data, long wcount)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write data to the memory block. If needed, the size of the internal memory block is expanded. The IO position is advanced by the number of bytes written.  <a href="#b34c91ef04dd9b8f5faf51d380aa55b9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#0d22943b9f0f0cc399bd7616dd7dd695">write</a> (<a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> &amp;src)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write data that is read from another <a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> instance to the memory block. If needed, the size of the internal memory block is expanded. The IO position is advanced by the number of bytes written.  <a href="#0d22943b9f0f0cc399bd7616dd7dd695"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#2737a46ff783d3e9c66c6f8ce255d913">putb</a> (<a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> data)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write one byte to the memory block. The IO position is advanced by one byte.  <a href="#2737a46ff783d3e9c66c6f8ce255d913"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#b5b0239fe9df1d515e581d318ccceb7c">read</a> (long rcount)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read data from the memory block. Reading starts at the current IO position and the position is advanced by the number of bytes read.  <a href="#b5b0239fe9df1d515e581d318ccceb7c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#3c4d85990cf914c9c5475466ba522289">read</a> (<a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *buf, long rcount)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read data from the memory block. Reading starts at the current IO position and the position is advanced by the number of bytes read.  <a href="#3c4d85990cf914c9c5475466ba522289"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#c3a53ab7bda3678eb813e505bad4e50a">getb</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read one byte from the memory block. The IO position is advanced by one byte.  <a href="#c3a53ab7bda3678eb813e505bad4e50a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#c0c261a78dfeb097eacb51d14552389c">transfer</a> (<a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> &amp;src)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear the memory block and then transfer data from the <em>src</em> <a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> object into a new block of memory.  <a href="#c0c261a78dfeb097eacb51d14552389c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#550d335e942b1f7d3a3d2c35bd4c443e">seek</a> (long offset, <a class="el" href="classExiv2_1_1BasicIo.html#1d23c3bf7618f2ee6ebb5cf033b10911">Position</a> pos)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the current IO position.  <a href="#550d335e942b1f7d3a3d2c35bd4c443e"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Accessors</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#832a61a8b49b570024068efb54d08955">tell</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current IO position.  <a href="#832a61a8b49b570024068efb54d08955"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#4cba82129b173367e5e987125d2a1635">size</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current memory buffer size in bytes.  <a href="#4cba82129b173367e5e987125d2a1635"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="33b1a521d7c714e9ddbb7c1e9313f2f2"></a><!-- doxytag: member="Exiv2::MemIo::isopen" ref="33b1a521d7c714e9ddbb7c1e9313f2f2" args="() const " -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#33b1a521d7c714e9ddbb7c1e9313f2f2">isopen</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Always returns true. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="957ea92ce091518012c30fc637d651c2"></a><!-- doxytag: member="Exiv2::MemIo::error" ref="957ea92ce091518012c30fc637d651c2" args="() const " -->
virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#957ea92ce091518012c30fc637d651c2">error</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Always returns 0. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5b3fce8483da0b1b27eaa0ed9611384b"></a><!-- doxytag: member="Exiv2::MemIo::eof" ref="5b3fce8483da0b1b27eaa0ed9611384b" args="() const " -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#5b3fce8483da0b1b27eaa0ed9611384b">eof</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if the IO position has reach the end, otherwise false. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bb384c4f87e0931a6f586163db31e60b"></a><!-- doxytag: member="Exiv2::MemIo::path" ref="bb384c4f87e0931a6f586163db31e60b" args="() const " -->
virtual std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#bb384c4f87e0931a6f586163db31e60b">path</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a dummy path, indicating that memory access is used. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classExiv2_1_1BasicIo.html#f8f989522925b884d8c9d3a257265fa1">BasicIo::AutoPtr</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#c3d6031a13b8a7eae6959178bb1301a0">temporary</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a temporary data storage location. Currently returns an empty <a class="el" href="classExiv2_1_1MemIo.html">MemIo</a> object, but callers should not rely on this behavior since it may change.  <a href="#c3d6031a13b8a7eae6959178bb1301a0"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Provides binary IO on blocks of memory by implementing the <a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> interface. A copy-on-write implementation ensures that the data passed in is only copied when necessary, i.e., as soon as data is written to the <a class="el" href="classExiv2_1_1MemIo.html">MemIo</a>. The original data is only used for reading. If writes are performed, the changed data can be retrieved using the read methods (since the data used in construction is never modified). 
<p>
<dl compact><dt><b>Note:</b></dt><dd>If read only usage of this class is common, it might be worth creating a specialized readonly class or changing this one to have a readonly mode. </dd></dl>

<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="d65869d43163ab8d38484a1d36448f3d"></a><!-- doxytag: member="Exiv2::MemIo::MemIo" ref="d65869d43163ab8d38484a1d36448f3d" args="(const byte *data, long size)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Exiv2::MemIo::MemIo           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>long&nbsp;</td>
          <td class="mdname" nowrap> <em>size</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor that accepts a block of memory. A copy-on-write algorithm allows read operations directly from the original data and will create a copy of the buffer on the first write operation. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>Pointer to data. Data must be at least <em>size</em> bytes long </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>Number of bytes to copy. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="7c87d3a1b552a4a93fe38255b43d0fc5"></a><!-- doxytag: member="Exiv2::MemIo::close" ref="7c87d3a1b552a4a93fe38255b43d0fc5" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int Exiv2::MemIo::close           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Does nothing on <a class="el" href="classExiv2_1_1MemIo.html">MemIo</a> objects. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>0 </dd></dl>

<p>
Implements <a class="el" href="classExiv2_1_1BasicIo.html#67ae3ca0f8aece92a7b7749dfb02edde">Exiv2::BasicIo</a>.    </td>
  </tr>
</table>
<a class="anchor" name="c3a53ab7bda3678eb813e505bad4e50a"></a><!-- doxytag: member="Exiv2::MemIo::getb" ref="c3a53ab7bda3678eb813e505bad4e50a" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int Exiv2::MemIo::getb           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read one byte from the memory block. The IO position is advanced by one byte. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The byte read from the memory block if successful;<br>
 EOF if failure; </dd></dl>

<p>
Implements <a class="el" href="classExiv2_1_1BasicIo.html#648bc0d9b1a79e34684375074d806534">Exiv2::BasicIo</a>.    </td>
  </tr>
</table>
<a class="anchor" name="32f5d13aff64550f03dbc93692d27d16"></a><!-- doxytag: member="Exiv2::MemIo::open" ref="32f5d13aff64550f03dbc93692d27d16" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int Exiv2::MemIo::open           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Memory IO is always open for reading and writing. This method therefore only resets the IO position to the start. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>0 </dd></dl>

<p>
Implements <a class="el" href="classExiv2_1_1BasicIo.html#1beff0dcdf03510bad13b6946379c5f2">Exiv2::BasicIo</a>.    </td>
  </tr>
</table>
<a class="anchor" name="2737a46ff783d3e9c66c6f8ce255d913"></a><!-- doxytag: member="Exiv2::MemIo::putb" ref="2737a46ff783d3e9c66c6f8ce255d913" args="(byte data)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int Exiv2::MemIo::putb           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>data</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Write one byte to the memory block. The IO position is advanced by one byte. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>The single byte to be written. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The value of the byte written if successful;<br>
 EOF if failure; </dd></dl>

<p>
Implements <a class="el" href="classExiv2_1_1BasicIo.html#d16a1fab0f122c8ca11b86d09b03b9a7">Exiv2::BasicIo</a>.    </td>
  </tr>
</table>
<a class="anchor" name="3c4d85990cf914c9c5475466ba522289"></a><!-- doxytag: member="Exiv2::MemIo::read" ref="3c4d85990cf914c9c5475466ba522289" args="(byte *buf, long rcount)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">long Exiv2::MemIo::read           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>long&nbsp;</td>
          <td class="mdname" nowrap> <em>rcount</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read data from the memory block. Reading starts at the current IO position and the position is advanced by the number of bytes read. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>Pointer to a block of memory into which the read data is stored. The memory block must be at least <em>rcount</em> bytes long. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>rcount</em>&nbsp;</td><td>Maximum number of bytes to read. Fewer bytes may be read if <em>rcount</em> bytes are not available. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Number of bytes read from the memory block successfully;<br>
 0 if failure; </dd></dl>

<p>
Implements <a class="el" href="classExiv2_1_1BasicIo.html#ec8cb20c86e72b87577370a28d66a0ca">Exiv2::BasicIo</a>.    </td>
  </tr>
</table>
<a class="anchor" name="b5b0239fe9df1d515e581d318ccceb7c"></a><!-- doxytag: member="Exiv2::MemIo::read" ref="b5b0239fe9df1d515e581d318ccceb7c" args="(long rcount)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> Exiv2::MemIo::read           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">long&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>rcount</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read data from the memory block. Reading starts at the current IO position and the position is advanced by the number of bytes read. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rcount</em>&nbsp;</td><td>Maximum number of bytes to read. Fewer bytes may be read if <em>rcount</em> bytes are not available. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> instance containing the bytes read. Use the <a class="el" href="classExiv2_1_1DataBuf.html#5e6028d5cdae2e149749667cf66c3e91">DataBuf::size_</a> member to find the number of bytes read. <a class="el" href="classExiv2_1_1DataBuf.html#5e6028d5cdae2e149749667cf66c3e91">DataBuf::size_</a> will be 0 on failure. </dd></dl>

<p>
Implements <a class="el" href="classExiv2_1_1BasicIo.html#8c9e6c7377b642afbb2c14a0e3896917">Exiv2::BasicIo</a>.    </td>
  </tr>
</table>
<a class="anchor" name="550d335e942b1f7d3a3d2c35bd4c443e"></a><!-- doxytag: member="Exiv2::MemIo::seek" ref="550d335e942b1f7d3a3d2c35bd4c443e" args="(long offset, Position pos)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int Exiv2::MemIo::seek           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">long&nbsp;</td>
          <td class="mdname" nowrap> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="classExiv2_1_1BasicIo.html#1d23c3bf7618f2ee6ebb5cf033b10911">Position</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>pos</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Move the current IO position. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>Number of bytes to move the IO position relative to the starting position specified by <em>pos</em> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>Position from which the seek should start </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>0 if successful;<br>
 Nonzero if failure; </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="4cba82129b173367e5e987125d2a1635"></a><!-- doxytag: member="Exiv2::MemIo::size" ref="4cba82129b173367e5e987125d2a1635" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">long Exiv2::MemIo::size           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the current memory buffer size in bytes. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>Size of the in memory data in bytes;<br>
 -1 if failure; </dd></dl>

<p>
Implements <a class="el" href="classExiv2_1_1BasicIo.html#01903a1a2310197eb7e3fd41bedc3054">Exiv2::BasicIo</a>.    </td>
  </tr>
</table>
<a class="anchor" name="832a61a8b49b570024068efb54d08955"></a><!-- doxytag: member="Exiv2::MemIo::tell" ref="832a61a8b49b570024068efb54d08955" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">long Exiv2::MemIo::tell           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the current IO position. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>Offset from the start of the memory block </dd></dl>

<p>
Implements <a class="el" href="classExiv2_1_1BasicIo.html#eb9673a48a7af7376b7018998fb552e6">Exiv2::BasicIo</a>.    </td>
  </tr>
</table>
<a class="anchor" name="c3d6031a13b8a7eae6959178bb1301a0"></a><!-- doxytag: member="Exiv2::MemIo::temporary" ref="c3d6031a13b8a7eae6959178bb1301a0" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classExiv2_1_1BasicIo.html#f8f989522925b884d8c9d3a257265fa1">BasicIo::AutoPtr</a> Exiv2::MemIo::temporary           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a temporary data storage location. Currently returns an empty <a class="el" href="classExiv2_1_1MemIo.html">MemIo</a> object, but callers should not rely on this behavior since it may change. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>An instance of <a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> </dd></dl>

<p>
Implements <a class="el" href="classExiv2_1_1BasicIo.html#ec9dd2dd223ce57650462c74a0770502">Exiv2::BasicIo</a>.    </td>
  </tr>
</table>
<a class="anchor" name="c0c261a78dfeb097eacb51d14552389c"></a><!-- doxytag: member="Exiv2::MemIo::transfer" ref="c0c261a78dfeb097eacb51d14552389c" args="(BasicIo &amp;src)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void Exiv2::MemIo::transfer           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>src</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Clear the memory block and then transfer data from the <em>src</em> <a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> object into a new block of memory. 
<p>
This method is optimized to simply swap memory block if the source object is another <a class="el" href="classExiv2_1_1MemIo.html">MemIo</a> instance. The source <a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> instance is invalidated by this operation and should not be used after this method returns. This method exists primarily to be used with the <a class="el" href="classExiv2_1_1BasicIo.html#ec9dd2dd223ce57650462c74a0770502">BasicIo::temporary()</a> method.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>Reference to another <a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> instance. The entire contents of src are transferred to this object. The <em>src</em> object is invalidated by the method. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classExiv2_1_1Error.html">Error</a></em>&nbsp;</td><td>In case of failure </td></tr>
  </table>
</dl>

<p>
Implements <a class="el" href="classExiv2_1_1BasicIo.html#cb964ff603c96da8711baddb66a385a4">Exiv2::BasicIo</a>.    </td>
  </tr>
</table>
<a class="anchor" name="0d22943b9f0f0cc399bd7616dd7dd695"></a><!-- doxytag: member="Exiv2::MemIo::write" ref="0d22943b9f0f0cc399bd7616dd7dd695" args="(BasicIo &amp;src)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">long Exiv2::MemIo::write           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>src</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Write data that is read from another <a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> instance to the memory block. If needed, the size of the internal memory block is expanded. The IO position is advanced by the number of bytes written. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>Reference to another <a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> instance. Reading start at the source's current IO position </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Number of bytes written to the memory block successfully;<br>
 0 if failure; </dd></dl>

<p>
Implements <a class="el" href="classExiv2_1_1BasicIo.html#31334606e230bbe94d6b8768d3c6d75f">Exiv2::BasicIo</a>.    </td>
  </tr>
</table>
<a class="anchor" name="b34c91ef04dd9b8f5faf51d380aa55b9"></a><!-- doxytag: member="Exiv2::MemIo::write" ref="b34c91ef04dd9b8f5faf51d380aa55b9" args="(const byte *data, long wcount)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">long Exiv2::MemIo::write           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>long&nbsp;</td>
          <td class="mdname" nowrap> <em>wcount</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Write data to the memory block. If needed, the size of the internal memory block is expanded. The IO position is advanced by the number of bytes written. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>Pointer to data. Data must be at least <em>wcount</em> bytes long </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>wcount</em>&nbsp;</td><td>Number of bytes to be written. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Number of bytes written to the memory block successfully;<br>
 0 if failure; </dd></dl>

<p>
Implements <a class="el" href="classExiv2_1_1BasicIo.html#c548d52ef633ac425bd01d17ccd2e7e4">Exiv2::BasicIo</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="basicio_8hpp.html">basicio.hpp</a><li>basicio.cpp</ul>
<hr size="1"><address style="align: right;"><small>Generated on Fri Jun 2 23:54:47 2006 for Exiv2 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>