File: classExiv2_1_1Value.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 (537 lines) | stat: -rw-r--r-- 37,471 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
<!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::Value 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_1Value.html">Value</a></div>
<h1>Exiv2::Value Class Reference</h1><!-- doxytag: class="Exiv2::Value" -->Common interface for all types of values used with metadata.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;value.hpp&gt;</code>
<p>
Inheritance diagram for Exiv2::Value:<p><center><img src="classExiv2_1_1Value__inherit__graph.png" border="0" usemap="#Exiv2_1_1Value__inherit__map" alt="Inheritance graph"></center>
<map name="Exiv2_1_1Value__inherit__map">
<area href="classExiv2_1_1DataValue.html" shape="rect" coords="6,82,128,106" alt="">
<area href="classExiv2_1_1DateValue.html" shape="rect" coords="152,82,275,106" alt="">
<area href="classExiv2_1_1StringValueBase.html" shape="rect" coords="299,82,459,106" alt="">
<area href="classExiv2_1_1TimeValue.html" shape="rect" coords="483,82,608,106" alt="">
<area href="classExiv2_1_1ValueType.html" shape="rect" coords="632,82,790,106" alt="">
<area href="classExiv2_1_1AsciiValue.html" shape="rect" coords="155,156,278,180" alt="">
<area href="classExiv2_1_1CommentValue.html" shape="rect" coords="302,156,456,180" alt="">
<area href="classExiv2_1_1StringValue.html" shape="rect" coords="480,156,611,180" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classExiv2_1_1Value-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="0f62e585b82c97738858b743e60dff21"></a><!-- doxytag: member="Exiv2::Value::AutoPtr" ref="0f62e585b82c97738858b743e60dff21" args="" -->
typedef std::auto_ptr&lt; <a class="el" href="classExiv2_1_1Value.html">Value</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#0f62e585b82c97738858b743e60dff21">AutoPtr</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shortcut for a Value auto pointer. <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="b475b1680c6fa36a092c4584f70a8027"></a><!-- doxytag: member="Exiv2::Value::Value" ref="b475b1680c6fa36a092c4584f70a8027" args="(TypeId typeId)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#b475b1680c6fa36a092c4584f70a8027">Value</a> (<a class="el" href="namespaceExiv2.html#5153319711f35fe81cbc13f4b852450c">TypeId</a> typeId)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor, taking a type id to initialize the base class with. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f312ee440cf4570e6a856143c2671e0e"></a><!-- doxytag: member="Exiv2::Value::Value" ref="f312ee440cf4570e6a856143c2671e0e" args="(const Value &amp;rhs)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#f312ee440cf4570e6a856143c2671e0e">Value</a> (const <a class="el" href="classExiv2_1_1Value.html">Value</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="d27fa9023be70d47b5f101d1f2f565cc"></a><!-- doxytag: member="Exiv2::Value::~Value" ref="d27fa9023be70d47b5f101d1f2f565cc" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#d27fa9023be70d47b5f101d1f2f565cc">~Value</a> ()</td></tr>

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

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read the value from a character buffer.  <a href="#cc8870f802ebcdf9d4e081816ad8956e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#2864378d7572310aa5f4cf4127365862">read</a> (const std::string &amp;buf)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the value from a string buffer. The format of the string corresponds to that of the <a class="el" href="classExiv2_1_1Value.html#2518f5ba09fc8c00785c57a119892c4c">write()</a> method, i.e., a string obtained through the <a class="el" href="classExiv2_1_1Value.html#2518f5ba09fc8c00785c57a119892c4c">write()</a> method can be read by this function.  <a href="#2864378d7572310aa5f4cf4127365862"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#6e8f3c20bf5d09f34371660a6cf50af3">setDataArea</a> (const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *buf, long len)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the data area, if the value has one by copying (cloning) the buffer pointed to by buf.  <a href="#6e8f3c20bf5d09f34371660a6cf50af3"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Accessors</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1a56299aad4e614c4f0225d97530c038"></a><!-- doxytag: member="Exiv2::Value::typeId" ref="1a56299aad4e614c4f0225d97530c038" args="() const " -->
<a class="el" href="namespaceExiv2.html#5153319711f35fe81cbc13f4b852450c">TypeId</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#1a56299aad4e614c4f0225d97530c038">typeId</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the type identifier (Exif data format type). <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0b07106aa570a506f4211c7bfa605fb0"></a><!-- doxytag: member="Exiv2::Value::toString" ref="0b07106aa570a506f4211c7bfa605fb0" args="() const " -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#0b07106aa570a506f4211c7bfa605fb0">toString</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the value as a string. Implemented in terms of <a class="el" href="classExiv2_1_1Value.html#2518f5ba09fc8c00785c57a119892c4c">write(std::ostream&amp; os) const</a> of the concrete class. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="84db34d85bac0f5e159d67a1e10c7976"></a><!-- doxytag: member="Exiv2::Value::clone" ref="84db34d85bac0f5e159d67a1e10c7976" args="() const " -->
<a class="el" href="classExiv2_1_1Value.html#0f62e585b82c97738858b743e60dff21">AutoPtr</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#84db34d85bac0f5e159d67a1e10c7976">clone</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an auto-pointer to a copy of itself (deep copy). The caller owns this copy and the auto-pointer ensures that it will be deleted. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#3bf4f9c2eda4f7850a390de98668ce15">copy</a> (<a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *buf, <a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a> byteOrder) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write value to a data buffer.  <a href="#3bf4f9c2eda4f7850a390de98668ce15"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e046b0b081c2be1cf160db595c66fe6d"></a><!-- doxytag: member="Exiv2::Value::count" ref="e046b0b081c2be1cf160db595c66fe6d" args="() const =0" -->
virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#e046b0b081c2be1cf160db595c66fe6d">count</a> () const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of components of the value. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2929f67840fb0565b868993b140ed0ff"></a><!-- doxytag: member="Exiv2::Value::size" ref="2929f67840fb0565b868993b140ed0ff" args="() const =0" -->
virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#2929f67840fb0565b868993b140ed0ff">size</a> () const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the size of the value in bytes. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2518f5ba09fc8c00785c57a119892c4c"></a><!-- doxytag: member="Exiv2::Value::write" ref="2518f5ba09fc8c00785c57a119892c4c" args="(std::ostream &amp;os) const =0" -->
virtual std::ostream &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#2518f5ba09fc8c00785c57a119892c4c">write</a> (std::ostream &amp;os) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write the value to an output stream. You do not usually have to use this function; it is used for the implementation of the output operator for Value, <a class="el" href="namespaceExiv2.html#be882054db13fc2f4f6f7e8e1261d982">operator&lt;&lt;(std::ostream &amp;os, const Value &amp;value)</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#4530a3fc3e2305cf994de5476f46f953">toLong</a> (long n=0) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the n-th component of the value to a long. The behaviour of this method may be undefined if there is no n-th component.  <a href="#4530a3fc3e2305cf994de5476f46f953"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#22d257caa6c1ffe6416ce02de7bd8c1c">toFloat</a> (long n=0) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the n-th component of the value to a float. The behaviour of this method may be undefined if there is no n-th component.  <a href="#22d257caa6c1ffe6416ce02de7bd8c1c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceExiv2.html#95756f3f7fa19103f83addf5fa088a30">Rational</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#595a4cb549bec8c19d290ca3e95a2678">toRational</a> (long n=0) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the n-th component of the value to a Rational. The behaviour of this method may be undefined if there is no n-th component.  <a href="#595a4cb549bec8c19d290ca3e95a2678"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="868dd11bd0ad0d257e2374b13d6683b5"></a><!-- doxytag: member="Exiv2::Value::sizeDataArea" ref="868dd11bd0ad0d257e2374b13d6683b5" args="() const " -->
virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#868dd11bd0ad0d257e2374b13d6683b5">sizeDataArea</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the size of the data area, 0 if there is none. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#feab3bcedeb6f60ed92085c5fd33340f">dataArea</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a copy of the data area if the value has one. The caller owns this copy and <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> ensures that it will be deleted.  <a href="#feab3bcedeb6f60ed92085c5fd33340f"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classExiv2_1_1Value.html#0f62e585b82c97738858b743e60dff21">AutoPtr</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#7a6c027316e3dec0f7e79430f104c137">create</a> (<a class="el" href="namespaceExiv2.html#5153319711f35fe81cbc13f4b852450c">TypeId</a> typeId)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A (simple) factory to create a <a class="el" href="classExiv2_1_1Value.html">Value</a> type.  <a href="#7a6c027316e3dec0f7e79430f104c137"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2a9041cbd30d86260820b818cdf232e"></a><!-- doxytag: member="Exiv2::Value::operator=" ref="a2a9041cbd30d86260820b818cdf232e" args="(const Value &amp;rhs)" -->
<a class="el" href="classExiv2_1_1Value.html">Value</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1Value.html#a2a9041cbd30d86260820b818cdf232e">operator=</a> (const <a class="el" href="classExiv2_1_1Value.html">Value</a> &amp;rhs)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator. Protected so that it can only be used by subclasses but not directly. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Common interface for all types of values used with metadata. 
<p>
The interface provides a uniform way to access values independent from their actual C++ type for simple tasks like reading the values from a string or data buffer. For other tasks, like modifying values you may need to downcast it to the actual subclass of Value so that you can access the subclass specific interface. 
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="3bf4f9c2eda4f7850a390de98668ce15"></a><!-- doxytag: member="Exiv2::Value::copy" ref="3bf4f9c2eda4f7850a390de98668ce15" args="(byte *buf, ByteOrder byteOrder) const =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">virtual long Exiv2::Value::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"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Write value to a data buffer. 
<p>
The user must ensure that the buffer has enough memory. Otherwise the call results in undefined behaviour.<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>Data buffer to write to. </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>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Number of bytes written. </dd></dl>

