Sophie

Sophie

distrib > * > 2010.0 > * > by-pkgid > b36c97ff723e66f0f38bce83645c99dc > files > 836

exiv2-doc-0.18.2-1mdv2010.0.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Exiv2: Exiv2::ValueType&lt; T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <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 class="current"><a href="annotated.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>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</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="navpath"><a class="el" href="namespaceExiv2.html">Exiv2</a>::<a class="el" href="classExiv2_1_1ValueType.html">ValueType</a>
  </div>
</div>
<div class="contents">
<h1>Exiv2::ValueType&lt; T &gt; Class Template Reference</h1><!-- doxytag: class="Exiv2::ValueType" --><!-- doxytag: inherits="Exiv2::Value" -->Template for a Value of a basic type. This is used for unsigned and signed short, long and rationals.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;value.hpp&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for Exiv2::ValueType&lt; T &gt;:</div>
<div class="dynsection">
<p><center><img src="classExiv2_1_1ValueType__inherit__graph.png" border="0" usemap="#Exiv2_1_1ValueType_3_01T_01_4__inherit__map" alt="Inheritance graph"></center>
<map name="Exiv2_1_1ValueType_3_01T_01_4__inherit__map">
<area shape="rect" id="node2" href="classExiv2_1_1Value.html" title="Common interface for all types of values used with metadata." alt="" coords="51,5,192,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<div class="dynheader">
Collaboration diagram for Exiv2::ValueType&lt; T &gt;:</div>
<div class="dynsection">
<p><center><img src="classExiv2_1_1ValueType__coll__graph.png" border="0" usemap="#Exiv2_1_1ValueType_3_01T_01_4__coll__map" alt="Collaboration graph"></center>
<map name="Exiv2_1_1ValueType_3_01T_01_4__coll__map">
<area shape="rect" id="node2" href="classExiv2_1_1Value.html" title="Common interface for all types of values used with metadata." alt="" coords="51,5,192,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classExiv2_1_1ValueType-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="0c76c512468a47f6eac463f4af278a14"></a><!-- doxytag: member="Exiv2::ValueType::AutoPtr" ref="0c76c512468a47f6eac463f4af278a14" args="" -->
typedef std::auto_ptr<br class="typebreak">
&lt; <a class="el" href="classExiv2_1_1ValueType.html">ValueType</a>&lt; T &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#0c76c512468a47f6eac463f4af278a14">AutoPtr</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shortcut for a ValueType&lt;T&gt; auto pointer. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="88ed5f3e8f59a9cf00eee8c6027e9f87"></a><!-- doxytag: member="Exiv2::ValueType::ValueList" ref="88ed5f3e8f59a9cf00eee8c6027e9f87" args="" -->
typedef std::vector&lt; T &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#88ed5f3e8f59a9cf00eee8c6027e9f87">ValueList</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Container for values. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="38d2c3d37e48bd5b3c00f3693e493ad8"></a><!-- doxytag: member="Exiv2::ValueType::iterator" ref="38d2c3d37e48bd5b3c00f3693e493ad8" args="" -->
typedef std::vector&lt; T &gt;::<a class="el" href="classExiv2_1_1ValueType.html#38d2c3d37e48bd5b3c00f3693e493ad8">iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#38d2c3d37e48bd5b3c00f3693e493ad8">iterator</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Iterator type defined for convenience. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b13bcf1ea775648daac65bc13817235d"></a><!-- doxytag: member="Exiv2::ValueType::const_iterator" ref="b13bcf1ea775648daac65bc13817235d" args="" -->
typedef std::vector&lt; T &gt;<br class="typebreak">
::<a class="el" href="classExiv2_1_1ValueType.html#b13bcf1ea775648daac65bc13817235d">const_iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#b13bcf1ea775648daac65bc13817235d">const_iterator</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Const iterator type defined for convenience. <br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">long&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#4302aa0e8dee770c7265ed8e1fccb07c">toLong</a> (long n) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the <em>n</em>-th component of the value to a long. The behaviour of this method may be undefined if there is no <em>n</em>-th component.  <a href="#4302aa0e8dee770c7265ed8e1fccb07c"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">long&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#fb8127ff26531236ff5a75232dcc0d84">toLong</a> (long n) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the <em>n</em>-th component of the value to a long. The behaviour of this method may be undefined if there is no <em>n</em>-th component.  <a href="#fb8127ff26531236ff5a75232dcc0d84"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#c68f4ac5e10a14ca84bbc9bef0f07cbf">toFloat</a> (long n) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the <em>n</em>-th component of the value to a float. The behaviour of this method may be undefined if there is no <em>n</em>-th component.  <a href="#c68f4ac5e10a14ca84bbc9bef0f07cbf"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#097236490b3429142afc60b6f636f144">toFloat</a> (long n) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the <em>n</em>-th component of the value to a float. The behaviour of this method may be undefined if there is no <em>n</em>-th component.  <a href="#097236490b3429142afc60b6f636f144"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceExiv2.html#95756f3f7fa19103f83addf5fa088a30">Rational</a>&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#006d9f9f1ce12f26e14c19dd3ecb3f1f">toRational</a> (long n) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the <em>n</em>-th component of the value to a Rational. The behaviour of this method may be undefined if there is no <em>n</em>-th component.  <a href="#006d9f9f1ce12f26e14c19dd3ecb3f1f"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceExiv2.html#95756f3f7fa19103f83addf5fa088a30">Rational</a>&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#856a6e80a914e0bbd82dcbdc3f82d24b">toRational</a> (long n) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the <em>n</em>-th component of the value to a Rational. The behaviour of this method may be undefined if there is no <em>n</em>-th component.  <a href="#856a6e80a914e0bbd82dcbdc3f82d24b"></a><br></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="8c61467a7dd9a7ecf79a72e26e329ffb"></a><!-- doxytag: member="Exiv2::ValueType::ValueType" ref="8c61467a7dd9a7ecf79a72e26e329ffb" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#8c61467a7dd9a7ecf79a72e26e329ffb">ValueType</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5d312119ddbce9d179890fff1cf5736a"></a><!-- doxytag: member="Exiv2::ValueType::ValueType" ref="5d312119ddbce9d179890fff1cf5736a" args="(const byte *buf, long len, ByteOrder byteOrder)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#5d312119ddbce9d179890fff1cf5736a">ValueType</a> (const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *buf, long len, <a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a> byteOrder)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35d0b161c116d6d97a83ffece4a0303f"></a><!-- doxytag: member="Exiv2::ValueType::ValueType" ref="35d0b161c116d6d97a83ffece4a0303f" args="(const T &amp;val, ByteOrder byteOrder=littleEndian)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#35d0b161c116d6d97a83ffece4a0303f">ValueType</a> (const T &amp;val, <a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a> byteOrder=littleEndian)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor (Note: Argument <em>byteOrder</em> is ignored and deprecated). <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="70608f4c0740f6b8413f684a5dd256b6"></a><!-- doxytag: member="Exiv2::ValueType::ValueType" ref="70608f4c0740f6b8413f684a5dd256b6" args="(const ValueType&lt; T &gt; &amp;rhs)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#70608f4c0740f6b8413f684a5dd256b6">ValueType</a> (const <a class="el" href="classExiv2_1_1ValueType.html">ValueType</a>&lt; T &gt; &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="4f7a81b12f6bd8ec4e0d45f16a75ef35"></a><!-- doxytag: member="Exiv2::ValueType::~ValueType" ref="4f7a81b12f6bd8ec4e0d45f16a75ef35" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#4f7a81b12f6bd8ec4e0d45f16a75ef35">~ValueType</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"><a class="anchor" name="0bd0a1b7695e49e7ea4fd8fe449be2bf"></a><!-- doxytag: member="Exiv2::ValueType::operator=" ref="0bd0a1b7695e49e7ea4fd8fe449be2bf" args="(const ValueType&lt; T &gt; &amp;rhs)" -->
<a class="el" href="classExiv2_1_1ValueType.html">ValueType</a>&lt; T &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#0bd0a1b7695e49e7ea4fd8fe449be2bf">operator=</a> (const <a class="el" href="classExiv2_1_1ValueType.html">ValueType</a>&lt; T &gt; &amp;rhs)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator. <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_1ValueType.html#725c88fdf395b0dba55c13794b458b69">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)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read the value from a character buffer.  <a href="#725c88fdf395b0dba55c13794b458b69"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f66d05b6e6cf774f58f5110b5976a329"></a><!-- doxytag: member="Exiv2::ValueType::read" ref="f66d05b6e6cf774f58f5110b5976a329" args="(const std::string &amp;buf)" -->
virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#f66d05b6e6cf774f58f5110b5976a329">read</a> (const std::string &amp;buf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the data from a string of values of type T (e.g., "0 1 2 3" or "1/2 1/3 1/4" depending on what T is). Generally, the accepted input format is the same as that produced by the <a class="el" href="classExiv2_1_1ValueType.html#b96e357d3c5dee6cab416cafa8da7e4a" title="Write the value to an output stream. You do not usually have to use this function;...">write()</a> method. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="360e7872cfcb434d60bdc09dd243958e"></a><!-- doxytag: member="Exiv2::ValueType::setDataArea" ref="360e7872cfcb434d60bdc09dd243958e" args="(const byte *buf, long len)" -->
virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#360e7872cfcb434d60bdc09dd243958e">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. This method copies (clones) the buffer pointed to by buf. <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="5dc061e5ead43b510057d74820fa9d30"></a><!-- doxytag: member="Exiv2::ValueType::clone" ref="5dc061e5ead43b510057d74820fa9d30" 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_1ValueType.html#5dc061e5ead43b510057d74820fa9d30">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_1ValueType.html#106239c4587a27ce53b6a59b63d7b348">copy</a> (<a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *buf, <a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a> byteOrder) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write value to a data buffer.  <a href="#106239c4587a27ce53b6a59b63d7b348"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0ecd1ddb8a013243c266300cb7f34647"></a><!-- doxytag: member="Exiv2::ValueType::count" ref="0ecd1ddb8a013243c266300cb7f34647" args="() const " -->
virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#0ecd1ddb8a013243c266300cb7f34647">count</a> () const </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="db029a314e342525bf6a5e3132cd5848"></a><!-- doxytag: member="Exiv2::ValueType::size" ref="db029a314e342525bf6a5e3132cd5848" args="() const " -->
virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#db029a314e342525bf6a5e3132cd5848">size</a> () const </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="b96e357d3c5dee6cab416cafa8da7e4a"></a><!-- doxytag: member="Exiv2::ValueType::write" ref="b96e357d3c5dee6cab416cafa8da7e4a" args="(std::ostream &amp;os) const " -->
virtual std::ostream &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#b96e357d3c5dee6cab416cafa8da7e4a">write</a> (std::ostream &amp;os) const </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" title="Output operator for Value types.">operator&lt;&lt;(std::ostream &amp;os, const Value &amp;value)</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d00be1b465398f9187296d1cd8462601"></a><!-- doxytag: member="Exiv2::ValueType::toString" ref="d00be1b465398f9187296d1cd8462601" args="(long n) const " -->
virtual std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#d00be1b465398f9187296d1cd8462601">toString</a> (long n) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the <em>n</em>-th component of the value as a string. The behaviour of this method may be undefined if there is no <em>n</em>-th component. <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_1ValueType.html#3dea33fa6bb1b9d3bdd1d0a05f0abad0">toLong</a> (long n=0) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the <em>n</em>-th component of the value to a long. The behaviour of this method may be undefined if there is no <em>n</em>-th component.  <a href="#3dea33fa6bb1b9d3bdd1d0a05f0abad0"></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_1ValueType.html#550fc71135aa8491fa7a90f0f682c94d">toFloat</a> (long n=0) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the <em>n</em>-th component of the value to a float. The behaviour of this method may be undefined if there is no <em>n</em>-th component.  <a href="#550fc71135aa8491fa7a90f0f682c94d"></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_1ValueType.html#20632832dbb186f6ad287456c1b6b92b">toRational</a> (long n=0) const </td></tr>

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

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the size of the data area. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b30d2836320975c3ad60312bf0a5133d"></a><!-- doxytag: member="Exiv2::ValueType::dataArea" ref="b30d2836320975c3ad60312bf0a5133d" args="() const " -->
virtual <a class="el" href="classExiv2_1_1DataBuf.html">DataBuf</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#b30d2836320975c3ad60312bf0a5133d">dataArea</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a copy of the data area in a <a class="el" href="classExiv2_1_1DataBuf.html" title="Utility class containing a character array. All it does is to take care of memory...">DataBuf</a>. The caller owns this copy and <a class="el" href="classExiv2_1_1DataBuf.html" title="Utility class containing a character array. All it does is to take care of memory...">DataBuf</a> ensures that it will be deleted. <br></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e5daa362d42b7b728cf795258650a35c"></a><!-- doxytag: member="Exiv2::ValueType::value_" ref="e5daa362d42b7b728cf795258650a35c" args="" -->
<a class="el" href="classExiv2_1_1ValueType.html#88ed5f3e8f59a9cf00eee8c6027e9f87">ValueList</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExiv2_1_1ValueType.html#e5daa362d42b7b728cf795258650a35c">value_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The container for all values. In your application, if you know what subclass of <a class="el" href="classExiv2_1_1Value.html" title="Common interface for all types of values used with metadata.">Value</a> you're dealing with (and possibly the T) then you can access this STL container through the usual standard library functions. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;typename T&gt;<br>
 class Exiv2::ValueType&lt; T &gt;</h3>

