30
40
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>
31
41
<map name="Exiv2_1_1MemIo__inherit__map">
32
<area href="classExiv2_1_1BasicIo.html" shape="rect" coords="5,7,112,31" alt="">
42
<area href="classExiv2_1_1BasicIo.html" shape="rect" coords="5,7,120,31" alt="">
34
44
<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>
35
45
<map name="Exiv2_1_1MemIo__coll__map">
36
<area href="classExiv2_1_1BasicIo.html" shape="rect" coords="5,7,112,31" alt="">
46
<area href="classExiv2_1_1BasicIo.html" shape="rect" coords="5,7,120,31" alt="">
38
48
<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">
40
50
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
41
<tr><td colspan="2"><div class="groupHeader">Creators</div></td></tr>
42
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b2273b64e44e90f6cdbf785b132d9dc8"></a><!-- doxytag: member="Exiv2::MemIo::MemIo" ref="b2273b64e44e90f6cdbf785b132d9dc8" args="()" -->
43
</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#b2273b64e44e90f6cdbf785b132d9dc8">MemIo</a> ()</td></tr>
45
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor that results in an empty object. <br></td></tr>
46
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </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>
48
<tr><td class="mdescLeft"> </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>
49
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e73e710bb84dac0cae62a7eea9f5fd19"></a><!-- doxytag: member="Exiv2::MemIo::~MemIo" ref="e73e710bb84dac0cae62a7eea9f5fd19" args="()" -->
50
</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#e73e710bb84dac0cae62a7eea9f5fd19">~MemIo</a> ()</td></tr>
52
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. Releases all managed memory. <br></td></tr>
53
51
<tr><td colspan="2"><div class="groupHeader">Manipulators</div></td></tr>
54
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#32f5d13aff64550f03dbc93692d27d16">open</a> ()</td></tr>
56
<tr><td class="mdescLeft"> </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>
57
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#7c87d3a1b552a4a93fe38255b43d0fc5">close</a> ()</td></tr>
59
<tr><td class="mdescLeft"> </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>
60
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long </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>
62
<tr><td class="mdescLeft"> </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>
63
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long </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> &src)</td></tr>
65
<tr><td class="mdescLeft"> </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>
66
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </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>
68
<tr><td class="mdescLeft"> </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>
69
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#b5b0239fe9df1d515e581d318ccceb7c">read</a> (long rcount)</td></tr>
71
<tr><td class="mdescLeft"> </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>
72
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long </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>
74
<tr><td class="mdescLeft"> </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>
75
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#c3a53ab7bda3678eb813e505bad4e50a">getb</a> ()</td></tr>
77
<tr><td class="mdescLeft"> </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>
78
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </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> &src)</td></tr>
80
<tr><td class="mdescLeft"> </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>
81
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </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>
83
<tr><td class="mdescLeft"> </td><td class="mdescRight">Move the current IO position. <a href="#550d335e942b1f7d3a3d2c35bd4c443e"></a><br></td></tr>
52
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#cbc7726037d2eb0dbbdef649f30ebc5c">open</a> ()</td></tr>
54
<tr><td class="mdescLeft"> </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="#cbc7726037d2eb0dbbdef649f30ebc5c"></a><br></td></tr>
55
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#f2263c6d49984da7ce38daed9f327b1e">close</a> ()</td></tr>
57
<tr><td class="mdescLeft"> </td><td class="mdescRight">Does nothing on <a class="el" href="classExiv2_1_1MemIo.html">MemIo</a> objects. <a href="#f2263c6d49984da7ce38daed9f327b1e"></a><br></td></tr>
58
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#79993ba49c24c36b30f444c218ce4579">write</a> (const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *data, long wcount)</td></tr>
60
<tr><td class="mdescLeft"> </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="#79993ba49c24c36b30f444c218ce4579"></a><br></td></tr>
61
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#84c854a02e45febea5c0dfc0192e4b6e">write</a> (<a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> &src)</td></tr>
63
<tr><td class="mdescLeft"> </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="#84c854a02e45febea5c0dfc0192e4b6e"></a><br></td></tr>
64
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#5999ba245f79d581c9c5a16982d736b6">putb</a> (<a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> data)</td></tr>
66
<tr><td class="mdescLeft"> </td><td class="mdescRight">Write one byte to the memory block. The IO position is advanced by one byte. <a href="#5999ba245f79d581c9c5a16982d736b6"></a><br></td></tr>
67
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#3d45d5be7b0e25c32d37d5055da0adc0">read</a> (long rcount)</td></tr>
69
<tr><td class="mdescLeft"> </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="#3d45d5be7b0e25c32d37d5055da0adc0"></a><br></td></tr>
70
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#7de679e4366d070dc6604db1d22275ce">read</a> (<a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *buf, long rcount)</td></tr>
72
<tr><td class="mdescLeft"> </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="#7de679e4366d070dc6604db1d22275ce"></a><br></td></tr>
73
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#b5d5467941f00e4bb47a411182955d44">getb</a> ()</td></tr>
75
<tr><td class="mdescLeft"> </td><td class="mdescRight">Read one byte from the memory block. The IO position is advanced by one byte. <a href="#b5d5467941f00e4bb47a411182955d44"></a><br></td></tr>
76
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#223908a596491d75cebbb7a6f9c1559f">transfer</a> (<a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> &src)</td></tr>
78
<tr><td class="mdescLeft"> </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="#223908a596491d75cebbb7a6f9c1559f"></a><br></td></tr>
79
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#b4a12d5b5ed6f8447c7167942c4aa4ae">seek</a> (long offset, <a class="el" href="classExiv2_1_1BasicIo.html#1d23c3bf7618f2ee6ebb5cf033b10911">Position</a> pos)</td></tr>
81
<tr><td class="mdescLeft"> </td><td class="mdescRight">Move the current IO position. <a href="#b4a12d5b5ed6f8447c7167942c4aa4ae"></a><br></td></tr>
82
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#b3e20f77251ba80e65cd6e6ac93efd76">mmap</a> ()</td></tr>
84
<tr><td class="mdescLeft"> </td><td class="mdescRight">Allow direct access to the underlying data buffer. The buffer is not protected against write access except for the const specifier. <a href="#b3e20f77251ba80e65cd6e6ac93efd76"></a><br></td></tr>
85
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e6ec394a0cabdb3ad63ddf5bf84a4254"></a><!-- doxytag: member="Exiv2::MemIo::munmap" ref="e6ec394a0cabdb3ad63ddf5bf84a4254" args="()" -->
86
virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#e6ec394a0cabdb3ad63ddf5bf84a4254">munmap</a> ()</td></tr>
88
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a mapping established with <a class="el" href="classExiv2_1_1MemIo.html#b3e20f77251ba80e65cd6e6ac93efd76">mmap()</a>. <br></td></tr>
84
89
<tr><td colspan="2"><div class="groupHeader">Accessors</div></td></tr>
85
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#832a61a8b49b570024068efb54d08955">tell</a> () const </td></tr>
87
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current IO position. <a href="#832a61a8b49b570024068efb54d08955"></a><br></td></tr>
88
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#4cba82129b173367e5e987125d2a1635">size</a> () const </td></tr>
90
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current memory buffer size in bytes. <a href="#4cba82129b173367e5e987125d2a1635"></a><br></td></tr>
91
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="33b1a521d7c714e9ddbb7c1e9313f2f2"></a><!-- doxytag: member="Exiv2::MemIo::isopen" ref="33b1a521d7c714e9ddbb7c1e9313f2f2" args="() const " -->
92
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#33b1a521d7c714e9ddbb7c1e9313f2f2">isopen</a> () const </td></tr>
90
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#b3a522e04b23cc17c2aadf126d4d222b">tell</a> () const</td></tr>
92
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current IO position. <a href="#b3a522e04b23cc17c2aadf126d4d222b"></a><br></td></tr>
93
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#b13e91650bd961bb7938290ffe100ec2">size</a> () const</td></tr>
95
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current memory buffer size in bytes. <a href="#b13e91650bd961bb7938290ffe100ec2"></a><br></td></tr>
96
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="86d5e1cee9820e21dad1fa204d69d590"></a><!-- doxytag: member="Exiv2::MemIo::isopen" ref="86d5e1cee9820e21dad1fa204d69d590" args="() const" -->
97
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#86d5e1cee9820e21dad1fa204d69d590">isopen</a> () const</td></tr>
94
99
<tr><td class="mdescLeft"> </td><td class="mdescRight">Always returns true. <br></td></tr>
95
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="957ea92ce091518012c30fc637d651c2"></a><!-- doxytag: member="Exiv2::MemIo::error" ref="957ea92ce091518012c30fc637d651c2" args="() const " -->
96
virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#957ea92ce091518012c30fc637d651c2">error</a> () const </td></tr>
100
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ee890e218f5a0733100c18bbe635166e"></a><!-- doxytag: member="Exiv2::MemIo::error" ref="ee890e218f5a0733100c18bbe635166e" args="() const" -->
101
virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#ee890e218f5a0733100c18bbe635166e">error</a> () const</td></tr>
98
103
<tr><td class="mdescLeft"> </td><td class="mdescRight">Always returns 0. <br></td></tr>
99
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5b3fce8483da0b1b27eaa0ed9611384b"></a><!-- doxytag: member="Exiv2::MemIo::eof" ref="5b3fce8483da0b1b27eaa0ed9611384b" args="() const " -->
100
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#5b3fce8483da0b1b27eaa0ed9611384b">eof</a> () const </td></tr>
104
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="60b88f009c60c330f3d368b6d9c0f5b3"></a><!-- doxytag: member="Exiv2::MemIo::eof" ref="60b88f009c60c330f3d368b6d9c0f5b3" args="() const" -->
105
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#60b88f009c60c330f3d368b6d9c0f5b3">eof</a> () const</td></tr>
102
107
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the IO position has reach the end, otherwise false. <br></td></tr>
103
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bb384c4f87e0931a6f586163db31e60b"></a><!-- doxytag: member="Exiv2::MemIo::path" ref="bb384c4f87e0931a6f586163db31e60b" args="() const " -->
104
virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#bb384c4f87e0931a6f586163db31e60b">path</a> () const </td></tr>
108
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="642a3f20a30ea07f66f10b817e4f8447"></a><!-- doxytag: member="Exiv2::MemIo::path" ref="642a3f20a30ea07f66f10b817e4f8447" args="() const" -->
109
virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#642a3f20a30ea07f66f10b817e4f8447">path</a> () const</td></tr>
106
111
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a dummy path, indicating that memory access is used. <br></td></tr>
107
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classExiv2_1_1BasicIo.html#f8f989522925b884d8c9d3a257265fa1">BasicIo::AutoPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#c3d6031a13b8a7eae6959178bb1301a0">temporary</a> () const </td></tr>
112
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classExiv2_1_1BasicIo.html#f8f989522925b884d8c9d3a257265fa1">BasicIo::AutoPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1MemIo.html#82a9fd278a45a7dd9f67a76d952ed1a8">temporary</a> () const</td></tr>
109
<tr><td class="mdescLeft"> </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>
114
<tr><td class="mdescLeft"> </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="#82a9fd278a45a7dd9f67a76d952ed1a8"></a><br></td></tr>
111
116
<hr><a name="_details"></a><h2>Detailed Description</h2>
112
117
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).
114
<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>
119
<dl class="note" 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>
117
122
<hr><h2>Constructor & Destructor Documentation</h2>
118
<a class="anchor" name="d65869d43163ab8d38484a1d36448f3d"></a><!-- doxytag: member="Exiv2::MemIo::MemIo" ref="d65869d43163ab8d38484a1d36448f3d" args="(const byte *data, long size)" --><p>
119
<table class="mdTable" cellpadding="2" cellspacing="0">
122
<table cellpadding="0" cellspacing="0" border="0">
124
<td class="md" nowrap valign="top">Exiv2::MemIo::MemIo </td>
125
<td class="md" valign="top">( </td>
126
<td class="md" nowrap valign="top">const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> * </td>
127
<td class="mdname" nowrap> <em>data</em>, </td>
130
<td class="md" nowrap align="right"></td>
132
<td class="md" nowrap>long </td>
133
<td class="mdname" nowrap> <em>size</em></td>
137
<td class="md">) </td>
138
<td class="md" colspan="2"></td>
144
<table cellspacing="5" cellpadding="0" border="0">
152
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.
154
<dl compact><dt><b>Parameters:</b></dt><dd>
155
<table border="0" cellspacing="2" cellpadding="0">
156
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>Pointer to data. Data must be at least <em>size</em> bytes long </td></tr>
157
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>Number of bytes to copy. </td></tr>
123
<a class="anchor" name="d65869d43163ab8d38484a1d36448f3d"></a><!-- doxytag: member="Exiv2::MemIo::MemIo" ref="d65869d43163ab8d38484a1d36448f3d" args="(const byte *data, long size)" -->
124
<div class="memitem">
125
<div class="memproto">
126
<table class="memname">
128
<td class="memname">Exiv2::MemIo::MemIo </td>
130
<td class="paramtype">const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> * </td>
131
<td class="paramname"> <em>data</em>, </td>
134
<td class="paramkey"></td>
136
<td class="paramtype">long </td>
137
<td class="paramname"> <em>size</em></td><td> </td>
142
<td></td><td></td><td width="100%"></td>
149
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.
151
<dl compact><dt><b>Parameters:</b></dt><dd>
152
<table border="0" cellspacing="2" cellpadding="0">
153
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>Pointer to data. Data must be at least <em>size</em> bytes long </td></tr>
154
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>Number of bytes to copy. </td></tr>
160
<a class="anchor" name="d65869d43163ab8d38484a1d36448f3d"></a><!-- doxytag: member="Exiv2::MemIo::MemIo" ref="d65869d43163ab8d38484a1d36448f3d" args="(const byte *data, long size)" -->
161
<div class="memitem">
162
<div class="memproto">
163
<table class="memname">
165
<td class="memname">Exiv2::MemIo::MemIo </td>
167
<td class="paramtype">const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> * </td>
168
<td class="paramname"> <em>data</em>, </td>
171
<td class="paramkey"></td>
173
<td class="paramtype">long </td>
174
<td class="paramname"> <em>size</em></td><td> </td>
179
<td></td><td></td><td width="100%"></td>
186
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.
188
<dl compact><dt><b>Parameters:</b></dt><dd>
189
<table border="0" cellspacing="2" cellpadding="0">
190
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>Pointer to data. Data must be at least <em>size</em> bytes long </td></tr>
191
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>Number of bytes to copy. </td></tr>
163
197
<hr><h2>Member Function Documentation</h2>
164
<a class="anchor" name="7c87d3a1b552a4a93fe38255b43d0fc5"></a><!-- doxytag: member="Exiv2::MemIo::close" ref="7c87d3a1b552a4a93fe38255b43d0fc5" args="()" --><p>
165
<table class="mdTable" cellpadding="2" cellspacing="0">
168
<table cellpadding="0" cellspacing="0" border="0">
170
<td class="md" nowrap valign="top">int Exiv2::MemIo::close </td>
171
<td class="md" valign="top">( </td>
172
<td class="mdname1" valign="top" nowrap> </td>
173
<td class="md" valign="top"> ) </td>
174
<td class="md" nowrap><code> [virtual]</code></td>
180
<table cellspacing="5" cellpadding="0" border="0">
198
<a class="anchor" name="cbc7726037d2eb0dbbdef649f30ebc5c"></a><!-- doxytag: member="Exiv2::MemIo::open" ref="cbc7726037d2eb0dbbdef649f30ebc5c" args="()" -->
199
<div class="memitem">
200
<div class="memproto">
201
<table class="memname">
203
<td class="memname">virtual int Exiv2::MemIo::open </td>
205
<td class="paramname"> </td>
206
<td> ) </td>
207
<td width="100%"><code> [virtual]</code></td>
214
Memory IO is always open for reading and writing. This method therefore only resets the IO position to the start.
216
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 </dd></dl>
219
Implements <a class="el" href="classExiv2_1_1BasicIo.html#1beff0dcdf03510bad13b6946379c5f2">Exiv2::BasicIo</a>.
222
<a class="anchor" name="f2263c6d49984da7ce38daed9f327b1e"></a><!-- doxytag: member="Exiv2::MemIo::close" ref="f2263c6d49984da7ce38daed9f327b1e" args="()" -->
223
<div class="memitem">
224
<div class="memproto">
225
<table class="memname">
227
<td class="memname">virtual int Exiv2::MemIo::close </td>
229
<td class="paramname"> </td>
230
<td> ) </td>
231
<td width="100%"><code> [virtual]</code></td>
188
238
Does nothing on <a class="el" href="classExiv2_1_1MemIo.html">MemIo</a> objects.
190
<dl compact><dt><b>Returns:</b></dt><dd>0 </dd></dl>
193
Implements <a class="el" href="classExiv2_1_1BasicIo.html#67ae3ca0f8aece92a7b7749dfb02edde">Exiv2::BasicIo</a>. </td>
196
<a class="anchor" name="c3a53ab7bda3678eb813e505bad4e50a"></a><!-- doxytag: member="Exiv2::MemIo::getb" ref="c3a53ab7bda3678eb813e505bad4e50a" args="()" --><p>
197
<table class="mdTable" cellpadding="2" cellspacing="0">
200
<table cellpadding="0" cellspacing="0" border="0">
202
<td class="md" nowrap valign="top">int Exiv2::MemIo::getb </td>
203
<td class="md" valign="top">( </td>
204
<td class="mdname1" valign="top" nowrap> </td>
205
<td class="md" valign="top"> ) </td>
206
<td class="md" nowrap><code> [virtual]</code></td>
212
<table cellspacing="5" cellpadding="0" border="0">
220
Read one byte from the memory block. The IO position is advanced by one byte.
222
<dl compact><dt><b>Returns:</b></dt><dd>The byte read from the memory block if successful;<br>
223
EOF if failure; </dd></dl>
226
Implements <a class="el" href="classExiv2_1_1BasicIo.html#648bc0d9b1a79e34684375074d806534">Exiv2::BasicIo</a>. </td>
229
<a class="anchor" name="32f5d13aff64550f03dbc93692d27d16"></a><!-- doxytag: member="Exiv2::MemIo::open" ref="32f5d13aff64550f03dbc93692d27d16" args="()" --><p>
230
<table class="mdTable" cellpadding="2" cellspacing="0">
233
<table cellpadding="0" cellspacing="0" border="0">
235
<td class="md" nowrap valign="top">int Exiv2::MemIo::open </td>
236
<td class="md" valign="top">( </td>
237
<td class="mdname1" valign="top" nowrap> </td>
238
<td class="md" valign="top"> ) </td>
239
<td class="md" nowrap><code> [virtual]</code></td>
245
<table cellspacing="5" cellpadding="0" border="0">
253
Memory IO is always open for reading and writing. This method therefore only resets the IO position to the start.
255
<dl compact><dt><b>Returns:</b></dt><dd>0 </dd></dl>
258
Implements <a class="el" href="classExiv2_1_1BasicIo.html#1beff0dcdf03510bad13b6946379c5f2">Exiv2::BasicIo</a>. </td>
261
<a class="anchor" name="2737a46ff783d3e9c66c6f8ce255d913"></a><!-- doxytag: member="Exiv2::MemIo::putb" ref="2737a46ff783d3e9c66c6f8ce255d913" args="(byte data)" --><p>
262
<table class="mdTable" cellpadding="2" cellspacing="0">
265
<table cellpadding="0" cellspacing="0" border="0">
267
<td class="md" nowrap valign="top">int Exiv2::MemIo::putb </td>
268
<td class="md" valign="top">( </td>
269
<td class="md" nowrap valign="top"><a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> </td>
270
<td class="mdname1" valign="top" nowrap> <em>data</em> </td>
271
<td class="md" valign="top"> ) </td>
272
<td class="md" nowrap><code> [virtual]</code></td>
278
<table cellspacing="5" cellpadding="0" border="0">
240
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 </dd></dl>
243
Implements <a class="el" href="classExiv2_1_1BasicIo.html#67ae3ca0f8aece92a7b7749dfb02edde">Exiv2::BasicIo</a>.
246
<a class="anchor" name="79993ba49c24c36b30f444c218ce4579"></a><!-- doxytag: member="Exiv2::MemIo::write" ref="79993ba49c24c36b30f444c218ce4579" args="(const byte *data, long wcount)" -->
247
<div class="memitem">
248
<div class="memproto">
249
<table class="memname">
251
<td class="memname">virtual long Exiv2::MemIo::write </td>
253
<td class="paramtype">const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> * </td>
254
<td class="paramname"> <em>data</em>, </td>
257
<td class="paramkey"></td>
259
<td class="paramtype">long </td>
260
<td class="paramname"> <em>wcount</em></td><td> </td>
265
<td></td><td></td><td width="100%"><code> [virtual]</code></td>
272
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.
274
<dl compact><dt><b>Parameters:</b></dt><dd>
275
<table border="0" cellspacing="2" cellpadding="0">
276
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>Pointer to data. Data must be at least <em>wcount</em> bytes long </td></tr>
277
<tr><td valign="top"></td><td valign="top"><em>wcount</em> </td><td>Number of bytes to be written. </td></tr>
280
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes written to the memory block successfully;<br>
281
0 if failure; </dd></dl>
284
Implements <a class="el" href="classExiv2_1_1BasicIo.html#c548d52ef633ac425bd01d17ccd2e7e4">Exiv2::BasicIo</a>.
287
<a class="anchor" name="84c854a02e45febea5c0dfc0192e4b6e"></a><!-- doxytag: member="Exiv2::MemIo::write" ref="84c854a02e45febea5c0dfc0192e4b6e" args="(BasicIo &src)" -->
288
<div class="memitem">
289
<div class="memproto">
290
<table class="memname">
292
<td class="memname">virtual long Exiv2::MemIo::write </td>
294
<td class="paramtype"><a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> & </td>
295
<td class="paramname"> <em>src</em> </td>
296
<td> ) </td>
297
<td width="100%"><code> [virtual]</code></td>
304
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.
306
<dl compact><dt><b>Parameters:</b></dt><dd>
307
<table border="0" cellspacing="2" cellpadding="0">
308
<tr><td valign="top"></td><td valign="top"><em>src</em> </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>
311
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes written to the memory block successfully;<br>
312
0 if failure; </dd></dl>
315
Implements <a class="el" href="classExiv2_1_1BasicIo.html#31334606e230bbe94d6b8768d3c6d75f">Exiv2::BasicIo</a>.
318
<a class="anchor" name="5999ba245f79d581c9c5a16982d736b6"></a><!-- doxytag: member="Exiv2::MemIo::putb" ref="5999ba245f79d581c9c5a16982d736b6" args="(byte data)" -->
319
<div class="memitem">
320
<div class="memproto">
321
<table class="memname">
323
<td class="memname">virtual int Exiv2::MemIo::putb </td>
325
<td class="paramtype"><a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> </td>
326
<td class="paramname"> <em>data</em> </td>
327
<td> ) </td>
328
<td width="100%"><code> [virtual]</code></td>
286
335
Write one byte to the memory block. The IO position is advanced by one byte.
339
410
<tr><td valign="top"></td><td valign="top"><em>rcount</em> </td><td>Maximum number of bytes to read. Fewer bytes may be read if <em>rcount</em> bytes are not available. </td></tr>
342
<dl compact><dt><b>Returns:</b></dt><dd>Number of bytes read from the memory block successfully;<br>
413
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes read from the memory block successfully;<br>
343
414
0 if failure; </dd></dl>
346
Implements <a class="el" href="classExiv2_1_1BasicIo.html#ec8cb20c86e72b87577370a28d66a0ca">Exiv2::BasicIo</a>. </td>
349
<a class="anchor" name="b5b0239fe9df1d515e581d318ccceb7c"></a><!-- doxytag: member="Exiv2::MemIo::read" ref="b5b0239fe9df1d515e581d318ccceb7c" args="(long rcount)" --><p>
350
<table class="mdTable" cellpadding="2" cellspacing="0">
353
<table cellpadding="0" cellspacing="0" border="0">
355
<td class="md" nowrap valign="top"><a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> Exiv2::MemIo::read </td>
356
<td class="md" valign="top">( </td>
357
<td class="md" nowrap valign="top">long </td>
358
<td class="mdname1" valign="top" nowrap> <em>rcount</em> </td>
359
<td class="md" valign="top"> ) </td>
360
<td class="md" nowrap><code> [virtual]</code></td>
366
<table cellspacing="5" cellpadding="0" border="0">
374
Read data from the memory block. Reading starts at the current IO position and the position is advanced by the number of bytes read.
417
Implements <a class="el" href="classExiv2_1_1BasicIo.html#ec8cb20c86e72b87577370a28d66a0ca">Exiv2::BasicIo</a>.
420
<a class="anchor" name="b5d5467941f00e4bb47a411182955d44"></a><!-- doxytag: member="Exiv2::MemIo::getb" ref="b5d5467941f00e4bb47a411182955d44" args="()" -->
421
<div class="memitem">
422
<div class="memproto">
423
<table class="memname">
425
<td class="memname">virtual int Exiv2::MemIo::getb </td>
427
<td class="paramname"> </td>
428
<td> ) </td>
429
<td width="100%"><code> [virtual]</code></td>
436
Read one byte from the memory block. The IO position is advanced by one byte.
438
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The byte read from the memory block if successful;<br>
439
EOF if failure; </dd></dl>
442
Implements <a class="el" href="classExiv2_1_1BasicIo.html#648bc0d9b1a79e34684375074d806534">Exiv2::BasicIo</a>.
445
<a class="anchor" name="223908a596491d75cebbb7a6f9c1559f"></a><!-- doxytag: member="Exiv2::MemIo::transfer" ref="223908a596491d75cebbb7a6f9c1559f" args="(BasicIo &src)" -->
446
<div class="memitem">
447
<div class="memproto">
448
<table class="memname">
450
<td class="memname">virtual void Exiv2::MemIo::transfer </td>
452
<td class="paramtype"><a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> & </td>
453
<td class="paramname"> <em>src</em> </td>
454
<td> ) </td>
455
<td width="100%"><code> [virtual]</code></td>
462
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.
464
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#2c962d72689c040a04c18f9317b12497">BasicIo::temporary()</a> method.<p>
376
465
<dl compact><dt><b>Parameters:</b></dt><dd>
377
466
<table border="0" cellspacing="2" cellpadding="0">
378
<tr><td valign="top"></td><td valign="top"><em>rcount</em> </td><td>Maximum number of bytes to read. Fewer bytes may be read if <em>rcount</em> bytes are not available. </td></tr>
381
<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>
467
<tr><td valign="top"></td><td valign="top"><em>src</em> </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>
470
<dl compact><dt><b>Exceptions:</b></dt><dd>
471
<table border="0" cellspacing="2" cellpadding="0">
472
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classExiv2_1_1Error.html">Error</a></em> </td><td>In case of failure </td></tr>
384
Implements <a class="el" href="classExiv2_1_1BasicIo.html#8c9e6c7377b642afbb2c14a0e3896917">Exiv2::BasicIo</a>. </td>
387
<a class="anchor" name="550d335e942b1f7d3a3d2c35bd4c443e"></a><!-- doxytag: member="Exiv2::MemIo::seek" ref="550d335e942b1f7d3a3d2c35bd4c443e" args="(long offset, Position pos)" --><p>
388
<table class="mdTable" cellpadding="2" cellspacing="0">
391
<table cellpadding="0" cellspacing="0" border="0">
393
<td class="md" nowrap valign="top">int Exiv2::MemIo::seek </td>
394
<td class="md" valign="top">( </td>
395
<td class="md" nowrap valign="top">long </td>
396
<td class="mdname" nowrap> <em>offset</em>, </td>
399
<td class="md" nowrap align="right"></td>
401
<td class="md" nowrap><a class="el" href="classExiv2_1_1BasicIo.html#1d23c3bf7618f2ee6ebb5cf033b10911">Position</a> </td>
402
<td class="mdname" nowrap> <em>pos</em></td>
406
<td class="md">) </td>
407
<td class="md" colspan="2"><code> [virtual]</code></td>
477
Implements <a class="el" href="classExiv2_1_1BasicIo.html#cb964ff603c96da8711baddb66a385a4">Exiv2::BasicIo</a>.
480
<a class="anchor" name="b4a12d5b5ed6f8447c7167942c4aa4ae"></a><!-- doxytag: member="Exiv2::MemIo::seek" ref="b4a12d5b5ed6f8447c7167942c4aa4ae" args="(long offset, Position pos)" -->
481
<div class="memitem">
482
<div class="memproto">
483
<table class="memname">
485
<td class="memname">virtual int Exiv2::MemIo::seek </td>
487
<td class="paramtype">long </td>
488
<td class="paramname"> <em>offset</em>, </td>
491
<td class="paramkey"></td>
493
<td class="paramtype"><a class="el" href="classExiv2_1_1BasicIo.html#1d23c3bf7618f2ee6ebb5cf033b10911">Position</a> </td>
494
<td class="paramname"> <em>pos</em></td><td> </td>
499
<td></td><td></td><td width="100%"><code> [virtual]</code></td>
413
<table cellspacing="5" cellpadding="0" border="0">
421
506
Move the current IO position.
426
511
<tr><td valign="top"></td><td valign="top"><em>pos</em> </td><td>Position from which the seek should start </td></tr>
429
<dl compact><dt><b>Returns:</b></dt><dd>0 if successful;<br>
514
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if successful;<br>
430
515
Nonzero if failure; </dd></dl>
434
<a class="anchor" name="4cba82129b173367e5e987125d2a1635"></a><!-- doxytag: member="Exiv2::MemIo::size" ref="4cba82129b173367e5e987125d2a1635" args="() const " --><p>
435
<table class="mdTable" cellpadding="2" cellspacing="0">
438
<table cellpadding="0" cellspacing="0" border="0">
440
<td class="md" nowrap valign="top">long Exiv2::MemIo::size </td>
441
<td class="md" valign="top">( </td>
442
<td class="mdname1" valign="top" nowrap> </td>
443
<td class="md" valign="top"> ) </td>
444
<td class="md" nowrap> const<code> [virtual]</code></td>
450
<table cellspacing="5" cellpadding="0" border="0">
518
Implements <a class="el" href="classExiv2_1_1BasicIo.html#561221bbe1d215b4d6b5ceceaa2e9a97">Exiv2::BasicIo</a>.
521
<a class="anchor" name="b3e20f77251ba80e65cd6e6ac93efd76"></a><!-- doxytag: member="Exiv2::MemIo::mmap" ref="b3e20f77251ba80e65cd6e6ac93efd76" args="()" -->
522
<div class="memitem">
523
<div class="memproto">
524
<table class="memname">
526
<td class="memname">virtual const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a>* Exiv2::MemIo::mmap </td>
528
<td class="paramname"> </td>
529
<td> ) </td>
530
<td width="100%"><code> [inline, virtual]</code></td>
537
Allow direct access to the underlying data buffer. The buffer is not protected against write access except for the const specifier.
539
<dl class="note" compact><dt><b>Note:</b></dt><dd>The application must ensure that the memory pointed to by the returned pointer remains valid and allocated as long as the <a class="el" href="classExiv2_1_1MemIo.html">MemIo</a> object is in scope. </dd></dl>
542
Implements <a class="el" href="classExiv2_1_1BasicIo.html#56dedc1898b73b376280fc9c9d656d9b">Exiv2::BasicIo</a>.
545
<a class="anchor" name="b3a522e04b23cc17c2aadf126d4d222b"></a><!-- doxytag: member="Exiv2::MemIo::tell" ref="b3a522e04b23cc17c2aadf126d4d222b" args="() const" -->
546
<div class="memitem">
547
<div class="memproto">
548
<table class="memname">
550
<td class="memname">virtual long Exiv2::MemIo::tell </td>
552
<td class="paramname"> </td>
553
<td> ) </td>
554
<td width="100%"> const<code> [virtual]</code></td>
561
Get the current IO position.
563
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Offset from the start of the memory block </dd></dl>
566
Implements <a class="el" href="classExiv2_1_1BasicIo.html#7b30c5ec54f00bc2420f1e5482f4b5e2">Exiv2::BasicIo</a>.
569
<a class="anchor" name="b13e91650bd961bb7938290ffe100ec2"></a><!-- doxytag: member="Exiv2::MemIo::size" ref="b13e91650bd961bb7938290ffe100ec2" args="() const" -->
570
<div class="memitem">
571
<div class="memproto">
572
<table class="memname">
574
<td class="memname">virtual long Exiv2::MemIo::size </td>
576
<td class="paramname"> </td>
577
<td> ) </td>
578
<td width="100%"> const<code> [virtual]</code></td>
458
585
Get the current memory buffer size in bytes.
460
<dl compact><dt><b>Returns:</b></dt><dd>Size of the in memory data in bytes;<br>
587
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Size of the in memory data in bytes;<br>
461
588
-1 if failure; </dd></dl>
464
Implements <a class="el" href="classExiv2_1_1BasicIo.html#01903a1a2310197eb7e3fd41bedc3054">Exiv2::BasicIo</a>. </td>
467
<a class="anchor" name="832a61a8b49b570024068efb54d08955"></a><!-- doxytag: member="Exiv2::MemIo::tell" ref="832a61a8b49b570024068efb54d08955" args="() const " --><p>
468
<table class="mdTable" cellpadding="2" cellspacing="0">
471
<table cellpadding="0" cellspacing="0" border="0">
473
<td class="md" nowrap valign="top">long Exiv2::MemIo::tell </td>
474
<td class="md" valign="top">( </td>
475
<td class="mdname1" valign="top" nowrap> </td>
476
<td class="md" valign="top"> ) </td>
477
<td class="md" nowrap> const<code> [virtual]</code></td>
483
<table cellspacing="5" cellpadding="0" border="0">
491
Get the current IO position.
493
<dl compact><dt><b>Returns:</b></dt><dd>Offset from the start of the memory block </dd></dl>
496
Implements <a class="el" href="classExiv2_1_1BasicIo.html#eb9673a48a7af7376b7018998fb552e6">Exiv2::BasicIo</a>. </td>
499
<a class="anchor" name="c3d6031a13b8a7eae6959178bb1301a0"></a><!-- doxytag: member="Exiv2::MemIo::temporary" ref="c3d6031a13b8a7eae6959178bb1301a0" args="() const " --><p>
500
<table class="mdTable" cellpadding="2" cellspacing="0">
503
<table cellpadding="0" cellspacing="0" border="0">
505
<td class="md" nowrap valign="top"><a class="el" href="classExiv2_1_1BasicIo.html#f8f989522925b884d8c9d3a257265fa1">BasicIo::AutoPtr</a> Exiv2::MemIo::temporary </td>
506
<td class="md" valign="top">( </td>
507
<td class="mdname1" valign="top" nowrap> </td>
508
<td class="md" valign="top"> ) </td>
509
<td class="md" nowrap> const<code> [virtual]</code></td>
515
<table cellspacing="5" cellpadding="0" border="0">
591
Implements <a class="el" href="classExiv2_1_1BasicIo.html#b30518eef26c1bbe29077ed804a39ee6">Exiv2::BasicIo</a>.
594
<a class="anchor" name="82a9fd278a45a7dd9f67a76d952ed1a8"></a><!-- doxytag: member="Exiv2::MemIo::temporary" ref="82a9fd278a45a7dd9f67a76d952ed1a8" args="() const" -->
595
<div class="memitem">
596
<div class="memproto">
597
<table class="memname">
599
<td class="memname">virtual <a class="el" href="classExiv2_1_1BasicIo.html#f8f989522925b884d8c9d3a257265fa1">BasicIo::AutoPtr</a> Exiv2::MemIo::temporary </td>
601
<td class="paramname"> </td>
602
<td> ) </td>
603
<td width="100%"> const<code> [virtual]</code></td>
523
610
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.
525
<dl compact><dt><b>Returns:</b></dt><dd>An instance of <a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> </dd></dl>
528
Implements <a class="el" href="classExiv2_1_1BasicIo.html#ec9dd2dd223ce57650462c74a0770502">Exiv2::BasicIo</a>. </td>
531
<a class="anchor" name="c0c261a78dfeb097eacb51d14552389c"></a><!-- doxytag: member="Exiv2::MemIo::transfer" ref="c0c261a78dfeb097eacb51d14552389c" args="(BasicIo &src)" --><p>
532
<table class="mdTable" cellpadding="2" cellspacing="0">
535
<table cellpadding="0" cellspacing="0" border="0">
537
<td class="md" nowrap valign="top">void Exiv2::MemIo::transfer </td>
538
<td class="md" valign="top">( </td>
539
<td class="md" nowrap valign="top"><a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> & </td>
540
<td class="mdname1" valign="top" nowrap> <em>src</em> </td>
541
<td class="md" valign="top"> ) </td>
542
<td class="md" nowrap><code> [virtual]</code></td>
548
<table cellspacing="5" cellpadding="0" border="0">
556
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.
558
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>
559
<dl compact><dt><b>Parameters:</b></dt><dd>
560
<table border="0" cellspacing="2" cellpadding="0">
561
<tr><td valign="top"></td><td valign="top"><em>src</em> </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>
564
<dl compact><dt><b>Exceptions:</b></dt><dd>
565
<table border="0" cellspacing="2" cellpadding="0">
566
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classExiv2_1_1Error.html">Error</a></em> </td><td>In case of failure </td></tr>
571
Implements <a class="el" href="classExiv2_1_1BasicIo.html#cb964ff603c96da8711baddb66a385a4">Exiv2::BasicIo</a>. </td>
574
<a class="anchor" name="0d22943b9f0f0cc399bd7616dd7dd695"></a><!-- doxytag: member="Exiv2::MemIo::write" ref="0d22943b9f0f0cc399bd7616dd7dd695" args="(BasicIo &src)" --><p>
575
<table class="mdTable" cellpadding="2" cellspacing="0">
578
<table cellpadding="0" cellspacing="0" border="0">
580
<td class="md" nowrap valign="top">long Exiv2::MemIo::write </td>
581
<td class="md" valign="top">( </td>
582
<td class="md" nowrap valign="top"><a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> & </td>
583
<td class="mdname1" valign="top" nowrap> <em>src</em> </td>
584
<td class="md" valign="top"> ) </td>
585
<td class="md" nowrap><code> [virtual]</code></td>
591
<table cellspacing="5" cellpadding="0" border="0">
599
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.
601
<dl compact><dt><b>Parameters:</b></dt><dd>
602
<table border="0" cellspacing="2" cellpadding="0">
603
<tr><td valign="top"></td><td valign="top"><em>src</em> </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>
606
<dl compact><dt><b>Returns:</b></dt><dd>Number of bytes written to the memory block successfully;<br>
607
0 if failure; </dd></dl>
610
Implements <a class="el" href="classExiv2_1_1BasicIo.html#31334606e230bbe94d6b8768d3c6d75f">Exiv2::BasicIo</a>. </td>
613
<a class="anchor" name="b34c91ef04dd9b8f5faf51d380aa55b9"></a><!-- doxytag: member="Exiv2::MemIo::write" ref="b34c91ef04dd9b8f5faf51d380aa55b9" args="(const byte *data, long wcount)" --><p>
614
<table class="mdTable" cellpadding="2" cellspacing="0">
617
<table cellpadding="0" cellspacing="0" border="0">
619
<td class="md" nowrap valign="top">long Exiv2::MemIo::write </td>
620
<td class="md" valign="top">( </td>
621
<td class="md" nowrap valign="top">const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> * </td>
622
<td class="mdname" nowrap> <em>data</em>, </td>
625
<td class="md" nowrap align="right"></td>
627
<td class="md" nowrap>long </td>
628
<td class="mdname" nowrap> <em>wcount</em></td>
632
<td class="md">) </td>
633
<td class="md" colspan="2"><code> [virtual]</code></td>
639
<table cellspacing="5" cellpadding="0" border="0">
647
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.
649
<dl compact><dt><b>Parameters:</b></dt><dd>
650
<table border="0" cellspacing="2" cellpadding="0">
651
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>Pointer to data. Data must be at least <em>wcount</em> bytes long </td></tr>
652
<tr><td valign="top"></td><td valign="top"><em>wcount</em> </td><td>Number of bytes to be written. </td></tr>
655
<dl compact><dt><b>Returns:</b></dt><dd>Number of bytes written to the memory block successfully;<br>
656
0 if failure; </dd></dl>
659
Implements <a class="el" href="classExiv2_1_1BasicIo.html#c548d52ef633ac425bd01d17ccd2e7e4">Exiv2::BasicIo</a>. </td>
662
<hr>The documentation for this class was generated from the following files:<ul>
663
<li><a class="el" href="basicio_8hpp.html">basicio.hpp</a><li>basicio.cpp</ul>
664
<hr size="1"><address style="align: right;"><small>Generated on Fri Jun 2 23:54:47 2006 for Exiv2 by
612
<dl class="return" compact><dt><b>Returns:</b></dt><dd>An instance of <a class="el" href="classExiv2_1_1BasicIo.html">BasicIo</a> </dd></dl>
615
Implements <a class="el" href="classExiv2_1_1BasicIo.html#2c962d72689c040a04c18f9317b12497">Exiv2::BasicIo</a>.
618
<hr>The documentation for this class was generated from the following file:<ul>
619
<li><a class="el" href="basicio_8hpp.html">basicio.hpp</a></ul>
620
<hr size="1"><address style="align: right;"><small>Generated on Mon Nov 27 20:16:24 2006 for Exiv2 by
665
621
<a href="http://www.doxygen.org/index.html">
666
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
622
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>