<p>
Implemented in <a class="el" href="classExiv2_1_1DataValue.html#d96c8ded5036c82f33d9eb214ed12587">Exiv2::DataValue</a>, <a class="el" href="classExiv2_1_1StringValueBase.html#68503471612daaf314f4b70e2216ef3b">Exiv2::StringValueBase</a>, <a class="el" href="classExiv2_1_1DateValue.html#b058c2ba2c53659564a8adfa3a751cd1">Exiv2::DateValue</a>, <a class="el" href="classExiv2_1_1TimeValue.html#198a39cf744c504de9b3d215988bab9d">Exiv2::TimeValue</a>, and <a class="el" href="classExiv2_1_1ValueType.html#106239c4587a27ce53b6a59b63d7b348">Exiv2::ValueType&lt; T &gt;</a>.    </td>
  </tr>
</table>
<a class="anchor" name="7a6c027316e3dec0f7e79430f104c137"></a><!-- doxytag: member="Exiv2::Value::create" ref="7a6c027316e3dec0f7e79430f104c137" args="(TypeId typeId)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classExiv2_1_1Value.html#0f62e585b82c97738858b743e60dff21">Value::AutoPtr</a> Exiv2::Value::create           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="namespaceExiv2.html#5153319711f35fe81cbc13f4b852450c">TypeId</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>typeId</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
A (simple) factory to create a <a class="el" href="classExiv2_1_1Value.html">Value</a> type. 
<p>
The following <a class="el" href="classExiv2_1_1Value.html">Value</a> subclasses are created depending on typeId:<br>
<br>
 <table border="1" cellspacing="3" cellpadding="3">