Template for a Value of a basic type. This is used for unsigned and signed short, long and rationals. <dl compact><dt><b>Examples: </b></dt><dd>

<p>
<a class="el" href="addmoddel_8cpp-example.html#_a7">addmoddel.cpp</a>.</dl><hr><h2>Member Function Documentation</h2>
<a class="anchor" name="106239c4587a27ce53b6a59b63d7b348"></a><!-- doxytag: member="Exiv2::ValueType::copy" ref="106239c4587a27ce53b6a59b63d7b348" args="(byte *buf, ByteOrder byteOrder) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">long <a class="el" href="classExiv2_1_1ValueType.html">Exiv2::ValueType</a>&lt; T &gt;::copy           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a>&nbsp;</td>
          <td class="paramname"> <em>byteOrder</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<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 class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes written. </dd></dl>

<p>Implements <a class="el" href="classExiv2_1_1Value.html#3bf4f9c2eda4f7850a390de98668ce15">Exiv2::Value</a>.</p>

<p>References <a class="el" href="namespaceExiv2.html#355a8786cb561ae78b899fc548ed2cf2">Exiv2::toData()</a>, and <a class="el" href="value_8hpp_source.html#l01281">Exiv2::ValueType&lt; T &gt;::value_</a>.</p>

</div>
</div><p>
<a class="anchor" name="725c88fdf395b0dba55c13794b458b69"></a><!-- doxytag: member="Exiv2::ValueType::read" ref="725c88fdf395b0dba55c13794b458b69" args="(const byte *buf, long len, ByteOrder byteOrder)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classExiv2_1_1ValueType.html">Exiv2::ValueType</a>&lt; T &gt;::read           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceExiv2.html#16f60a5bd4207fe155f6cf93a15efa72">byte</a> *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceExiv2.html#94c225faf6d6c611a3828fae1c28efa6">ByteOrder</a>&nbsp;</td>
          <td class="paramname"> <em>byteOrder</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<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 class="return" compact><dt><b>Returns:</b></dt><dd>0 if successful. </dd></dl>

