File: classExiv2_1_1Ifd.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 (426 lines) | stat: -rw-r--r-- 37,350 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
<!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::Ifd 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_1Ifd.html">Ifd</a></div>
<h1>Exiv2::Ifd Class Reference</h1><!-- doxytag: class="Exiv2::Ifd" -->Models an IFD (Image File Directory).  
<a href="#_details">More...</a>
<p>
<code>#include &lt;ifd.hpp&gt;</code>
<p>
Collaboration diagram for Exiv2::Ifd:<p><center><img src="classExiv2_1_1Ifd__coll__graph.png" border="0" usemap="#Exiv2_1_1Ifd__coll__map" alt="Collaboration graph"></center>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classExiv2_1_1Ifd-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 Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e1a940634eeaaf03e3635b666ee8ab06"></a><!-- doxytag: member="Exiv2::Ifd::const_iterator" ref="e1a940634eeaaf03e3635b666ee8ab06" args="" -->
typedef Entries::const_iterator&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#e1a940634eeaaf03e3635b666ee8ab06">const_iterator</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Entries const iterator type <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9c93a8ce8a9645aa66c152641a91fb56"></a><!-- doxytag: member="Exiv2::Ifd::iterator" ref="9c93a8ce8a9645aa66c152641a91fb56" args="" -->
typedef Entries::iterator&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#9c93a8ce8a9645aa66c152641a91fb56">iterator</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Entries iterator type <br></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="35ca0bcd5456f652da470abc6796252b"></a><!-- doxytag: member="Exiv2::Ifd::Ifd" ref="35ca0bcd5456f652da470abc6796252b" args="(IfdId ifdId=ifdIdNotSet)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#35ca0bcd5456f652da470abc6796252b">Ifd</a> (<a class="el" href="namespaceExiv2.html#1615152767a506a955c9d13443b56b62">IfdId</a> ifdId=ifdIdNotSet)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. Allows to set the IFD identifier. Memory management is enabled, offset is set to 0. Serves as default constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4152ff215d6ef0af0f25a4399f47e766"></a><!-- doxytag: member="Exiv2::Ifd::Ifd" ref="4152ff215d6ef0af0f25a4399f47e766" args="(IfdId ifdId, long offset)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#4152ff215d6ef0af0f25a4399f47e766">Ifd</a> (<a class="el" href="namespaceExiv2.html#1615152767a506a955c9d13443b56b62">IfdId</a> ifdId, long offset)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. Allows to set the IFD identifier and the offset of the IFD from the start of TIFF header. Memory management is enabled. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c2742ff3480abd123bec2a169bb9ab6a"></a><!-- doxytag: member="Exiv2::Ifd::Ifd" ref="c2742ff3480abd123bec2a169bb9ab6a" args="(IfdId ifdId, long offset, bool alloc, bool hasNext=true)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#c2742ff3480abd123bec2a169bb9ab6a">Ifd</a> (<a class="el" href="namespaceExiv2.html#1615152767a506a955c9d13443b56b62">IfdId</a> ifdId, long offset, bool alloc, bool hasNext=true)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. Allows to set the IFD identifier, offset of the IFD from the start of TIFF header, choose whether or not memory management is required for the Entries, and decide whether this IFD has a next pointer. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="868c86a9a804070023bfb81836d0a358"></a><!-- doxytag: member="Exiv2::Ifd::Ifd" ref="868c86a9a804070023bfb81836d0a358" args="(const Ifd &amp;rhs)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#868c86a9a804070023bfb81836d0a358">Ifd</a> (const <a class="el" href="classExiv2_1_1Ifd.html">Ifd</a> &amp;rhs)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="42a28a311e121156bf024e5554d30519"></a><!-- doxytag: member="Exiv2::Ifd::~Ifd" ref="42a28a311e121156bf024e5554d30519" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#42a28a311e121156bf024e5554d30519">~Ifd</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Manipulators</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#8d86b9dfa71fb413978822ed388d5f78">read</a> (const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *buf, long len, long start, <a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a> byteOrder, long shift=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a complete IFD and its data from a data buffer.  <a href="#8d86b9dfa71fb413978822ed388d5f78"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#e4111e2b5234b5dab141e4fd7194eabd">copy</a> (<a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *buf, <a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a> byteOrder, long offset=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy the IFD to a data array, update the offsets of the IFD and all its entries, return the number of bytes written.  <a href="#e4111e2b5234b5dab141e4fd7194eabd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="559627e0f77d37556a73c6e808b7a7fb"></a><!-- doxytag: member="Exiv2::Ifd::clear" ref="559627e0f77d37556a73c6e808b7a7fb" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#559627e0f77d37556a73c6e808b7a7fb">clear</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reset the IFD. Delete all IFD entries from the class and put the object in a state where it can accept completely new entries. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2b8878af1f47c9acc083141ee349c41a"></a><!-- doxytag: member="Exiv2::Ifd::setNext" ref="2b8878af1f47c9acc083141ee349c41a" args="(uint32_t next, ByteOrder byteOrder)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#2b8878af1f47c9acc083141ee349c41a">setNext</a> (uint32_t next, <a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a> byteOrder)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the offset of the next IFD. Byte order is needed to update the underlying data buffer in non-alloc mode. This method only has an effect if the IFD was instantiated with hasNext = true. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f3c1d754bc8082eec986a91be12f8cb0"></a><!-- doxytag: member="Exiv2::Ifd::add" ref="f3c1d754bc8082eec986a91be12f8cb0" args="(const Entry &amp;entry)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#f3c1d754bc8082eec986a91be12f8cb0">add</a> (const <a class="el" href="classExiv2_1_1Entry.html">Entry</a> &amp;entry)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add the entry to the IFD. No duplicate-check is performed, i.e., it is possible to add multiple entries with the same tag. The memory allocation mode of the entry to be added must match that of the IFD and the IFD ids of the IFD and entry must match. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f1389f168b084badf2cd73c380d28ea3"></a><!-- doxytag: member="Exiv2::Ifd::erase" ref="f1389f168b084badf2cd73c380d28ea3" args="(uint16_t tag)" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#f1389f168b084badf2cd73c380d28ea3">erase</a> (uint16_t tag)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete the directory entry with the given tag. Return the index of the deleted entry or 0 if no entry with tag was found. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6b29dc7ce0ab026d8600191c0abd4e2c"></a><!-- doxytag: member="Exiv2::Ifd::erase" ref="6b29dc7ce0ab026d8600191c0abd4e2c" args="(iterator pos)" -->
<a class="el" href="classExiv2_1_1Ifd.html#9c93a8ce8a9645aa66c152641a91fb56">iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#6b29dc7ce0ab026d8600191c0abd4e2c">erase</a> (<a class="el" href="classExiv2_1_1Ifd.html#9c93a8ce8a9645aa66c152641a91fb56">iterator</a> pos)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete the directory entry at iterator position pos, return the position of the next entry. Note that iterators into the directory, including pos, are potentially invalidated by this call. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c98ad7d2422810a0a253d86452a46bae"></a><!-- doxytag: member="Exiv2::Ifd::sortByTag" ref="c98ad7d2422810a0a253d86452a46bae" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#c98ad7d2422810a0a253d86452a46bae">sortByTag</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sort the IFD entries by tag. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a67f29417445e1ff81dfedbd7d42daff"></a><!-- doxytag: member="Exiv2::Ifd::begin" ref="a67f29417445e1ff81dfedbd7d42daff" args="()" -->
<a class="el" href="classExiv2_1_1Ifd.html#9c93a8ce8a9645aa66c152641a91fb56">iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#a67f29417445e1ff81dfedbd7d42daff">begin</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The first entry. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ea062007f866b97a9ce6867fb1e52fe1"></a><!-- doxytag: member="Exiv2::Ifd::end" ref="ea062007f866b97a9ce6867fb1e52fe1" args="()" -->
<a class="el" href="classExiv2_1_1Ifd.html#9c93a8ce8a9645aa66c152641a91fb56">iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#ea062007f866b97a9ce6867fb1e52fe1">end</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">End of the entries. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eea8815df5c4d997aabeca6c433e5419"></a><!-- doxytag: member="Exiv2::Ifd::findIdx" ref="eea8815df5c4d997aabeca6c433e5419" args="(int idx)" -->
<a class="el" href="classExiv2_1_1Ifd.html#9c93a8ce8a9645aa66c152641a91fb56">iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#eea8815df5c4d997aabeca6c433e5419">findIdx</a> (int idx)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find an IFD entry by idx, return an iterator into the entries list. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ed5cbf1618df16baf196b8751784ce90"></a><!-- doxytag: member="Exiv2::Ifd::findTag" ref="ed5cbf1618df16baf196b8751784ce90" args="(uint16_t tag)" -->
<a class="el" href="classExiv2_1_1Ifd.html#9c93a8ce8a9645aa66c152641a91fb56">iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#ed5cbf1618df16baf196b8751784ce90">findTag</a> (uint16_t tag)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find an IFD entry by tag, return an iterator into the entries list. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#5f6bb37fc8c82ca5e584f7353fc77ce9">updateBase</a> (<a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *pNewBase)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Update the base pointer of the <a class="el" href="classExiv2_1_1Ifd.html">Ifd</a> and all entries to <em>pNewBase</em>.  <a href="#5f6bb37fc8c82ca5e584f7353fc77ce9"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Accessors</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#bff72dd26220e5f6d30288f45af42e0a">readSubIfd</a> (<a class="el" href="classExiv2_1_1Ifd.html">Ifd</a> &amp;dest, const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *buf, long len, <a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a> byteOrder, uint16_t tag) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a sub-IFD from the location pointed to by the directory entry with the given tag.  <a href="#bff72dd26220e5f6d30288f45af42e0a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c8a8b5eeaf0437c846b160f58347b68f"></a><!-- doxytag: member="Exiv2::Ifd::alloc" ref="c8a8b5eeaf0437c846b160f58347b68f" args="() const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#c8a8b5eeaf0437c846b160f58347b68f">alloc</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the memory allocation mode, see the <a class="el" href="classExiv2_1_1Ifd.html">Ifd</a> class description for details. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3f3c2d53d5e2a46b8de4219a062981b6"></a><!-- doxytag: member="Exiv2::Ifd::begin" ref="3f3c2d53d5e2a46b8de4219a062981b6" args="() const " -->
<a class="el" href="classExiv2_1_1Ifd.html#e1a940634eeaaf03e3635b666ee8ab06">const_iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#3f3c2d53d5e2a46b8de4219a062981b6">begin</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The first entry. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8b9d389689153948e6a55a5bed90596d"></a><!-- doxytag: member="Exiv2::Ifd::end" ref="8b9d389689153948e6a55a5bed90596d" args="() const " -->
<a class="el" href="classExiv2_1_1Ifd.html#e1a940634eeaaf03e3635b666ee8ab06">const_iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#8b9d389689153948e6a55a5bed90596d">end</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">End of the entries. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="871232ca77c3eddbddac46b7fdf86a40"></a><!-- doxytag: member="Exiv2::Ifd::findIdx" ref="871232ca77c3eddbddac46b7fdf86a40" args="(int idx) const " -->
<a class="el" href="classExiv2_1_1Ifd.html#e1a940634eeaaf03e3635b666ee8ab06">const_iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#871232ca77c3eddbddac46b7fdf86a40">findIdx</a> (int idx) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find an IFD entry by idx, return a const iterator into the entries list. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6cadb943ad9abad002d118cb10f259fa"></a><!-- doxytag: member="Exiv2::Ifd::findTag" ref="6cadb943ad9abad002d118cb10f259fa" args="(uint16_t tag) const " -->
<a class="el" href="classExiv2_1_1Ifd.html#e1a940634eeaaf03e3635b666ee8ab06">const_iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#6cadb943ad9abad002d118cb10f259fa">findTag</a> (uint16_t tag) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find an IFD entry by tag, return a const iterator into the entries list. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="00a4292e936211c946594be03bad055e"></a><!-- doxytag: member="Exiv2::Ifd::ifdId" ref="00a4292e936211c946594be03bad055e" args="() const " -->
<a class="el" href="namespaceExiv2.html#1615152767a506a955c9d13443b56b62">IfdId</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#00a4292e936211c946594be03bad055e">ifdId</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the IfdId of the IFD. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fb2195a0b29a87cfff6aa35437b47a9e"></a><!-- doxytag: member="Exiv2::Ifd::offset" ref="fb2195a0b29a87cfff6aa35437b47a9e" args="() const " -->
long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#fb2195a0b29a87cfff6aa35437b47a9e">offset</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the offset of the IFD from the start of the TIFF header. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ff751d7b774be46c37235951212321cc"></a><!-- doxytag: member="Exiv2::Ifd::dataOffset" ref="ff751d7b774be46c37235951212321cc" args="() const " -->
long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#ff751d7b774be46c37235951212321cc">dataOffset</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the offset of the first data entry outside of the IFD from the start of the TIFF header, return 0 if there is none. The data offset is determined when the IFD is read. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5c7a475416b7d03f5467c2b0a3f8a297"></a><!-- doxytag: member="Exiv2::Ifd::next" ref="5c7a475416b7d03f5467c2b0a3f8a297" args="() const " -->
uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#5c7a475416b7d03f5467c2b0a3f8a297">next</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the offset to the next IFD from the start of the TIFF header. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0d2baaaa5da6e435134c688faa435b24"></a><!-- doxytag: member="Exiv2::Ifd::count" ref="0d2baaaa5da6e435134c688faa435b24" args="() const " -->
long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#0d2baaaa5da6e435134c688faa435b24">count</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of directory entries in the IFD. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a12417574ede7fc602ec2bd4c8bedfe9"></a><!-- doxytag: member="Exiv2::Ifd::size" ref="a12417574ede7fc602ec2bd4c8bedfe9" args="() const " -->
long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#a12417574ede7fc602ec2bd4c8bedfe9">size</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the size of this IFD in bytes (IFD only, without data). <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ed3dbf3d4dbf003df41acbd4587df8a3"></a><!-- doxytag: member="Exiv2::Ifd::dataSize" ref="ed3dbf3d4dbf003df41acbd4587df8a3" args="() const " -->
long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#ed3dbf3d4dbf003df41acbd4587df8a3">dataSize</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the total size of the data of this IFD in bytes; sums the size of all directory entries where size is greater than four plus the size of all data areas, i.e., all data that requires memory outside the IFD directory entries is counted. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ac4f19f3ee6eccbfd2fce067d03efb1f"></a><!-- doxytag: member="Exiv2::Ifd::print" ref="ac4f19f3ee6eccbfd2fce067d03efb1f" args="(std::ostream &amp;os, const std::string &amp;prefix=&quot;&quot;) const " -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#ac4f19f3ee6eccbfd2fce067d03efb1f">print</a> (std::ostream &amp;os, const std::string &amp;prefix=&quot;&quot;) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print the IFD in human readable format to the given stream; begin each line with prefix. <br></td></tr>
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c0727f3ca00ed901f4657185944f16c"></a><!-- doxytag: member="Exiv2::Ifd::cmpPreEntriesByOffset" ref="2c0727f3ca00ed901f4657185944f16c" args="(const PreEntry &amp;, const PreEntry &amp;)" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Ifd.html#2c0727f3ca00ed901f4657185944f16c">cmpPreEntriesByOffset</a> (const PreEntry &amp;, const PreEntry &amp;)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">cmpPreEntriesByOffset needs to know about PreEntry, that's all. <br></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><b>PreEntry</b></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Helper structure to build IFD entries. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Models an IFD (Image File Directory). 
<p>
This class models an IFD as described in the TIFF 6.0 specification.<p>
An instance of class Ifd can operate in two modes, one that allocates and deallocates the memory required to store data, and one that doesn't perform such memory management. <br>
An external data buffer (not managed by Ifd) is needed for an instance of Ifd which operates in no memory management mode. The Ifd will maintain only pointers into this buffer. <br>
 The mode without memory management is used to make "non-intrusive write support" possible. This allows writing to Exif data of an image without changing the data layout of the Exif data, to maximize chances that tag data, which the Exif reader may not understand (e.g., the Makernote) remains valid. A "non-intrusive write operation" is the modification of tag data without increasing the data size.<p>