<tr>
<td class="indexkey"><b>typeId</b></td><td class="indexvalue"><b>Value subclass</b> </td></tr>
<tr>
<td class="indexkey">invalidTypeId</td><td class="indexvalue">DataValue(invalidTypeId) </td></tr>
<tr>
<td class="indexkey">unsignedByte</td><td class="indexvalue">DataValue(unsignedByte) </td></tr>
<tr>
<td class="indexkey">asciiString</td><td class="indexvalue">AsciiValue </td></tr>
<tr>
<td class="indexkey">string</td><td class="indexvalue">StringValue </td></tr>
<tr>
<td class="indexkey">unsignedShort</td><td class="indexvalue">ValueType &lt; uint16_t &gt; </td></tr>
<tr>
<td class="indexkey">unsignedLong</td><td class="indexvalue">ValueType &lt; uint32_t &gt; </td></tr>
<tr>
<td class="indexkey">unsignedRational</td><td class="indexvalue">ValueType &lt; URational &gt; </td></tr>
<tr>
<td class="indexkey">invalid6</td><td class="indexvalue">DataValue(invalid6) </td></tr>
<tr>
<td class="indexkey">undefined</td><td class="indexvalue">DataValue </td></tr>
<tr>
<td class="indexkey">signedShort</td><td class="indexvalue">ValueType &lt; int16_t &gt; </td></tr>
<tr>
<td class="indexkey">signedLong</td><td class="indexvalue">ValueType &lt; int32_t &gt; </td></tr>
<tr>
<td class="indexkey">signedRational</td><td class="indexvalue">ValueType &lt; Rational &gt; </td></tr>
<tr>
<td class="indexkey">date</td><td class="indexvalue">DateValue </td></tr>
<tr>
<td class="indexkey">time</td><td class="indexvalue">TimeValue </td></tr>
<tr>
<td class="indexkey">comment</td><td class="indexvalue">CommentValue </td></tr>
<tr>
<td class="indexkey"><em>default:</em></td><td class="indexvalue">DataValue(typeId) </td></tr>
</table>
<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>typeId</em>&nbsp;</td><td>Type of the value. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Auto-pointer to the newly created <a class="el" href="classExiv2_1_1Value.html">Value</a>. The caller owns this copy and the auto-pointer ensures that it will be deleted. </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="addmoddel_8cpp-example.html#a2">addmoddel.cpp</a>.</dl>    </td>
  </tr>
