<!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::RecordParser< RecordT, StorageT > Class Template 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_1RecordParser.html">RecordParser</a> </div> </div> <div class="contents"> <h1>Barry::RecordParser< RecordT, StorageT > Class Template Reference</h1><!-- doxytag: class="Barry::RecordParser" --><!-- doxytag: inherits="Barry::RecordParserBase" --><code>#include <<a class="el" href="parser_8h-source.html">parser.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for Barry::RecordParser< RecordT, StorageT >:</div> <div class="dynsection"> <p><center><img src="classBarry_1_1RecordParser__inherit__graph.png" border="0" usemap="#Barry_1_1RecordParser_3_01RecordT_00_01StorageT_01_4__inherit__map" alt="Inheritance graph"></center> <map name="Barry_1_1RecordParser_3_01RecordT_00_01StorageT_01_4__inherit__map"> <area shape="rect" href="classBarry_1_1RecordParserBase.html" title="Abstract base class for the following RecordParser template, that exposes some information..." alt="" coords="57,80,225,107"><area shape="rect" href="classBarry_1_1Parser.html" title="Base class for the parser hierarchy." alt="" coords="92,5,191,32"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <div class="dynheader"> Collaboration diagram for Barry::RecordParser< RecordT, StorageT >:</div> <div class="dynsection"> <p><center><img src="classBarry_1_1RecordParser__coll__graph.png" border="0" usemap="#Barry_1_1RecordParser_3_01RecordT_00_01StorageT_01_4__coll__map" alt="Collaboration graph"></center> <map name="Barry_1_1RecordParser_3_01RecordT_00_01StorageT_01_4__coll__map"> <area shape="rect" href="classBarry_1_1RecordParserBase.html" title="Abstract base class for the following RecordParser template, that exposes some information..." alt="" coords="5,83,173,109"><area shape="rect" href="classBarry_1_1Parser.html" title="Base class for the parser hierarchy." alt="" coords="40,5,139,32"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classBarry_1_1RecordParser-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> <h3>template<class RecordT, class StorageT><br> class Barry::RecordParser< RecordT, StorageT ></h3> Template class for easy creation of specific parser objects. <p> This template takes the following template arguments:<p> <ul> <li>RecordT: One of the record parser classes in <a class="el" href="record_8h.html" title="Blackberry database record classes.">record.h</a></li><li>StorageT: A custom storage functor class. An object of this type will be called as a function with parsed Record as an argument. This happens on the fly as the data is retrieved from the device over USB, so it should not block forever.</li></ul> <p> Example LoadDatabase() call:<p> <pre> struct StoreContact { std::vector<Contact> &array; StoreContact(std::vector<Contact> &a) : array(a) {} void operator() (const <a class="el" href="classBarry_1_1Contact.html" title="Represents a single record in the Address Book Blackberry database.">Contact</a> &c) { array.push_back(c); } };</pre><p> <pre> <a class="el" href="classBarry_1_1Controller.html" title="The main interface class.">Controller</a> con(probeResult); con.OpenMode(Controller::Desktop); std::vector<Contact> contactList; StoreContact storage(contactList); RecordParser<Contact, StoreContact> parser(storage); con.LoadDatabase(con.GetDBID("Address Book"), parser); </pre> <p>Definition at line <a class="el" href="parser_8h-source.html#l00267">267</a> of file <a class="el" href="parser_8h-source.html">parser.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_1RecordParser.html#a52373dc3d72cea727838bae98d5f8af">RecordParser</a> (StorageT &storage)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor that references an externally managed storage object. <a href="#a52373dc3d72cea727838bae98d5f8af"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1RecordParser.html#f837f09991b62116b13e9e6c13b4dfd3">RecordParser</a> (StorageT *storage=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor that references a locally managed storage object. <a href="#f837f09991b62116b13e9e6c13b4dfd3"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1RecordParser.html#83fe40db19e22eeb7ac94d8385650b75">ParseRecord</a> (const <a class="el" href="classBarry_1_1DBData.html">DBData</a> &data, const <a class="el" href="classBarry_1_1IConverter.html">IConverter</a> *ic)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Called to parse sub fields in the raw data packet. <a href="#83fe40db19e22eeb7ac94d8385650b75"></a><br></td></tr> </table> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="a52373dc3d72cea727838bae98d5f8af"></a><!-- doxytag: member="Barry::RecordParser::RecordParser" ref="a52373dc3d72cea727838bae98d5f8af" args="(StorageT &storage)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class RecordT, class StorageT> </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classBarry_1_1RecordParser.html">Barry::RecordParser</a>< RecordT, StorageT >::<a class="el" href="classBarry_1_1RecordParser.html">RecordParser</a> </td> <td>(</td> <td class="paramtype">StorageT & </td> <td class="paramname"> <em>storage</em> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor that references an externally managed storage object. <p> <p>Definition at line <a class="el" href="parser_8h-source.html#l00276">276</a> of file <a class="el" href="parser_8h-source.html">parser.h</a>.</p> </div> </div><p> <a class="anchor" name="f837f09991b62116b13e9e6c13b4dfd3"></a><!-- doxytag: member="Barry::RecordParser::RecordParser" ref="f837f09991b62116b13e9e6c13b4dfd3" args="(StorageT *storage=0)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class RecordT, class StorageT> </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classBarry_1_1RecordParser.html">Barry::RecordParser</a>< RecordT, StorageT >::<a class="el" href="classBarry_1_1RecordParser.html">RecordParser</a> </td> <td>(</td> <td class="paramtype">StorageT * </td> <td class="paramname"> <em>storage</em> = <code>0</code> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor that references a locally managed storage object. <p> The pointer passed in will be stored, and freed when this class is destroyed. It is safe to call this constructor with a 'new'ly created storage object. <p>Definition at line <a class="el" href="parser_8h-source.html#l00287">287</a> of file <a class="el" href="parser_8h-source.html">parser.h</a>.</p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="83fe40db19e22eeb7ac94d8385650b75"></a><!-- doxytag: member="Barry::RecordParser::ParseRecord" ref="83fe40db19e22eeb7ac94d8385650b75" args="(const DBData &data, const IConverter *ic)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class RecordT, class StorageT> </div> <table class="memname"> <tr> <td class="memname">virtual void <a class="el" href="classBarry_1_1RecordParser.html">Barry::RecordParser</a>< RecordT, StorageT >::ParseRecord </td> <td>(</td> <td class="paramtype">const <a class="el" href="classBarry_1_1DBData.html">DBData</a> & </td> <td class="paramname"> <em>data</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classBarry_1_1IConverter.html">IConverter</a> * </td> <td class="paramname"> <em>ic</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Called to parse sub fields in the raw data packet. <p> <p>Implements <a class="el" href="classBarry_1_1Parser.html#1d8325c74140cda51c5735c6f82b7511">Barry::Parser</a>.</p> <p>Definition at line <a class="el" href="parser_8h-source.html#l00310">310</a> of file <a class="el" href="parser_8h-source.html">parser.h</a>.</p> <p>References <a class="el" href="parser_8h-source.html#l00221">Barry::ParseDBData()</a>.</p> <p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> <p><center><img src="classBarry_1_1RecordParser_83fe40db19e22eeb7ac94d8385650b75_cgraph.png" border="0" usemap="#classBarry_1_1RecordParser_83fe40db19e22eeb7ac94d8385650b75_cgraph_map" alt=""></center> <map name="classBarry_1_1RecordParser_83fe40db19e22eeb7ac94d8385650b75_cgraph_map"> <area shape="rect" href="namespaceBarry.html#d9b9de17676484b0a956a2944602f84c" title="Contains the proper way to convert a DBData object into a record." alt="" coords="279,81,417,108"><area shape="rect" href="classBarry_1_1DBData.html#a7cacc9655376447ffbf3aa4d664a03b" title="Barry::DBData::GetData" alt="" coords="480,5,640,32"><area shape="rect" href="classBarry_1_1DBData.html#5b301bfdcda5a74ccfd3f7e54fd69d99" title="Barry::DBData::GetOffset" alt="" coords="476,56,644,83"><area shape="rect" href="classBarry_1_1DBData.html#07523eb3b1dcfd99a917a184b61cb10a" title="Barry::DBData::GetRecType" alt="" coords="468,107,652,133"><area shape="rect" href="classBarry_1_1DBData.html#2a0106c7330842c455fc5393a3abfbc7" title="Barry::DBData::GetUniqueId" alt="" coords="468,157,652,184"></map> </div> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="parser_8h-source.html">parser.h</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Tue Mar 1 17:51:02 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>