<p>Implements <a class="el" href="classExiv2_1_1Value.html#cc8870f802ebcdf9d4e081816ad8956e">Exiv2::Value</a>.</p>

<p>References <a class="el" href="value_8hpp_source.html#l00115">Exiv2::Value::typeId()</a>, <a class="el" href="types_8cpp_source.html#l00122">Exiv2::TypeInfo::typeSize()</a>, and <a class="el" href="value_8hpp_source.html#l01281">Exiv2::ValueType&lt; T &gt;::value_</a>.</p>

<p>Referenced by <a class="el" href="value_8hpp_source.html#l01428">Exiv2::ValueType&lt; T &gt;::ValueType()</a>.</p>

</div>
</div><p>
<a class="anchor" name="097236490b3429142afc60b6f636f144"></a><!-- doxytag: member="Exiv2::ValueType::toFloat" ref="097236490b3429142afc60b6f636f144" args="(long n) const" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">float <a class="el" href="classExiv2_1_1ValueType.html">Exiv2::ValueType</a>&lt; <a class="el" href="namespaceExiv2.html#edcaa9af0563cbd00a19b040d5aa7a70">URational</a> &gt;::toFloat           </td>
          <td>(</td>
          <td class="paramtype">long&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Implements <a class="el" href="classExiv2_1_1Value.html#22d257caa6c1ffe6416ce02de7bd8c1c">Exiv2::Value</a>.</p>

<p>References <a class="el" href="value_8hpp_source.html#l00247">Exiv2::Value::ok_</a>, and <a class="el" href="value_8hpp_source.html#l01281">Exiv2::ValueType&lt; T &gt;::value_</a>.</p>

</div>
</div><p>
<a class="anchor" name="c68f4ac5e10a14ca84bbc9bef0f07cbf"></a><!-- doxytag: member="Exiv2::ValueType::toFloat" ref="c68f4ac5e10a14ca84bbc9bef0f07cbf" args="(long n) const" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">float <a class="el" href="classExiv2_1_1ValueType.html">Exiv2::ValueType</a>&lt; <a class="el" href="namespaceExiv2.html#95756f3f7fa19103f83addf5fa088a30">Rational</a> &gt;::toFloat           </td>
          <td>(</td>
          <td class="paramtype">long&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Implements <a class="el" href="classExiv2_1_1Value.html#22d257caa6c1ffe6416ce02de7bd8c1c">Exiv2::Value</a>.</p>

<p>References <a class="el" href="value_8hpp_source.html#l00247">Exiv2::Value::ok_</a>, and <a class="el" href="value_8hpp_source.html#l01281">Exiv2::ValueType&lt; T &gt;::value_</a>.</p>

</div>
</div><p>
<a class="anchor" name="550fc71135aa8491fa7a90f0f682c94d"></a><!-- doxytag: member="Exiv2::ValueType::toFloat" ref="550fc71135aa8491fa7a90f0f682c94d" args="(long n=0) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">float <a class="el" href="classExiv2_1_1ValueType.html">Exiv2::ValueType</a>&lt; T &gt;::toFloat           </td>
          <td>(</td>
          <td class="paramtype">long&nbsp;</td>
          <td class="paramname"> <em>n</em> = <code>0</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Implements <a class="el" href="classExiv2_1_1Value.html#22d257caa6c1ffe6416ce02de7bd8c1c">Exiv2::Value</a>.</p>

<p>References <a class="el" href="value_8hpp_source.html#l00247">Exiv2::Value::ok_</a>, and <a class="el" href="value_8hpp_source.html#l01281">Exiv2::ValueType&lt; T &gt;::value_</a>.</p>

</div>
</div><p>
<a class="anchor" name="fb8127ff26531236ff5a75232dcc0d84"></a><!-- doxytag: member="Exiv2::ValueType::toLong" ref="fb8127ff26531236ff5a75232dcc0d84" args="(long n) const" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">long <a class="el" href="classExiv2_1_1ValueType.html">Exiv2::ValueType</a>&lt; <a class="el" href="namespaceExiv2.html#edcaa9af0563cbd00a19b040d5aa7a70">URational</a> &gt;::toLong           </td>
          <td>(</td>
          <td class="paramtype">long&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Implements <a class="el" href="classExiv2_1_1Value.html#4530a3fc3e2305cf994de5476f46f953">Exiv2::Value</a>.</p>

<p>References <a class="el" href="value_8hpp_source.html#l00247">Exiv2::Value::ok_</a>, and <a class="el" href="value_8hpp_source.html#l01281">Exiv2::ValueType&lt; T &gt;::value_</a>.</p>

</div>
</div><p>
<a class="anchor" name="4302aa0e8dee770c7265ed8e1fccb07c"></a><!-- doxytag: member="Exiv2::ValueType::toLong" ref="4302aa0e8dee770c7265ed8e1fccb07c" args="(long n) const" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">long <a class="el" href="classExiv2_1_1ValueType.html">Exiv2::ValueType</a>&lt; <a class="el" href="namespaceExiv2.html#95756f3f7fa19103f83addf5fa088a30">Rational</a> &gt;::toLong           </td>
          <td>(</td>
          <td class="paramtype">long&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Implements <a class="el" href="classExiv2_1_1Value.html#4530a3fc3e2305cf994de5476f46f953">Exiv2::Value</a>.</p>

<p>References <a class="el" href="value_8hpp_source.html#l00247">Exiv2::Value::ok_</a>, and <a class="el" href="value_8hpp_source.html#l01281">Exiv2::ValueType&lt; T &gt;::value_</a>.</p>

</div>
</div><p>
<a class="anchor" name="3dea33fa6bb1b9d3bdd1d0a05f0abad0"></a><!-- doxytag: member="Exiv2::ValueType::toLong" ref="3dea33fa6bb1b9d3bdd1d0a05f0abad0" args="(long n=0) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">long <a class="el" href="classExiv2_1_1ValueType.html">Exiv2::ValueType</a>&lt; T &gt;::toLong           </td>
          <td>(</td>
          <td class="paramtype">long&nbsp;</td>
          <td class="paramname"> <em>n</em> = <code>0</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Implements <a class="el" href="classExiv2_1_1Value.html#4530a3fc3e2305cf994de5476f46f953">Exiv2::Value</a>.</p>

<p>References <a class="el" href="value_8hpp_source.html#l00247">Exiv2::Value::ok_</a>, and <a class="el" href="value_8hpp_source.html#l01281">Exiv2::ValueType&lt; T &gt;::value_</a>.</p>

</div>
</div><p>
<a class="anchor" name="856a6e80a914e0bbd82dcbdc3f82d24b"></a><!-- doxytag: member="Exiv2::ValueType::toRational" ref="856a6e80a914e0bbd82dcbdc3f82d24b" args="(long n) const" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceExiv2.html#95756f3f7fa19103f83addf5fa088a30">Rational</a> <a class="el" href="classExiv2_1_1ValueType.html">Exiv2::ValueType</a>&lt; <a class="el" href="namespaceExiv2.html#edcaa9af0563cbd00a19b040d5aa7a70">URational</a> &gt;::toRational           </td>
          <td>(</td>
          <td class="paramtype">long&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Implements <a class="el" href="classExiv2_1_1Value.html#595a4cb549bec8c19d290ca3e95a2678">Exiv2::Value</a>.</p>

<p>References <a class="el" href="value_8hpp_source.html#l00247">Exiv2::Value::ok_</a>, and <a class="el" href="value_8hpp_source.html#l01281">Exiv2::ValueType&lt; T &gt;::value_</a>.</p>

</div>
</div><p>
<a class="anchor" name="006d9f9f1ce12f26e14c19dd3ecb3f1f"></a><!-- doxytag: member="Exiv2::ValueType::toRational" ref="006d9f9f1ce12f26e14c19dd3ecb3f1f" args="(long n) const" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceExiv2.html#95756f3f7fa19103f83addf5fa088a30">Rational</a> <a class="el" href="classExiv2_1_1ValueType.html">Exiv2::ValueType</a>&lt; <a class="el" href="namespaceExiv2.html#95756f3f7fa19103f83addf5fa088a30">Rational</a> &gt;::toRational           </td>
          <td>(</td>
          <td class="paramtype">long&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Implements <a class="el" href="classExiv2_1_1Value.html#595a4cb549bec8c19d290ca3e95a2678">Exiv2::Value</a>.</p>

<p>References <a class="el" href="value_8hpp_source.html#l00247">Exiv2::Value::ok_</a>, and <a class="el" href="value_8hpp_source.html#l01281">Exiv2::ValueType&lt; T &gt;::value_</a>.</p>

</div>
</div><p>
<a class="anchor" name="20632832dbb186f6ad287456c1b6b92b"></a><!-- doxytag: member="Exiv2::ValueType::toRational" ref="20632832dbb186f6ad287456c1b6b92b" args="(long n=0) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceExiv2.html#95756f3f7fa19103f83addf5fa088a30">Rational</a> <a class="el" href="classExiv2_1_1ValueType.html">Exiv2::ValueType</a>&lt; T &gt;::toRational           </td>
          <td>(</td>
          <td class="paramtype">long&nbsp;</td>
          <td class="paramname"> <em>n</em> = <code>0</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Implements <a class="el" href="classExiv2_1_1Value.html#595a4cb549bec8c19d290ca3e95a2678">Exiv2::Value</a>.</p>

<p>References <a class="el" href="value_8hpp_source.html#l00247">Exiv2::Value::ok_</a>, and <a class="el" href="value_8hpp_source.html#l01281">Exiv2::ValueType&lt; T &gt;::value_</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="value_8hpp.html">value.hpp</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 25 15:18:10 2009 for Exiv2 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>