<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Barry: Barry::IConverter Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main 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="classes.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="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class 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" --><code>#include <<a class="el" href="iconv_8h-source.html">iconv.h</a>></code> <p> <div class="dynheader"> Collaboration diagram for Barry::IConverter:</div> <div class="dynsection"> <p><center><img src="classBarry_1_1IConverter__coll__graph.png" border="0" usemap="#Barry_1_1IConverter__coll__map" alt="Collaboration graph"></center> <map name="Barry_1_1IConverter__coll__map"> <area shape="rect" title="STL class." alt="" coords="117,83,197,109"><area shape="rect" title="STL class." alt="" coords="75,5,240,32"><area shape="rect" href="classBarry_1_1IConvHandle.html" title="Wrapper class for a two-way iconv_t handle pair." alt="" coords="221,83,355,109"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classBarry_1_1IConverter-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> Main charset conversion class, primarily focused on converting between the Blackberry charset and an application-specified one. <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> 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> 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> 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> 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>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> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1IConverter.html#a13373a585dba20b64a8361884a57f27">IConverter</a> (const char *tocode="UTF-8", bool throw_on_conv_err=false)</td></tr> <tr><td class="mdescLeft"> </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="#a13373a585dba20b64a8361884a57f27"></a><br></td></tr> </table> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="a13373a585dba20b64a8361884a57f27"></a><!-- doxytag: member="Barry::IConverter::IConverter" ref="a13373a585dba20b64a8361884a57f27" args="(const char *tocode="UTF-8", 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 * </td> <td class="paramname"> <em>tocode</em> = <code>"UTF-8"</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>throw_on_conv_err</em> = <code>false</code></td><td> </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> 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>Definition at line <a class="el" href="iconv_8cc-source.html#l00069">69</a> of file <a class="el" href="iconv_8cc-source.html">iconv.cc</a>.</p> </div> </div><p> <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><a class="el" href="iconv_8cc-source.html">iconv.cc</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Tue Mar 1 17:50:58 2011 for Barry by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>