</table>
<a class="anchor" name="feab3bcedeb6f60ed92085c5fd33340f"></a><!-- doxytag: member="Exiv2::Value::dataArea" ref="feab3bcedeb6f60ed92085c5fd33340f" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> Exiv2::Value::dataArea           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return a copy of the data area if the value has one. The caller owns this copy and <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> ensures that it will be deleted. 
<p>
Values may have a data area, which can contain additional information besides the actual value. This method is used to access such a data area.<p>
<dl compact><dt><b>Returns:</b></dt><dd>A <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> containing a copy of the data area or an empty <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a> if the value does not have a data area assigned. </dd></dl>

<p>
Reimplemented in <a class="el" href="classExiv2_1_1ValueType.html#b30d2836320975c3ad60312bf0a5133d">Exiv2::ValueType&lt; T &gt;</a>.    </td>
  </tr>
</table>
<a class="anchor" name="2864378d7572310aa5f4cf4127365862"></a><!-- doxytag: member="Exiv2::Value::read" ref="2864378d7572310aa5f4cf4127365862" args="(const std::string &amp;buf)=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">virtual int Exiv2::Value::read           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>buf</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the value from a string buffer. The format of the string corresponds to that of the <a class="el" href="classExiv2_1_1Value.html#2518f5ba09fc8c00785c57a119892c4c">write()</a> method, i.e., a string obtained through the <a class="el" href="classExiv2_1_1Value.html#2518f5ba09fc8c00785c57a119892c4c">write()</a> method can be read by this function. 
<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>The string to read from.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>0 if successful. </dd></dl>