<dl compact><dt><b>Note:</b></dt><dd>Use the mode with memory management (the default) if you are unsure or if these memory management considerations are of no concern to you.<p>
The two different modes imply completely different copy and assignment behaviours, with the first resulting in entirely separate classes and the second mode resulting in multiple classes using one and the same data buffer. </dd></dl>

<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="e4111e2b5234b5dab141e4fd7194eabd"></a><!-- doxytag: member="Exiv2::Ifd::copy" ref="e4111e2b5234b5dab141e4fd7194eabd" args="(byte *buf, ByteOrder byteOrder, long offset=0)" --><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::Ifd::copy           </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><a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>byteOrder</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>offset</em> = <code>0</code></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>
Copy the IFD to a data array, update the offsets of the IFD and all its entries, return the number of bytes written. 
<p>
First the number of IFD entries is written (2 bytes), followed by all directory entries: tag (2), type (2), number of data components (4) and offset to the data or the data, if it occupies not more than four bytes (4). The directory entries are followed by the offset of the next IFD (4). All these fields are encoded according to the byte order argument. Data that doesn't fit into the offset fields follows immediately after the IFD entries. The offsets in the IFD are set to correctly point to the data fields, using the offset parameter or the offset of the IFD.<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 the data buffer. The user must ensure that the buffer has enough memory. Otherwise the call results in undefined behaviour. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>byteOrder</em>&nbsp;</td><td>Applicable byte order (little or big endian). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>Target offset from the start of the TIFF header of the data array. The IFD offsets will be adjusted as necessary. If not given, then it is assumed that the IFD will remain at its original position, i.e., the offset of the IFD will be used. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Returns the number of characters written. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="8d86b9dfa71fb413978822ed388d5f78"></a><!-- doxytag: member="Exiv2::Ifd::read" ref="8d86b9dfa71fb413978822ed388d5f78" args="(const byte *buf, long len, long start, ByteOrder byteOrder, long shift=0)" --><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::Ifd::read           </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>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>len</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>start</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>byteOrder</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>shift</em> = <code>0</code></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>
Read a complete IFD and its data from a data buffer. 
<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 the Exif data buffer that contains the IFD to decode. Usually, the buffer will contain all Exif data starting from the TIFF header. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>Number of bytes in the Exif data buffer. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>IFD starts at buf + start. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>byteOrder</em>&nbsp;</td><td>Applicable byte order (little or big endian). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>shift</em>&nbsp;</td><td>IFD offsets are relative to buf + shift.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>0 if successful;<br>
 6 if the data buffer is too small, e.g., if an offset points beyond the provided buffer. The IFD is cleared in this case. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="bff72dd26220e5f6d30288f45af42e0a"></a><!-- doxytag: member="Exiv2::Ifd::readSubIfd" ref="bff72dd26220e5f6d30288f45af42e0a" args="(Ifd &amp;dest, const byte *buf, long len, ByteOrder byteOrder, uint16_t tag) 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">int Exiv2::Ifd::readSubIfd           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classExiv2_1_1Ifd.html">Ifd</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const <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>len</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>byteOrder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>uint16_t&nbsp;</td>
          <td class="mdname" nowrap> <em>tag</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read a sub-IFD from the location pointed to by the directory entry with the given tag. 
