Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 2aa62c5bbb658df1fece777472a7bcf2 > files > 471

barry-devel-docs-0.17-0.3.20100730git.fc14.noarch.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>Barry: Barry::IConverter Class 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.6.2-20100208 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</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="dirs.html"><span>Directories</span></a></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="namespaceBarry.html">Barry</a>::<a class="el" href="classBarry_1_1IConverter.html">IConverter</a>
  </div>
</div>
<div class="contents">
<h1>Barry::IConverter Class Reference</h1><!-- doxytag: class="Barry::IConverter" -->
<p>Main charset conversion class, primarily focused on converting between the Blackberry charset and an application-specified one.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="iconv_8h_source.html">iconv.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for Barry::IConverter:</div>
<div class="dynsection">
<div class="center"><img src="classBarry_1_1IConverter__coll__graph.png" border="0" usemap="#Barry_1_1IConverter_coll__map" alt="Collaboration graph"/></div>
<map name="Barry_1_1IConverter_coll__map" id="Barry_1_1IConverter_coll__map">
<area shape="rect" id="node2" href="classBarry_1_1Data.html" title="Barry::Data" alt="" coords="5,89,96,119"/><area shape="rect" id="node4" title="STL class." alt="" coords="120,89,200,119"/><area shape="rect" id="node6" title="STL class." alt="" coords="76,6,244,37"/><area shape="rect" id="node8" href="classBarry_1_1IConvHandle.html" title="Wrapper class for a two&#45;way iconv_t handle pair." alt="" coords="224,89,363,119"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classBarry_1_1IConverter-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1IConverter.html#aa13373a585dba20b64a8361884a57f27">IConverter</a> (const char *tocode=&quot;UTF-8&quot;, bool throw_on_conv_err=false)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Always throws <a class="el" href="classBarry_1_1ErrnoError.html" title="System error that provides an errno error code.">ErrnoError</a> if unable to open iconv.  <a href="#aa13373a585dba20b64a8361884a57f27"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Main charset conversion class, primarily focused on converting between the Blackberry charset and an application-specified one. </p>
<p>Additional conversions are possible through custom <a class="el" href="classBarry_1_1IConvHandle.html" title="Wrapper class for a two-way iconv_t handle pair.">IConvHandle</a>, but the goal of this class design is to deal with _one_ application defined charset, and provide a means to convert to/from that charset to/from any other charset needed by the Blackberry.</p>
<p>By default, this class assumes the Blackberry's charset is WINDOWS-1252, but some data, such as SMS message bodies, can have custom charsets as specified by the records. To convert from such a custom charset, use:</p>
<p>application sets up <a class="el" href="classBarry_1_1IConverter.html" title="Main charset conversion class, primarily focused on converting between the Blackberry...">IConverter</a> <a class="el" href="classBarry_1_1IConverter.html" title="Main charset conversion class, primarily focused on converting between the Blackberry...">IConverter</a> ic("UTF-8");</p>
<p>somewhere in the library, needing to convert from UCS2 to whatever the application selected <a class="el" href="classBarry_1_1IConvHandle.html" title="Wrapper class for a two-way iconv_t handle pair.">IConvHandle</a> ucs2("UCS2", ic); application_string = ic.Convert(ucs2, ucs2_string_data);</p>
<p>and to convert back... <a class="el" href="classBarry_1_1IConvHandle.html" title="Wrapper class for a two-way iconv_t handle pair.">IConvHandle</a> ucs2_reverse(ic, "UCS2"); ucs2_string = ic.Convert(ucs2_reverse, application_string_data); </p>

<p>Definition at line <a class="el" href="iconv_8h_source.html#l00086">86</a> of file <a class="el" href="iconv_8h_source.html">iconv.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa13373a585dba20b64a8361884a57f27"></a><!-- doxytag: member="Barry::IConverter::IConverter" ref="aa13373a585dba20b64a8361884a57f27" args="(const char *tocode=&quot;UTF&#45;8&quot;, bool throw_on_conv_err=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Barry::IConverter::IConverter </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>tocode</em> = <code>&quot;UTF-8&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>throw_on_conv_err</em> = <code>false</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Always throws <a class="el" href="classBarry_1_1ErrnoError.html" title="System error that provides an errno error code.">ErrnoError</a> if unable to open iconv. </p>
<p>If throw_on_conv_err is true, then string conversion operations that fail will also throw <a class="el" href="classBarry_1_1ErrnoError.html" title="System error that provides an errno error code.">ErrnoError</a>. </p>

<p>Definition at line <a class="el" href="iconv_8cc_source.html#l00066">66</a> of file <a class="el" href="iconv_8cc_source.html">iconv.cc</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="iconv_8h_source.html">iconv.h</a></li>
<li><a class="el" href="iconv_8cc_source.html">iconv.cc</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address>
</body>
</html>