<p>
Implemented in <a class="el" href="classExiv2_1_1DataValue.html#fb8d9321e3b80c239b3a8df9b1ca4083">Exiv2::DataValue</a>, <a class="el" href="classExiv2_1_1StringValueBase.html#7e1a2e4e99a63eb1ef815317f012c57b">Exiv2::StringValueBase</a>, <a class="el" href="classExiv2_1_1AsciiValue.html#8dba62825094109881aa7dc37492a2a3">Exiv2::AsciiValue</a>, <a class="el" href="classExiv2_1_1CommentValue.html#0dc1a2489912d18b05ba25881ed172c3">Exiv2::CommentValue</a>, <a class="el" href="classExiv2_1_1DateValue.html#6eba2be86bf4744bc947b0909aa0c6f2">Exiv2::DateValue</a>, <a class="el" href="classExiv2_1_1TimeValue.html#8160552dd6b05d970151b2622aa09459">Exiv2::TimeValue</a>, and <a class="el" href="classExiv2_1_1ValueType.html#f66d05b6e6cf774f58f5110b5976a329">Exiv2::ValueType&lt; T &gt;</a>.    </td>
  </tr>
</table>
<a class="anchor" name="cc8870f802ebcdf9d4e081816ad8956e"></a><!-- doxytag: member="Exiv2::Value::read" ref="cc8870f802ebcdf9d4e081816ad8956e" args="(const byte *buf, long len, ByteOrder byteOrder)=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">virtual int Exiv2::Value::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><a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>byteOrder</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read the value from a character 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 data buffer to read from </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>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>0 if successful. </dd></dl>

<p>
Implemented in <a class="el" href="classExiv2_1_1DataValue.html#927fef988688e4b33d4fcaffb51679dc">Exiv2::DataValue</a>, <a class="el" href="classExiv2_1_1StringValueBase.html#b43f48f366770175d7a07ad229ebbd2d">Exiv2::StringValueBase</a>, <a class="el" href="classExiv2_1_1DateValue.html#cb8fa5f6fcd5383b5fddce094a251961">Exiv2::DateValue</a>, <a class="el" href="classExiv2_1_1TimeValue.html#083325ce2c9ff4a693ccc586c5785f5e">Exiv2::TimeValue</a>, and <a class="el" href="classExiv2_1_1ValueType.html#725c88fdf395b0dba55c13794b458b69">Exiv2::ValueType&lt; T &gt;</a>.    </td>
  </tr>
</table>
<a class="anchor" name="6e8f3c20bf5d09f34371660a6cf50af3"></a><!-- doxytag: member="Exiv2::Value::setDataArea" ref="6e8f3c20bf5d09f34371660a6cf50af3" args="(const byte *buf, long len)" --><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::Value::setDataArea           </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"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the data area, if the value has one by copying (cloning) the buffer pointed to by buf. 
<p>
Values may have a data area, which can contain additional information besides the actual value. This method is used to set such a data area.<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 source data area </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>Size of the data area </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Return -1 if the value has no data area, else 0. </dd></dl>

<p>
Reimplemented in <a class="el" href="classExiv2_1_1ValueType.html#360e7872cfcb434d60bdc09dd243958e">Exiv2::ValueType&lt; T &gt;</a>.    </td>
  </tr>
</table>
<a class="anchor" name="22d257caa6c1ffe6416ce02de7bd8c1c"></a><!-- doxytag: member="Exiv2::Value::toFloat" ref="22d257caa6c1ffe6416ce02de7bd8c1c" args="(long n=0) const =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">virtual float Exiv2::Value::toFloat           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">long&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>n</em> = <code>0</code>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Convert the n-th component of the value to a float. The behaviour of this method may be undefined if there is no n-th component. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The converted value. </dd></dl>

<p>
Implemented in <a class="el" href="classExiv2_1_1DataValue.html#fcde22deccfcd99dba3c0754a0644ca5">Exiv2::DataValue</a>, <a class="el" href="classExiv2_1_1StringValueBase.html#5ebf7bd7e0077ac4ee517f72145fe711">Exiv2::StringValueBase</a>, <a class="el" href="classExiv2_1_1DateValue.html#e569670f2a52546812ca750cc7b1bb69">Exiv2::DateValue</a>, <a class="el" href="classExiv2_1_1TimeValue.html#55da5f33a5dc8e6620cdabe7fbab1dd7">Exiv2::TimeValue</a>, <a class="el" href="classExiv2_1_1ValueType.html#550fc71135aa8491fa7a90f0f682c94d">Exiv2::ValueType&lt; T &gt;</a>, <a class="el" href="classExiv2_1_1ValueType.html#c68f4ac5e10a14ca84bbc9bef0f07cbf">Exiv2::ValueType&lt; T &gt;</a>, and <a class="el" href="classExiv2_1_1ValueType.html#097236490b3429142afc60b6f636f144">Exiv2::ValueType&lt; T &gt;</a>.    </td>
  </tr>