<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>dest</em>&nbsp;</td><td>References the destination IFD. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>The data buffer to read from. The buffer must contain all Exif data starting from the TIFF header. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>Number of bytes in the data buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>byteOrder</em>&nbsp;</td><td>Applicable byte order (little or big endian). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>tag</em>&nbsp;</td><td><a class="el" href="namespaceExiv2_1_1Tag.html">Tag</a> to look for.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>0 if successful;<br>
 6 if reading the sub-IFD failed (see <a class="el" href="classExiv2_1_1Ifd.html#8d86b9dfa71fb413978822ed388d5f78">read()</a> above) or the location pointed to by the directory entry with the given tag is outside of the data buffer.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>It is not considered an error if the tag cannot be found in the IFD. 0 is returned and no action is taken in this case. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="5f6bb37fc8c82ca5e584f7353fc77ce9"></a><!-- doxytag: member="Exiv2::Ifd::updateBase" ref="5f6bb37fc8c82ca5e584f7353fc77ce9" args="(byte *pNewBase)" --><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="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> * Exiv2::Ifd::updateBase           </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>pNewBase</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Update the base pointer of the <a class="el" href="classExiv2_1_1Ifd.html">Ifd</a> and all entries to <em>pNewBase</em>. 
<p>
Allows to re-locate the underlying data buffer to a new location <em>pNewBase</em>. This method only has an effect in non-alloc mode.<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>pNewBase</em>&nbsp;</td><td>Pointer to the new data buffer</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Old base pointer or 0 if called in alloc mode </dd></dl>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="ifd_8hpp.html">ifd.hpp</a><li>ifd.cpp</ul>
<hr size="1"><address style="align: right;"><small>Generated on Fri Jun 2 23:54:58 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>