Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 7392c77c84ff25edfeb07995a77d5148 > files > 211

steghide-0.5.1-11mdv2010.0.i586.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>steghide: SampleValue.h Source File</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="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>SampleValue.h</h1><a href="SampleValue_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * steghide 0.5.1 - a steganography program</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1999-2003 Stefan Hetzl &lt;shetzl@chello.at&gt;</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * This program is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment"> * modify it under the terms of the GNU General Public License</span>
<a name="l00007"></a>00007 <span class="comment"> * as published by the Free Software Foundation; either version 2</span>
<a name="l00008"></a>00008 <span class="comment"> * of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * This program is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00016"></a>00016 <span class="comment"> * along with this program; if not, write to the Free Software</span>
<a name="l00017"></a>00017 <span class="comment"> * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.</span>
<a name="l00018"></a>00018 <span class="comment"> *</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef SH_SAMPLEVALUE_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define SH_SAMPLEVALUE_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;functional&gt;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="common_8h.html">common.h</a>"</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="wrapper__hash__set_8h.html">wrapper_hash_set.h</a>"</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="keyword">class </span><a class="code" href="classCvrStgFile.html" title="a cover-/stego-file">CvrStgFile</a> ;
<a name="l00030"></a>00030 
<a name="l00061"></a><a class="code" href="classSampleValue.html">00061</a> <span class="keyword">class </span><a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a> {
<a name="l00062"></a>00062         <span class="keyword">public</span>:
<a name="l00063"></a>00063         <a class="code" href="classSampleValue.html#74c75452d43690d940d9ca5d8b64da27">SampleValue</a> (<span class="keywordtype">void</span>) ;
<a name="l00064"></a>00064 
<a name="l00065"></a>00065         <span class="keyword">virtual</span> <a class="code" href="classSampleValue.html#7e51c7f758b83d354bdb6d3e9502934e">~SampleValue</a> (<span class="keywordtype">void</span>) ;
<a name="l00066"></a>00066 
<a name="l00077"></a>00077         <span class="keyword">virtual</span> <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a>* <a class="code" href="classSampleValue.html#eca3fc1fd34c09d2244706b010935c2c">getNearestTargetSampleValue</a> (<a class="code" href="common_8h.html#cf820202f81f25eb00734eac0d7aed2d">EmbValue</a> t) <span class="keyword">const</span> = 0 ;
<a name="l00078"></a>00078 
<a name="l00084"></a>00084         <span class="keyword">virtual</span> <a class="code" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> <a class="code" href="classSampleValue.html#a7e5d9b69203f6f6edf97c79319232dd">calcDistance</a> (<span class="keyword">const</span> <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a> *s) <span class="keyword">const</span> = 0 ;
<a name="l00085"></a>00085 
<a name="l00089"></a>00089         <span class="keyword">virtual</span> std::string <a class="code" href="classSampleValue.html#eaf5c46ec6d023840e9773604b20d25c">getName</a> (<span class="keywordtype">void</span>) <span class="keyword">const</span> = 0 ;
<a name="l00090"></a>00090 
<a name="l00098"></a>00098         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classSampleValue.html#80e6ab34112c3829385b4bf4b14d0401">isNeighbour</a> (<span class="keyword">const</span> <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a>* s) <span class="keyword">const</span> ;
<a name="l00099"></a>00099 
<a name="l00104"></a><a class="code" href="classSampleValue.html#ce091469343754f11af43be63202ab79">00104</a>         <a class="code" href="common_8h.html#cf820202f81f25eb00734eac0d7aed2d">EmbValue</a> <a class="code" href="classSampleValue.html#ce091469343754f11af43be63202ab79">getEmbeddedValue</a> (<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00105"></a>00105 <span class="keyword">                </span>{ <span class="keywordflow">return</span> <a class="code" href="classSampleValue.html#0dcaf6e226df96e9caab87aa933f9f19" title="the bit that is embedded in this sample value - must be set in constructor of derived...">EValue</a> ; } ;
<a name="l00106"></a>00106 
<a name="l00111"></a><a class="code" href="classSampleValue.html#3961e8e390a5bd2cafa64171b78f5698">00111</a>         <a class="code" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> <a class="code" href="classSampleValue.html#3961e8e390a5bd2cafa64171b78f5698">getKey</a> (<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00112"></a>00112 <span class="keyword">                </span>{ <span class="keywordflow">return</span> <a class="code" href="classSampleValue.html#10e075aea7ba428d0c76549423d8efe2" title="the key of this sample value - must be different for two different sample values...">Key</a> ; } ;
<a name="l00113"></a>00113 
<a name="l00117"></a><a class="code" href="classSampleValue.html#f0505a36a5072d8fea8b92fe97d7029a">00117</a>         <span class="keywordtype">bool</span> <a class="code" href="classSampleValue.html#f0505a36a5072d8fea8b92fe97d7029a">operator== </a>(<span class="keyword">const</span> <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a>&amp; sv)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (<a class="code" href="classSampleValue.html#3961e8e390a5bd2cafa64171b78f5698">getKey</a>() == sv.<a class="code" href="classSampleValue.html#3961e8e390a5bd2cafa64171b78f5698">getKey</a>()) ; } ;
<a name="l00118"></a><a class="code" href="classSampleValue.html#268b910b1c16916363549180fa3a6648">00118</a>         <span class="keywordtype">bool</span> <a class="code" href="classSampleValue.html#268b910b1c16916363549180fa3a6648">operator!= </a>(<span class="keyword">const</span> <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a>&amp; sv)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (<a class="code" href="classSampleValue.html#3961e8e390a5bd2cafa64171b78f5698">getKey</a>() != sv.<a class="code" href="classSampleValue.html#3961e8e390a5bd2cafa64171b78f5698">getKey</a>()) ; } ;
<a name="l00119"></a>00119 
<a name="l00120"></a><a class="code" href="classSampleValue.html#3a4fc17df81bfb17a16ca3a06c6f12c8">00120</a>         <span class="keywordtype">bool</span> <a class="code" href="classSampleValue.html#3a4fc17df81bfb17a16ca3a06c6f12c8">operator&lt; </a>(<span class="keyword">const</span> <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a>&amp; sv)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (<a class="code" href="classSampleValue.html#3961e8e390a5bd2cafa64171b78f5698">getKey</a>() &lt; sv.<a class="code" href="classSampleValue.html#3961e8e390a5bd2cafa64171b78f5698">getKey</a>()) ; } ;
<a name="l00121"></a>00121 
<a name="l00122"></a><a class="code" href="classSampleValue.html#53c3804f4551d19046c0b113387bc518">00122</a>         <a class="code" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> <a class="code" href="classSampleValue.html#53c3804f4551d19046c0b113387bc518">getNumEdges</a> (<a class="code" href="common_8h.html#cf820202f81f25eb00734eac0d7aed2d">EmbValue</a> t)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classSampleValue.html#bcc2fdc624ecf5fb143d268ccb1c0f87">NumEdges</a>[t] ; } ;
<a name="l00123"></a><a class="code" href="classSampleValue.html#576da5dade60d82b0d00373fac218b8f">00123</a>         <span class="keywordtype">void</span> <a class="code" href="classSampleValue.html#576da5dade60d82b0d00373fac218b8f">setNumEdges</a> (<a class="code" href="common_8h.html#cf820202f81f25eb00734eac0d7aed2d">EmbValue</a> t, <a class="code" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> ne) { <a class="code" href="classSampleValue.html#bcc2fdc624ecf5fb143d268ccb1c0f87">NumEdges</a>[t] = ne ; } ;
<a name="l00124"></a>00124         <span class="keywordtype">void</span> <a class="code" href="classSampleValue.html#7cda8c5bb0b8689764c80582dcbd145f">incNumEdges</a> (<a class="code" href="common_8h.html#cf820202f81f25eb00734eac0d7aed2d">EmbValue</a> t) ;
<a name="l00125"></a>00125         <span class="keywordtype">void</span> <a class="code" href="classSampleValue.html#469706163142f053d9e10585a72c9322">decNumEdges</a> (<a class="code" href="common_8h.html#cf820202f81f25eb00734eac0d7aed2d">EmbValue</a> t) ;
<a name="l00126"></a>00126 
<a name="l00127"></a><a class="code" href="classSampleValue.html#a05c5d32ce2e4c9f27e894d9df51bf19">00127</a>         <span class="keywordtype">void</span> <a class="code" href="classSampleValue.html#a05c5d32ce2e4c9f27e894d9df51bf19">setLabel</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> l) { <a class="code" href="classSampleValue.html#2702bee2b3636a57d92c779e31c038aa">Label</a> = l ; } ;
<a name="l00128"></a><a class="code" href="classSampleValue.html#bb1332fa92702da1d32eac1a6bb1fc94">00128</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classSampleValue.html#bb1332fa92702da1d32eac1a6bb1fc94">getLabel</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classSampleValue.html#2702bee2b3636a57d92c779e31c038aa">Label</a> ; } ;
<a name="l00129"></a>00129 
<a name="l00130"></a>00130         <span class="keywordtype">void</span> <a class="code" href="classSampleValue.html#bce524205204b1bf08df60585354b216">print</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> spc = 0) <span class="keyword">const</span> ;
<a name="l00131"></a>00131 
<a name="l00132"></a>00132         <span class="keyword">protected</span>:
<a name="l00134"></a><a class="code" href="classSampleValue.html#0dcaf6e226df96e9caab87aa933f9f19">00134</a>         <a class="code" href="common_8h.html#cf820202f81f25eb00734eac0d7aed2d">EmbValue</a> <a class="code" href="classSampleValue.html#0dcaf6e226df96e9caab87aa933f9f19" title="the bit that is embedded in this sample value - must be set in constructor of derived...">EValue</a> ;
<a name="l00135"></a>00135 
<a name="l00137"></a><a class="code" href="classSampleValue.html#10e075aea7ba428d0c76549423d8efe2">00137</a>         <a class="code" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> <a class="code" href="classSampleValue.html#10e075aea7ba428d0c76549423d8efe2" title="the key of this sample value - must be different for two different sample values...">Key</a> ;
<a name="l00138"></a>00138 
<a name="l00139"></a>00139         <span class="keyword">private</span>:
<a name="l00140"></a><a class="code" href="classSampleValue.html#2702bee2b3636a57d92c779e31c038aa">00140</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classSampleValue.html#2702bee2b3636a57d92c779e31c038aa">Label</a> ;
<a name="l00141"></a>00141 
<a name="l00146"></a><a class="code" href="classSampleValue.html#bcc2fdc624ecf5fb143d268ccb1c0f87">00146</a>         <a class="code" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a>* <a class="code" href="classSampleValue.html#bcc2fdc624ecf5fb143d268ccb1c0f87">NumEdges</a> ;
<a name="l00147"></a>00147 } ;
<a name="l00148"></a>00148 
<a name="l00149"></a><a class="code" href="structSampleValuesEqual.html">00149</a> <span class="keyword">struct </span><a class="code" href="structSampleValuesEqual.html">SampleValuesEqual</a> : <span class="keyword">public</span> std::binary_function&lt;SampleValue*, SampleValue*, bool&gt; {
<a name="l00150"></a><a class="code" href="structSampleValuesEqual.html#a8b324307125dfab4e842d27d26308e1">00150</a>         <span class="keywordtype">bool</span> <a class="code" href="structSampleValuesEqual.html#a8b324307125dfab4e842d27d26308e1">operator() </a>(<span class="keyword">const</span> <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a>* s1, <span class="keyword">const</span> <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a> *s2)<span class="keyword"> const</span>
<a name="l00151"></a>00151 <span class="keyword">        </span>{
<a name="l00152"></a>00152                 <span class="keywordflow">return</span> (*s1 == *s2) ;
<a name="l00153"></a>00153         }
<a name="l00154"></a>00154 } ;
<a name="l00155"></a>00155 
<a name="l00156"></a><a class="code" href="structSampleValuesLess.html">00156</a> <span class="keyword">struct </span><a class="code" href="structSampleValuesLess.html">SampleValuesLess</a> : <span class="keyword">public</span> std::binary_function&lt;SampleValue*, SampleValue*, bool&gt; {
<a name="l00157"></a><a class="code" href="structSampleValuesLess.html#50544ef959d5b2b1b2007f95cab75a1c">00157</a>         <span class="keywordtype">bool</span> <a class="code" href="structSampleValuesLess.html#50544ef959d5b2b1b2007f95cab75a1c">operator() </a>(<span class="keyword">const</span> <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a>* s1, <span class="keyword">const</span> <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a> *s2)<span class="keyword"> const</span>
<a name="l00158"></a>00158 <span class="keyword">        </span>{
<a name="l00159"></a>00159                 <span class="keywordflow">return</span> (*s1 &lt; *s2) ;
<a name="l00160"></a>00160         }
<a name="l00161"></a>00161 } ;
<a name="l00162"></a>00162 
<a name="l00163"></a><a class="code" href="structSampleValueHash.html">00163</a> <span class="keyword">struct </span><a class="code" href="structSampleValueHash.html">SampleValueHash</a> : <span class="keyword">public</span> std::unary_function&lt;SampleValue*,size_t&gt; {
<a name="l00164"></a><a class="code" href="structSampleValueHash.html#f36371c34fb74a44365a166f408b1c24">00164</a>         <span class="keywordtype">size_t</span> <a class="code" href="structSampleValueHash.html#f36371c34fb74a44365a166f408b1c24">operator() </a>(<span class="keyword">const</span> <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a>* s)<span class="keyword"> const</span>
<a name="l00165"></a>00165 <span class="keyword">        </span>{
<a name="l00166"></a>00166                 sgi::hash&lt;UWORD32&gt; h ;
<a name="l00167"></a>00167                 <span class="keywordflow">return</span> h(s-&gt;<a class="code" href="classSampleValue.html#3961e8e390a5bd2cafa64171b78f5698">getKey</a>()) ;
<a name="l00168"></a>00168         }
<a name="l00169"></a>00169 } ;
<a name="l00170"></a>00170 
<a name="l00171"></a>00171 <span class="preprocessor">#endif // ndef SH_CVRSTGSAMPLE_H</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Aug 17 10:58:29 2009 for steghide 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>