Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-release > by-pkgid > 1b812d1b0e765bcc0430721ff58676d2 > files > 254

libid3_3.8_3-devel-3.8.3-19.mga1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>id3lib: include/id3/io_strings.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="id3lib.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<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><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>include/id3/io_strings.h</h1><a href="io__strings_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- C++ -*-</span>
<a name="l00002"></a>00002 <span class="comment">// $Id: io_strings.h,v 1.6 2002/06/29 17:43:24 t1mpy Exp $</span>
<a name="l00003"></a>00003 
<a name="l00004"></a>00004 <span class="comment">// id3lib: a software library for creating and manipulating id3v1/v2 tags</span>
<a name="l00005"></a>00005 <span class="comment">// Copyright 1999, 2000  Scott Thomas Haug</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="comment">// This library is free software; you can redistribute it and/or modify it</span>
<a name="l00008"></a>00008 <span class="comment">// under the terms of the GNU Library General Public License as published by</span>
<a name="l00009"></a>00009 <span class="comment">// the Free Software Foundation; either version 2 of the License, or (at your</span>
<a name="l00010"></a>00010 <span class="comment">// option) any later version.</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// This library is distributed in the hope that it will be useful, but WITHOUT</span>
<a name="l00013"></a>00013 <span class="comment">// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or</span>
<a name="l00014"></a>00014 <span class="comment">// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public</span>
<a name="l00015"></a>00015 <span class="comment">// License for more details.</span>
<a name="l00016"></a>00016 <span class="comment">//</span>
<a name="l00017"></a>00017 <span class="comment">// You should have received a copy of the GNU Library General Public License</span>
<a name="l00018"></a>00018 <span class="comment">// along with this library; if not, write to the Free Software Foundation,</span>
<a name="l00019"></a>00019 <span class="comment">// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="comment">// The id3lib authors encourage improvements and optimisations to be sent to</span>
<a name="l00022"></a>00022 <span class="comment">// the id3lib coordinator.  Please see the README file for details on where to</span>
<a name="l00023"></a>00023 <span class="comment">// send such submissions.  See the AUTHORS file for a list of people who have</span>
<a name="l00024"></a>00024 <span class="comment">// contributed to id3lib.  See the ChangeLog file for a list of changes to</span>
<a name="l00025"></a>00025 <span class="comment">// id3lib.  These files are distributed with id3lib at</span>
<a name="l00026"></a>00026 <span class="comment">// http://download.sourceforge.net/id3lib/</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef _ID3LIB_IO_STRINGS_H_</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define _ID3LIB_IO_STRINGS_H_</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &quot;id3/id3lib_strings.h&quot;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &quot;<a class="code" href="reader_8h.html">reader.h</a>&quot;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &quot;<a class="code" href="writer_8h.html">writer.h</a>&quot;</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="preprocessor">#ifndef min</span>
<a name="l00036"></a><a class="code" href="io__strings_8h.html#ac6afabdc09a49a433ee19d8a9486056d">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define min(a,b)            (((a) &lt; (b)) ? (a) : (b))</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 <span class="keyword">namespace </span>dami
<a name="l00040"></a>00040 {
<a name="l00041"></a>00041   <span class="keyword">namespace </span>io
<a name="l00042"></a>00042   {
<a name="l00043"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html">00043</a>     <span class="keyword">class </span><a class="code" href="globals_8h.html#aa7668e1ebc5c8b89aef71dd98e547f77">ID3_CPP_EXPORT</a> <a class="code" href="classdami_1_1io_1_1_string_reader.html">StringReader</a> : <span class="keyword">public</span> <a class="code" href="class_i_d3___reader.html">ID3_Reader</a>
<a name="l00044"></a>00044     {
<a name="l00045"></a>00045       <span class="keyword">const</span> String&amp;  _string;
<a name="l00046"></a>00046       pos_type _cur;
<a name="l00047"></a>00047      <span class="keyword">public</span>:
<a name="l00048"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html#a7f38c4633047a4c3358296ba903f49d2">00048</a>       <a class="code" href="classdami_1_1io_1_1_string_reader.html#a7f38c4633047a4c3358296ba903f49d2">StringReader</a>(<span class="keyword">const</span> String&amp; <span class="keywordtype">string</span>) : _string(string), _cur(0) { ; }
<a name="l00049"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html#a1b66f4d07b57b4f944ee6c078641927f">00049</a>       <span class="keyword">virtual</span> <a class="code" href="classdami_1_1io_1_1_string_reader.html#a1b66f4d07b57b4f944ee6c078641927f">~StringReader</a>() { ; }
<a name="l00050"></a>00050 
<a name="l00051"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html#a480b2bb84bd3f8f91f96193d505f8d1a">00051</a>       <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdami_1_1io_1_1_string_reader.html#a480b2bb84bd3f8f91f96193d505f8d1a" title="Close the reader.">close</a>() { ; }
<a name="l00052"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html#a637bc7bdcc28ffbd1cf477eb9b1f6372">00052</a>       <span class="keyword">virtual</span> int_type peekChar() 
<a name="l00053"></a>00053       { 
<a name="l00054"></a>00054         <span class="keywordflow">if</span> (!this-&gt;atEnd())
<a name="l00055"></a>00055         {
<a name="l00056"></a>00056           <span class="keywordflow">return</span> _string[_cur];
<a name="l00057"></a>00057         }
<a name="l00058"></a>00058         <span class="keywordflow">return</span> END_OF_READER;
<a name="l00059"></a>00059       }
<a name="l00060"></a>00060     
<a name="l00064"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html#a3aab42e984c5100b188c2ed778d3479a">00064</a>       size_type readChars(<span class="keywordtype">char</span> buf[], size_type len)
<a name="l00065"></a>00065       { 
<a name="l00066"></a>00066         <span class="keywordflow">return</span> this-&gt;readChars((char_type*) buf, len); 
<a name="l00067"></a>00067       }
<a name="l00068"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html#a53cb39d04003d3fb183c3c6dbcf36bef">00068</a>       <span class="keyword">virtual</span> size_type readChars(char_type buf[], size_type len)
<a name="l00069"></a>00069       {
<a name="l00070"></a>00070         size_type size = <a class="code" href="io__strings_8h.html#ac6afabdc09a49a433ee19d8a9486056d">min</a>((<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)len, (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)(_string.size() - _cur));
<a name="l00071"></a>00071         _string.copy(reinterpret_cast&lt;String::value_type *&gt;(buf), size, _cur);
<a name="l00072"></a>00072         _cur += size;
<a name="l00073"></a>00073         <span class="keywordflow">return</span> size;
<a name="l00074"></a>00074       }
<a name="l00075"></a>00075       
<a name="l00076"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html#ae86180e7303f716f266b82c452f54295">00076</a>       <span class="keyword">virtual</span> pos_type getCur() 
<a name="l00077"></a>00077       { 
<a name="l00078"></a>00078         <span class="keywordflow">return</span> _cur;
<a name="l00079"></a>00079       }
<a name="l00080"></a>00080       
<a name="l00081"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html#a5a1f77fb8b11d7a03f57bbbbf9b380a0">00081</a>       <span class="keyword">virtual</span> pos_type getBeg()
<a name="l00082"></a>00082       {
<a name="l00083"></a>00083         <span class="keywordflow">return</span> 0;
<a name="l00084"></a>00084       }
<a name="l00085"></a>00085       
<a name="l00086"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html#a00fa814f72eb17203ca8cea32488344b">00086</a>       <span class="keyword">virtual</span> pos_type getEnd()
<a name="l00087"></a>00087       {
<a name="l00088"></a>00088         <span class="keywordflow">return</span> _string.size();
<a name="l00089"></a>00089       }
<a name="l00090"></a>00090       
<a name="l00093"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html#adf0d020335b8fe17be8ec389c3b58887">00093</a>       <span class="keyword">virtual</span> pos_type setCur(pos_type pos)
<a name="l00094"></a>00094       {
<a name="l00095"></a>00095         pos_type end = this-&gt;getEnd();
<a name="l00096"></a>00096         _cur = (pos &lt; end) ? pos : end;
<a name="l00097"></a>00097         <span class="keywordflow">return</span> _cur;
<a name="l00098"></a>00098       }
<a name="l00099"></a>00099 
<a name="l00100"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html#ad95d93f4869e06b00f3d2728648391dd">00100</a>       <span class="keyword">virtual</span> <span class="keywordtype">bool</span> atEnd()
<a name="l00101"></a>00101       {
<a name="l00102"></a>00102         <span class="keywordflow">return</span> _cur &gt;= _string.size();
<a name="l00103"></a>00103       }
<a name="l00104"></a>00104 
<a name="l00105"></a><a class="code" href="classdami_1_1io_1_1_string_reader.html#a076b42bba659763cabe683ee05878207">00105</a>       <span class="keyword">virtual</span> size_type skipChars(size_type len)
<a name="l00106"></a>00106       {
<a name="l00107"></a>00107         size_type size = <a class="code" href="io__strings_8h.html#ac6afabdc09a49a433ee19d8a9486056d">min</a>((<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)len, (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)(_string.size() - _cur));
<a name="l00108"></a>00108         _cur += size;
<a name="l00109"></a>00109         <span class="keywordflow">return</span> size;
<a name="l00110"></a>00110       }
<a name="l00111"></a>00111     };
<a name="l00112"></a>00112 
<a name="l00113"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html">00113</a>     <span class="keyword">class </span><a class="code" href="globals_8h.html#aa7668e1ebc5c8b89aef71dd98e547f77">ID3_CPP_EXPORT</a> <a class="code" href="classdami_1_1io_1_1_b_string_reader.html">BStringReader</a> : <span class="keyword">public</span> <a class="code" href="class_i_d3___reader.html">ID3_Reader</a>
<a name="l00114"></a>00114     {
<a name="l00115"></a>00115       <span class="keyword">const</span> BString&amp;  _string;
<a name="l00116"></a>00116       pos_type _cur;
<a name="l00117"></a>00117      <span class="keyword">public</span>:
<a name="l00118"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html#a3724addfd2ad6a211d97f985f2d199b1">00118</a>       <a class="code" href="classdami_1_1io_1_1_b_string_reader.html#a3724addfd2ad6a211d97f985f2d199b1">BStringReader</a>(<span class="keyword">const</span> BString&amp; <span class="keywordtype">string</span>) : _string(string), _cur(0) { ; }
<a name="l00119"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html#a8873402f0866488f68205eb621649b81">00119</a>       <span class="keyword">virtual</span> <a class="code" href="classdami_1_1io_1_1_b_string_reader.html#a8873402f0866488f68205eb621649b81">~BStringReader</a>() { ; }
<a name="l00120"></a>00120 
<a name="l00121"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html#ad367300b29efcf056e6083bdd0c38078">00121</a>       <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdami_1_1io_1_1_b_string_reader.html#ad367300b29efcf056e6083bdd0c38078" title="Close the reader.">close</a>() { ; }
<a name="l00122"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html#a4b53e9ee26d246fefcee429ce2410395">00122</a>       <span class="keyword">virtual</span> int_type peekChar() 
<a name="l00123"></a>00123       { 
<a name="l00124"></a>00124         <span class="keywordflow">if</span> (!this-&gt;atEnd())
<a name="l00125"></a>00125         {
<a name="l00126"></a>00126           <span class="keywordflow">return</span> _string[_cur];
<a name="l00127"></a>00127         }
<a name="l00128"></a>00128         <span class="keywordflow">return</span> END_OF_READER;
<a name="l00129"></a>00129       }
<a name="l00130"></a>00130     
<a name="l00134"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html#a88cb48ad4e07ab8f73701cc636178abb">00134</a>       size_type readChars(<span class="keywordtype">char</span> buf[], size_type len)
<a name="l00135"></a>00135       { 
<a name="l00136"></a>00136         <span class="keywordflow">return</span> this-&gt;readChars((char_type*) buf, len); 
<a name="l00137"></a>00137       }
<a name="l00138"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html#afaa63975eefe0c9d2b36701e1518fa08">00138</a>       <span class="keyword">virtual</span> size_type readChars(char_type buf[], size_type len)
<a name="l00139"></a>00139       {
<a name="l00140"></a>00140         size_type size = <a class="code" href="io__strings_8h.html#ac6afabdc09a49a433ee19d8a9486056d">min</a>((<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)len, (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)(_string.size() - _cur));
<a name="l00141"></a>00141         _string.copy(reinterpret_cast&lt;BString::value_type *&gt;(buf), size, _cur);
<a name="l00142"></a>00142         _cur += size;
<a name="l00143"></a>00143         <span class="keywordflow">return</span> size;
<a name="l00144"></a>00144       }
<a name="l00145"></a>00145       
<a name="l00146"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html#a2e014f10b417bae910b142566c22c789">00146</a>       <span class="keyword">virtual</span> pos_type getCur() 
<a name="l00147"></a>00147       { 
<a name="l00148"></a>00148         <span class="keywordflow">return</span> _cur;
<a name="l00149"></a>00149       }
<a name="l00150"></a>00150       
<a name="l00151"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html#aa987da926eaa8f6bcaa72b46a0cca210">00151</a>       <span class="keyword">virtual</span> pos_type getBeg()
<a name="l00152"></a>00152       {
<a name="l00153"></a>00153         <span class="keywordflow">return</span> 0;
<a name="l00154"></a>00154       }
<a name="l00155"></a>00155       
<a name="l00156"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html#a363d6699fc180d6b7d3be05b9d12df28">00156</a>       <span class="keyword">virtual</span> pos_type getEnd()
<a name="l00157"></a>00157       {
<a name="l00158"></a>00158         <span class="keywordflow">return</span> _string.size();
<a name="l00159"></a>00159       }
<a name="l00160"></a>00160       
<a name="l00163"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html#a81779fc41ccaeaf384c5103898ad197d">00163</a>       <span class="keyword">virtual</span> pos_type setCur(pos_type pos)
<a name="l00164"></a>00164       {
<a name="l00165"></a>00165         pos_type end = this-&gt;getEnd();
<a name="l00166"></a>00166         _cur = (pos &lt; end) ? pos : end;
<a name="l00167"></a>00167         <span class="keywordflow">return</span> _cur;
<a name="l00168"></a>00168       }
<a name="l00169"></a>00169 
<a name="l00170"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html#acbed4dc7e5a0635a0f1ac183c5b358b3">00170</a>       <span class="keyword">virtual</span> <span class="keywordtype">bool</span> atEnd()
<a name="l00171"></a>00171       {
<a name="l00172"></a>00172         <span class="keywordflow">return</span> _cur &gt;= _string.size();
<a name="l00173"></a>00173       }
<a name="l00174"></a>00174 
<a name="l00175"></a><a class="code" href="classdami_1_1io_1_1_b_string_reader.html#ac66a193d7fa0ea263c1d5510189d74a4">00175</a>       <span class="keyword">virtual</span> size_type skipChars(size_type len)
<a name="l00176"></a>00176       {
<a name="l00177"></a>00177         size_type size = <a class="code" href="io__strings_8h.html#ac6afabdc09a49a433ee19d8a9486056d">min</a>((<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)len,(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)( _string.size() - _cur));
<a name="l00178"></a>00178         _cur += size;
<a name="l00179"></a>00179         <span class="keywordflow">return</span> size;
<a name="l00180"></a>00180       }
<a name="l00181"></a>00181     };
<a name="l00182"></a>00182 
<a name="l00183"></a><a class="code" href="classdami_1_1io_1_1_string_writer.html">00183</a>     <span class="keyword">class </span><a class="code" href="globals_8h.html#aa7668e1ebc5c8b89aef71dd98e547f77">ID3_CPP_EXPORT</a> <a class="code" href="classdami_1_1io_1_1_string_writer.html">StringWriter</a> : <span class="keyword">public</span> <a class="code" href="class_i_d3___writer.html">ID3_Writer</a>
<a name="l00184"></a>00184     {
<a name="l00185"></a>00185       String&amp; _string;
<a name="l00186"></a>00186      <span class="keyword">public</span>:
<a name="l00187"></a><a class="code" href="classdami_1_1io_1_1_string_writer.html#adf1948699f0453aba0ee630b9990ed80">00187</a>       <a class="code" href="classdami_1_1io_1_1_string_writer.html#adf1948699f0453aba0ee630b9990ed80">StringWriter</a>(String&amp; <span class="keywordtype">string</span>) : _string(string) { ; }
<a name="l00188"></a><a class="code" href="classdami_1_1io_1_1_string_writer.html#a5c502b24afda962ed969b3a7370e1f44">00188</a>       <span class="keyword">virtual</span> <a class="code" href="classdami_1_1io_1_1_string_writer.html#a5c502b24afda962ed969b3a7370e1f44">~StringWriter</a>() { ; }
<a name="l00189"></a>00189 
<a name="l00190"></a><a class="code" href="classdami_1_1io_1_1_string_writer.html#a71137a434fc9269e133792c18f1bb282">00190</a>       <span class="keywordtype">void</span> <a class="code" href="classdami_1_1io_1_1_string_writer.html#a71137a434fc9269e133792c18f1bb282" title="Close the writer.">close</a>() { ; }
<a name="l00191"></a><a class="code" href="classdami_1_1io_1_1_string_writer.html#a7cd1fded3273e5d588a9d47c3dbd2a41">00191</a>       <span class="keywordtype">void</span> <a class="code" href="classdami_1_1io_1_1_string_writer.html#a7cd1fded3273e5d588a9d47c3dbd2a41" title="Flush the writer.">flush</a>() { ; }
<a name="l00192"></a><a class="code" href="classdami_1_1io_1_1_string_writer.html#a943a350f32643c3c7fd24e93da777ec7">00192</a>       <span class="keyword">virtual</span> size_type writeChars(<span class="keyword">const</span> <span class="keywordtype">char</span> buf[], size_type len)
<a name="l00193"></a>00193       { 
<a name="l00194"></a>00194         _string.append(reinterpret_cast&lt;const String::value_type *&gt;(buf), len);
<a name="l00195"></a>00195         <span class="keywordflow">return</span> len;
<a name="l00196"></a>00196       }
<a name="l00197"></a><a class="code" href="classdami_1_1io_1_1_string_writer.html#a3c9fefc1e6520c0906e11befe4c9a7d7">00197</a>       size_type writeChars(<span class="keyword">const</span> char_type buf[], size_type len)
<a name="l00198"></a>00198       {
<a name="l00199"></a>00199         _string.append(reinterpret_cast&lt;const String::value_type *&gt;(buf), len);
<a name="l00200"></a>00200         <span class="keywordflow">return</span> len;
<a name="l00201"></a>00201       }
<a name="l00202"></a>00202 
<a name="l00203"></a><a class="code" href="classdami_1_1io_1_1_string_writer.html#accb4c24945b18fd214b45383a4328f0f">00203</a>       pos_type getCur()
<a name="l00204"></a>00204       {
<a name="l00205"></a>00205         <span class="keywordflow">return</span> _string.size();
<a name="l00206"></a>00206       }
<a name="l00207"></a>00207     };
<a name="l00208"></a>00208 
<a name="l00209"></a><a class="code" href="classdami_1_1io_1_1_b_string_writer.html">00209</a>     <span class="keyword">class </span><a class="code" href="globals_8h.html#aa7668e1ebc5c8b89aef71dd98e547f77">ID3_CPP_EXPORT</a> <a class="code" href="classdami_1_1io_1_1_b_string_writer.html">BStringWriter</a> : <span class="keyword">public</span> <a class="code" href="class_i_d3___writer.html">ID3_Writer</a>
<a name="l00210"></a>00210     {
<a name="l00211"></a>00211       BString&amp; _string;
<a name="l00212"></a>00212      <span class="keyword">public</span>:
<a name="l00213"></a><a class="code" href="classdami_1_1io_1_1_b_string_writer.html#a14890e0b4c6179584f65cb31816466b4">00213</a>       <a class="code" href="classdami_1_1io_1_1_b_string_writer.html#a14890e0b4c6179584f65cb31816466b4">BStringWriter</a>(BString&amp; <span class="keywordtype">string</span>) : _string(string) { ; }
<a name="l00214"></a><a class="code" href="classdami_1_1io_1_1_b_string_writer.html#adabcca274ebecc3462b860d043322424">00214</a>       <span class="keyword">virtual</span> <a class="code" href="classdami_1_1io_1_1_b_string_writer.html#adabcca274ebecc3462b860d043322424">~BStringWriter</a>() { ; }
<a name="l00215"></a>00215 
<a name="l00216"></a><a class="code" href="classdami_1_1io_1_1_b_string_writer.html#a4562093ab62aafa61eb3b3fce6f02232">00216</a>       <span class="keywordtype">void</span> <a class="code" href="classdami_1_1io_1_1_b_string_writer.html#a4562093ab62aafa61eb3b3fce6f02232" title="Close the writer.">close</a>() { ; }
<a name="l00217"></a><a class="code" href="classdami_1_1io_1_1_b_string_writer.html#a86d9e3066a3c0f78ab49568001826579">00217</a>       <span class="keywordtype">void</span> <a class="code" href="classdami_1_1io_1_1_b_string_writer.html#a86d9e3066a3c0f78ab49568001826579" title="Flush the writer.">flush</a>() { ; }
<a name="l00218"></a><a class="code" href="classdami_1_1io_1_1_b_string_writer.html#ac3261146f74d0c2b504e02761751b90b">00218</a>       <span class="keyword">virtual</span> size_type writeChars(<span class="keyword">const</span> <span class="keywordtype">char</span> buf[], size_type len)
<a name="l00219"></a>00219       { 
<a name="l00220"></a>00220         _string.append(reinterpret_cast&lt;const BString::value_type *&gt;(buf), len);
<a name="l00221"></a>00221         <span class="keywordflow">return</span> len;
<a name="l00222"></a>00222       }
<a name="l00223"></a><a class="code" href="classdami_1_1io_1_1_b_string_writer.html#a5317b9b178bbb72cc3f0bba493efb73a">00223</a>       size_type writeChars(<span class="keyword">const</span> char_type buf[], size_type len)
<a name="l00224"></a>00224       {
<a name="l00225"></a>00225         _string.append(reinterpret_cast&lt;const BString::value_type *&gt;(buf), len);
<a name="l00226"></a>00226         <span class="keywordflow">return</span> len;
<a name="l00227"></a>00227       }
<a name="l00228"></a>00228 
<a name="l00229"></a><a class="code" href="classdami_1_1io_1_1_b_string_writer.html#a77ea357bba3f8242bd293f3d6bbeea52">00229</a>       pos_type getCur()
<a name="l00230"></a>00230       {
<a name="l00231"></a>00231         <span class="keywordflow">return</span> _string.size();
<a name="l00232"></a>00232       }
<a name="l00233"></a>00233     };
<a name="l00234"></a>00234   };
<a name="l00235"></a>00235 };
<a name="l00236"></a>00236 
<a name="l00237"></a>00237 <span class="preprocessor">#endif </span><span class="comment">/* _ID3LIB_IO_STRINGS_H_ */</span>
<a name="l00238"></a>00238 
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Wed Jan 12 23:46:35 2011 for id3lib by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>