</table>
<a class="anchor" name="4530a3fc3e2305cf994de5476f46f953"></a><!-- doxytag: member="Exiv2::Value::toLong" ref="4530a3fc3e2305cf994de5476f46f953" args="(long n=0) const =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">virtual long Exiv2::Value::toLong           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">long&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>n</em> = <code>0</code>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Convert the n-th component of the value to a long. The behaviour of this method may be undefined if there is no n-th component. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The converted value. </dd></dl>

<p>
Implemented in <a class="el" href="classExiv2_1_1DataValue.html#5f0c7bdb70a0135f5e608d75c75f4642">Exiv2::DataValue</a>, <a class="el" href="classExiv2_1_1StringValueBase.html#14727751ab89f415781402d9f3b087f1">Exiv2::StringValueBase</a>, <a class="el" href="classExiv2_1_1DateValue.html#80ca3538d96fa26f9f196e9db9ff0c43">Exiv2::DateValue</a>, <a class="el" href="classExiv2_1_1TimeValue.html#49250d1f63c75c40b89f1e06860b1ffc">Exiv2::TimeValue</a>, <a class="el" href="classExiv2_1_1ValueType.html#3dea33fa6bb1b9d3bdd1d0a05f0abad0">Exiv2::ValueType&lt; T &gt;</a>, <a class="el" href="classExiv2_1_1ValueType.html#4302aa0e8dee770c7265ed8e1fccb07c">Exiv2::ValueType&lt; T &gt;</a>, and <a class="el" href="classExiv2_1_1ValueType.html#fb8127ff26531236ff5a75232dcc0d84">Exiv2::ValueType&lt; T &gt;</a>.    </td>
  </tr>
</table>
<a class="anchor" name="595a4cb549bec8c19d290ca3e95a2678"></a><!-- doxytag: member="Exiv2::Value::toRational" ref="595a4cb549bec8c19d290ca3e95a2678" args="(long n=0) const =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">virtual <a class="el" href="namespaceExiv2.html#95756f3f7fa19103f83addf5fa088a30">Rational</a> Exiv2::Value::toRational           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">long&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>n</em> = <code>0</code>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Convert the n-th component of the value to a Rational. The behaviour of this method may be undefined if there is no n-th component. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The converted value. </dd></dl>

<p>
Implemented in <a class="el" href="classExiv2_1_1DataValue.html#3cfd0fdecb3db12c6d77c84fa4fe3de6">Exiv2::DataValue</a>, <a class="el" href="classExiv2_1_1StringValueBase.html#d7ffbf58cb0496d3ad4b13e46ee8a29e">Exiv2::StringValueBase</a>, <a class="el" href="classExiv2_1_1DateValue.html#9a4641ab53245fcd36531bcd92e80e32">Exiv2::DateValue</a>, <a class="el" href="classExiv2_1_1TimeValue.html#3db15fd2261fbfce5e369b0e98f8a8ed">Exiv2::TimeValue</a>, <a class="el" href="classExiv2_1_1ValueType.html#20632832dbb186f6ad287456c1b6b92b">Exiv2::ValueType&lt; T &gt;</a>, <a class="el" href="classExiv2_1_1ValueType.html#006d9f9f1ce12f26e14c19dd3ecb3f1f">Exiv2::ValueType&lt; T &gt;</a>, and <a class="el" href="classExiv2_1_1ValueType.html#856a6e80a914e0bbd82dcbdc3f82d24b">Exiv2::ValueType&lt; T &gt;</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="value_8hpp.html">value.hpp</a><li>value.cpp</ul>
<hr size="1"><address style="align: right;"><small>Generated on Fri Jun 2 23:55:37 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>