classRakNet_1_1CommandParserInterface.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <title>RakNet: RakNet::CommandParserInterface Class Reference</title>
  7. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  8. <script type="text/javascript" src="jquery.js"></script>
  9. <script type="text/javascript" src="dynsections.js"></script>
  10. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  11. </head>
  12. <body>
  13. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  14. <div id="titlearea">
  15. <table cellspacing="0" cellpadding="0">
  16. <tbody>
  17. <tr style="height: 56px;">
  18. <td style="padding-left: 0.5em;">
  19. <div id="projectname">RakNet
  20. &#160;<span id="projectnumber">4.0</span>
  21. </div>
  22. </td>
  23. </tr>
  24. </tbody>
  25. </table>
  26. </div>
  27. <!-- end header part -->
  28. <!-- Generated by Doxygen 1.8.2 -->
  29. <div id="navrow1" class="tabs">
  30. <ul class="tablist">
  31. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  32. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  33. <li><a href="modules.html"><span>Modules</span></a></li>
  34. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  35. <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
  36. <li><a href="files.html"><span>Files</span></a></li>
  37. </ul>
  38. </div>
  39. <div id="navrow2" class="tabs2">
  40. <ul class="tablist">
  41. <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
  42. <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
  43. <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
  44. <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
  45. </ul>
  46. </div>
  47. <div id="nav-path" class="navpath">
  48. <ul>
  49. <li class="navelem"><a class="el" href="namespaceRakNet.html">RakNet</a></li><li class="navelem"><a class="el" href="classRakNet_1_1CommandParserInterface.html">CommandParserInterface</a></li> </ul>
  50. </div>
  51. </div><!-- top -->
  52. <div class="header">
  53. <div class="summary">
  54. <a href="#pub-methods">Public Member Functions</a> &#124;
  55. <a href="classRakNet_1_1CommandParserInterface-members.html">List of all members</a> </div>
  56. <div class="headertitle">
  57. <div class="title">RakNet::CommandParserInterface Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  58. </div><!--header-->
  59. <div class="contents">
  60. <p>The interface used by command parsers.
  61. <a href="classRakNet_1_1CommandParserInterface.html#details">More...</a></p>
  62. <p><code>#include &lt;CommandParserInterface.h&gt;</code></p>
  63. <div class="dynheader">
  64. Inheritance diagram for RakNet::CommandParserInterface:</div>
  65. <div class="dyncontent">
  66. <div class="center">
  67. <img src="classRakNet_1_1CommandParserInterface.png" usemap="#RakNet::CommandParserInterface_map" alt=""/>
  68. <map id="RakNet::CommandParserInterface_map" name="RakNet::CommandParserInterface_map">
  69. <area href="classRakNet_1_1LogCommandParser.html" title="Adds the ability to send logging output to a remote console." alt="RakNet::LogCommandParser" shape="rect" coords="0,56,201,80"/>
  70. <area href="classRakNet_1_1RakNetCommandParser.html" title="This allows a console client to call most of the functions in RakPeer." alt="RakNet::RakNetCommandParser" shape="rect" coords="211,56,412,80"/>
  71. </map>
  72. </div></div>
  73. <table class="memberdecls">
  74. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  75. Public Member Functions</h2></td></tr>
  76. <tr class="memitem:af9f1b817f383b52f9ad6451def11d35b"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1CommandParserInterface.html#af9f1b817f383b52f9ad6451def11d35b">GetName</a> (void) const =0</td></tr>
  77. <tr class="separator:af9f1b817f383b52f9ad6451def11d35b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:a98004a0af5237980fdc160f6c6fcdc79"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1CommandParserInterface.html#a98004a0af5237980fdc160f6c6fcdc79">OnNewIncomingConnection</a> (const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;systemAddress, <a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *transport)</td></tr>
  79. <tr class="memdesc:a98004a0af5237980fdc160f6c6fcdc79"><td class="mdescLeft">&#160;</td><td class="mdescRight">A callback for when <em>systemAddress</em> has connected to us. <a href="#a98004a0af5237980fdc160f6c6fcdc79"></a><br/></td></tr>
  80. <tr class="separator:a98004a0af5237980fdc160f6c6fcdc79"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:aa275db3922ed1c27fc5ee7ecd6913d4b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1CommandParserInterface.html#aa275db3922ed1c27fc5ee7ecd6913d4b">OnConnectionLost</a> (const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;systemAddress, <a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *transport)</td></tr>
  82. <tr class="memdesc:aa275db3922ed1c27fc5ee7ecd6913d4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">A callback for when <em>systemAddress</em> has disconnected, either gracefully or forcefully. <a href="#aa275db3922ed1c27fc5ee7ecd6913d4b"></a><br/></td></tr>
  83. <tr class="separator:aa275db3922ed1c27fc5ee7ecd6913d4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:a6abf857d697bb11230ac0b153c17624a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1CommandParserInterface.html#a6abf857d697bb11230ac0b153c17624a">SendHelp</a> (<a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *transport, const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;systemAddress)=0</td></tr>
  85. <tr class="memdesc:a6abf857d697bb11230ac0b153c17624a"><td class="mdescLeft">&#160;</td><td class="mdescRight">A callback for when you are expected to send a brief description of your parser to <em>systemAddress</em>. <a href="#a6abf857d697bb11230ac0b153c17624a"></a><br/></td></tr>
  86. <tr class="separator:a6abf857d697bb11230ac0b153c17624a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:ac568282654986ad63d680d68a98cf757"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1CommandParserInterface.html#ac568282654986ad63d680d68a98cf757">OnCommand</a> (const char *command, unsigned numParameters, char **parameterList, <a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *transport, const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;systemAddress, const char *originalString)=0</td></tr>
  88. <tr class="memdesc:ac568282654986ad63d680d68a98cf757"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given <em>command</em> with parameters <em>parameterList</em> , do whatever processing you wish. <a href="#ac568282654986ad63d680d68a98cf757"></a><br/></td></tr>
  89. <tr class="separator:ac568282654986ad63d680d68a98cf757"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:a9bdc4fa618f324e8f3c0f188009e6958"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1CommandParserInterface.html#a9bdc4fa618f324e8f3c0f188009e6958">OnTransportChange</a> (<a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *transport)</td></tr>
  91. <tr class="memdesc:a9bdc4fa618f324e8f3c0f188009e6958"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is called every time transport interface is registered. <a href="#a9bdc4fa618f324e8f3c0f188009e6958"></a><br/></td></tr>
  92. <tr class="separator:a9bdc4fa618f324e8f3c0f188009e6958"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. <tr class="memitem:abe62e54c5f3e0dde2f88b48ce479d4c6"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1CommandParserInterface.html#abe62e54c5f3e0dde2f88b48ce479d4c6">RegisterCommand</a> (unsigned char parameterCount, const char *command, const char *commandHelp)</td></tr>
  94. <tr class="separator:abe62e54c5f3e0dde2f88b48ce479d4c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. <tr class="memitem:a5b01f9370d1bffee84caf3da9fae5dfe"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1CommandParserInterface.html#a5b01f9370d1bffee84caf3da9fae5dfe">ReturnResult</a> (bool res, const char *command, <a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *transport, const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;systemAddress)</td></tr>
  96. <tr class="memdesc:a5b01f9370d1bffee84caf3da9fae5dfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Just writes a string to the remote system based on the result ( <em>res</em> ) of your operation. <a href="#a5b01f9370d1bffee84caf3da9fae5dfe"></a><br/></td></tr>
  97. <tr class="separator:a5b01f9370d1bffee84caf3da9fae5dfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
  98. <tr class="memitem:a628e6ddfdeaecfb7d6120f7db3780d91"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1CommandParserInterface.html#a628e6ddfdeaecfb7d6120f7db3780d91">ReturnResult</a> (const char *command, <a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *transport, const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;systemAddress)</td></tr>
  99. <tr class="memdesc:a628e6ddfdeaecfb7d6120f7db3780d91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Just writes a string to the remote system when you are calling a function that has no return value. <a href="#a628e6ddfdeaecfb7d6120f7db3780d91"></a><br/></td></tr>
  100. <tr class="separator:a628e6ddfdeaecfb7d6120f7db3780d91"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. </table>
  102. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  103. <div class="textblock"><p>The interface used by command parsers. </p>
  104. <p><a class="el" href="classRakNet_1_1CommandParserInterface.html" title="The interface used by command parsers.">CommandParserInterface</a> provides a set of functions and interfaces that plug into the <a class="el" href="classRakNet_1_1ConsoleServer.html" title="The main entry point for the server portion of your remote console application support.">ConsoleServer</a> class. Each <a class="el" href="classRakNet_1_1CommandParserInterface.html" title="The interface used by command parsers.">CommandParserInterface</a> works at the same time as other interfaces in the system. </p>
  105. </div><h2 class="groupheader">Member Function Documentation</h2>
  106. <a class="anchor" id="af9f1b817f383b52f9ad6451def11d35b"></a>
  107. <div class="memitem">
  108. <div class="memproto">
  109. <table class="mlabels">
  110. <tr>
  111. <td class="mlabels-left">
  112. <table class="memname">
  113. <tr>
  114. <td class="memname">virtual const char* RakNet::CommandParserInterface::GetName </td>
  115. <td>(</td>
  116. <td class="paramtype">void&#160;</td>
  117. <td class="paramname"></td><td>)</td>
  118. <td> const</td>
  119. </tr>
  120. </table>
  121. </td>
  122. <td class="mlabels-right">
  123. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  124. </tr>
  125. </table>
  126. </div><div class="memdoc">
  127. <p>You are responsible for overriding this function and returning a static string, which will identifier your parser. This should return a static string </p>
  128. <dl class="section return"><dt>Returns</dt><dd>The name that you return. </dd></dl>
  129. <p>Implemented in <a class="el" href="classRakNet_1_1LogCommandParser.html#a037b5b2323e7135c85bbcb3a271e4890">RakNet::LogCommandParser</a>, and <a class="el" href="classRakNet_1_1RakNetCommandParser.html#ab7529704693ad768ef769f5fe49911cd">RakNet::RakNetCommandParser</a>.</p>
  130. </div>
  131. </div>
  132. <a class="anchor" id="ac568282654986ad63d680d68a98cf757"></a>
  133. <div class="memitem">
  134. <div class="memproto">
  135. <table class="mlabels">
  136. <tr>
  137. <td class="mlabels-left">
  138. <table class="memname">
  139. <tr>
  140. <td class="memname">virtual bool RakNet::CommandParserInterface::OnCommand </td>
  141. <td>(</td>
  142. <td class="paramtype">const char *&#160;</td>
  143. <td class="paramname"><em>command</em>, </td>
  144. </tr>
  145. <tr>
  146. <td class="paramkey"></td>
  147. <td></td>
  148. <td class="paramtype">unsigned&#160;</td>
  149. <td class="paramname"><em>numParameters</em>, </td>
  150. </tr>
  151. <tr>
  152. <td class="paramkey"></td>
  153. <td></td>
  154. <td class="paramtype">char **&#160;</td>
  155. <td class="paramname"><em>parameterList</em>, </td>
  156. </tr>
  157. <tr>
  158. <td class="paramkey"></td>
  159. <td></td>
  160. <td class="paramtype"><a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *&#160;</td>
  161. <td class="paramname"><em>transport</em>, </td>
  162. </tr>
  163. <tr>
  164. <td class="paramkey"></td>
  165. <td></td>
  166. <td class="paramtype">const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;&#160;</td>
  167. <td class="paramname"><em>systemAddress</em>, </td>
  168. </tr>
  169. <tr>
  170. <td class="paramkey"></td>
  171. <td></td>
  172. <td class="paramtype">const char *&#160;</td>
  173. <td class="paramname"><em>originalString</em>&#160;</td>
  174. </tr>
  175. <tr>
  176. <td></td>
  177. <td>)</td>
  178. <td></td><td></td>
  179. </tr>
  180. </table>
  181. </td>
  182. <td class="mlabels-right">
  183. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  184. </tr>
  185. </table>
  186. </div><div class="memdoc">
  187. <p>Given <em>command</em> with parameters <em>parameterList</em> , do whatever processing you wish. </p>
  188. <dl class="params"><dt>Parameters</dt><dd>
  189. <table class="params">
  190. <tr><td class="paramdir">[in]</td><td class="paramname">command</td><td>The command to process </td></tr>
  191. <tr><td class="paramdir">[in]</td><td class="paramname">numParameters</td><td>How many parameters were passed along with the command </td></tr>
  192. <tr><td class="paramdir">[in]</td><td class="paramname">parameterList</td><td>The list of parameters. parameterList[0] is the first parameter and so on. </td></tr>
  193. <tr><td class="paramdir">[in]</td><td class="paramname">transport</td><td>The transport interface we can use to write to </td></tr>
  194. <tr><td class="paramdir">[in]</td><td class="paramname">systemAddress</td><td>The player that sent this command. </td></tr>
  195. <tr><td class="paramdir">[in]</td><td class="paramname">originalString</td><td>The string that was actually sent over the network, in case you want to do your own parsing </td></tr>
  196. </table>
  197. </dd>
  198. </dl>
  199. <p>Implemented in <a class="el" href="classRakNet_1_1LogCommandParser.html#aceb0d8004cef19e78cd630b68c680c63">RakNet::LogCommandParser</a>, and <a class="el" href="classRakNet_1_1RakNetCommandParser.html#a34a1aa5896a8d854cd7fc88675c45533">RakNet::RakNetCommandParser</a>.</p>
  200. </div>
  201. </div>
  202. <a class="anchor" id="aa275db3922ed1c27fc5ee7ecd6913d4b"></a>
  203. <div class="memitem">
  204. <div class="memproto">
  205. <table class="mlabels">
  206. <tr>
  207. <td class="mlabels-left">
  208. <table class="memname">
  209. <tr>
  210. <td class="memname">virtual void RakNet::CommandParserInterface::OnConnectionLost </td>
  211. <td>(</td>
  212. <td class="paramtype">const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;&#160;</td>
  213. <td class="paramname"><em>systemAddress</em>, </td>
  214. </tr>
  215. <tr>
  216. <td class="paramkey"></td>
  217. <td></td>
  218. <td class="paramtype"><a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *&#160;</td>
  219. <td class="paramname"><em>transport</em>&#160;</td>
  220. </tr>
  221. <tr>
  222. <td></td>
  223. <td>)</td>
  224. <td></td><td></td>
  225. </tr>
  226. </table>
  227. </td>
  228. <td class="mlabels-right">
  229. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  230. </tr>
  231. </table>
  232. </div><div class="memdoc">
  233. <p>A callback for when <em>systemAddress</em> has disconnected, either gracefully or forcefully. </p>
  234. <dl class="params"><dt>Parameters</dt><dd>
  235. <table class="params">
  236. <tr><td class="paramdir">[in]</td><td class="paramname">systemAddress</td><td>The player that has disconnected. </td></tr>
  237. <tr><td class="paramdir">[in]</td><td class="paramname">transport</td><td>The transport interface that sent us this information. </td></tr>
  238. </table>
  239. </dd>
  240. </dl>
  241. <p>Reimplemented in <a class="el" href="classRakNet_1_1LogCommandParser.html#a8d46296b09f54817d0200e8a557bc802">RakNet::LogCommandParser</a>.</p>
  242. </div>
  243. </div>
  244. <a class="anchor" id="a98004a0af5237980fdc160f6c6fcdc79"></a>
  245. <div class="memitem">
  246. <div class="memproto">
  247. <table class="mlabels">
  248. <tr>
  249. <td class="mlabels-left">
  250. <table class="memname">
  251. <tr>
  252. <td class="memname">virtual void RakNet::CommandParserInterface::OnNewIncomingConnection </td>
  253. <td>(</td>
  254. <td class="paramtype">const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;&#160;</td>
  255. <td class="paramname"><em>systemAddress</em>, </td>
  256. </tr>
  257. <tr>
  258. <td class="paramkey"></td>
  259. <td></td>
  260. <td class="paramtype"><a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *&#160;</td>
  261. <td class="paramname"><em>transport</em>&#160;</td>
  262. </tr>
  263. <tr>
  264. <td></td>
  265. <td>)</td>
  266. <td></td><td></td>
  267. </tr>
  268. </table>
  269. </td>
  270. <td class="mlabels-right">
  271. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  272. </tr>
  273. </table>
  274. </div><div class="memdoc">
  275. <p>A callback for when <em>systemAddress</em> has connected to us. </p>
  276. <dl class="params"><dt>Parameters</dt><dd>
  277. <table class="params">
  278. <tr><td class="paramdir">[in]</td><td class="paramname">systemAddress</td><td>The player that has connected. </td></tr>
  279. <tr><td class="paramdir">[in]</td><td class="paramname">transport</td><td>The transport interface that sent us this information. Can be used to send messages to this or other players. </td></tr>
  280. </table>
  281. </dd>
  282. </dl>
  283. <p>Reimplemented in <a class="el" href="classRakNet_1_1LogCommandParser.html#a399c67161aa82888fe2facf7bfda3c53">RakNet::LogCommandParser</a>.</p>
  284. </div>
  285. </div>
  286. <a class="anchor" id="a9bdc4fa618f324e8f3c0f188009e6958"></a>
  287. <div class="memitem">
  288. <div class="memproto">
  289. <table class="mlabels">
  290. <tr>
  291. <td class="mlabels-left">
  292. <table class="memname">
  293. <tr>
  294. <td class="memname">virtual void RakNet::CommandParserInterface::OnTransportChange </td>
  295. <td>(</td>
  296. <td class="paramtype"><a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *&#160;</td>
  297. <td class="paramname"><em>transport</em></td><td>)</td>
  298. <td></td>
  299. </tr>
  300. </table>
  301. </td>
  302. <td class="mlabels-right">
  303. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  304. </tr>
  305. </table>
  306. </div><div class="memdoc">
  307. <p>This is called every time transport interface is registered. </p>
  308. <p>If you want to save a copy of the <a class="el" href="classRakNet_1_1TransportInterface.html" title="Defines an interface that is used to send and receive null-terminated strings.">TransportInterface</a> pointer This is the place to do it </p>
  309. <dl class="params"><dt>Parameters</dt><dd>
  310. <table class="params">
  311. <tr><td class="paramdir">[in]</td><td class="paramname">transport</td><td>The new <a class="el" href="classRakNet_1_1TransportInterface.html" title="Defines an interface that is used to send and receive null-terminated strings.">TransportInterface</a> </td></tr>
  312. </table>
  313. </dd>
  314. </dl>
  315. <p>Reimplemented in <a class="el" href="classRakNet_1_1LogCommandParser.html#a87fb1e549a73610575f8ec89077d9fdc">RakNet::LogCommandParser</a>.</p>
  316. </div>
  317. </div>
  318. <a class="anchor" id="abe62e54c5f3e0dde2f88b48ce479d4c6"></a>
  319. <div class="memitem">
  320. <div class="memproto">
  321. <table class="mlabels">
  322. <tr>
  323. <td class="mlabels-left">
  324. <table class="memname">
  325. <tr>
  326. <td class="memname">virtual void RakNet::CommandParserInterface::RegisterCommand </td>
  327. <td>(</td>
  328. <td class="paramtype">unsigned char&#160;</td>
  329. <td class="paramname"><em>parameterCount</em>, </td>
  330. </tr>
  331. <tr>
  332. <td class="paramkey"></td>
  333. <td></td>
  334. <td class="paramtype">const char *&#160;</td>
  335. <td class="paramname"><em>command</em>, </td>
  336. </tr>
  337. <tr>
  338. <td class="paramkey"></td>
  339. <td></td>
  340. <td class="paramtype">const char *&#160;</td>
  341. <td class="paramname"><em>commandHelp</em>&#160;</td>
  342. </tr>
  343. <tr>
  344. <td></td>
  345. <td>)</td>
  346. <td></td><td></td>
  347. </tr>
  348. </table>
  349. </td>
  350. <td class="mlabels-right">
  351. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  352. </tr>
  353. </table>
  354. </div><div class="memdoc">
  355. <p>Registers a command. </p>
  356. <dl class="params"><dt>Parameters</dt><dd>
  357. <table class="params">
  358. <tr><td class="paramdir">[in]</td><td class="paramname">parameterCount</td><td>How many parameters your command requires. If you want to accept a variable number of commands, pass CommandParserInterface::VARIABLE_NUMBER_OF_PARAMETERS </td></tr>
  359. <tr><td class="paramdir">[in]</td><td class="paramname">command</td><td>A pointer to a STATIC string that has your command. I keep a copy of the pointer here so don't deallocate the string. </td></tr>
  360. <tr><td class="paramdir">[in]</td><td class="paramname">commandHelp</td><td>A pointer to a STATIC string that has the help information for your command. I keep a copy of the pointer here so don't deallocate the string. </td></tr>
  361. </table>
  362. </dd>
  363. </dl>
  364. </div>
  365. </div>
  366. <a class="anchor" id="a5b01f9370d1bffee84caf3da9fae5dfe"></a>
  367. <div class="memitem">
  368. <div class="memproto">
  369. <table class="mlabels">
  370. <tr>
  371. <td class="mlabels-left">
  372. <table class="memname">
  373. <tr>
  374. <td class="memname">virtual void RakNet::CommandParserInterface::ReturnResult </td>
  375. <td>(</td>
  376. <td class="paramtype">bool&#160;</td>
  377. <td class="paramname"><em>res</em>, </td>
  378. </tr>
  379. <tr>
  380. <td class="paramkey"></td>
  381. <td></td>
  382. <td class="paramtype">const char *&#160;</td>
  383. <td class="paramname"><em>command</em>, </td>
  384. </tr>
  385. <tr>
  386. <td class="paramkey"></td>
  387. <td></td>
  388. <td class="paramtype"><a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *&#160;</td>
  389. <td class="paramname"><em>transport</em>, </td>
  390. </tr>
  391. <tr>
  392. <td class="paramkey"></td>
  393. <td></td>
  394. <td class="paramtype">const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;&#160;</td>
  395. <td class="paramname"><em>systemAddress</em>&#160;</td>
  396. </tr>
  397. <tr>
  398. <td></td>
  399. <td>)</td>
  400. <td></td><td></td>
  401. </tr>
  402. </table>
  403. </td>
  404. <td class="mlabels-right">
  405. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  406. </tr>
  407. </table>
  408. </div><div class="memdoc">
  409. <p>Just writes a string to the remote system based on the result ( <em>res</em> ) of your operation. </p>
  410. <p>This is not necessary to call, but makes it easier to return results of function calls. </p>
  411. <dl class="params"><dt>Parameters</dt><dd>
  412. <table class="params">
  413. <tr><td class="paramdir">[in]</td><td class="paramname">res</td><td>The result to write </td></tr>
  414. <tr><td class="paramdir">[in]</td><td class="paramname">command</td><td>The command that this result came from </td></tr>
  415. <tr><td class="paramdir">[in]</td><td class="paramname">transport</td><td>The transport interface that will be written to </td></tr>
  416. <tr><td class="paramdir">[in]</td><td class="paramname">systemAddress</td><td>The player this result will be sent to </td></tr>
  417. </table>
  418. </dd>
  419. </dl>
  420. </div>
  421. </div>
  422. <a class="anchor" id="a628e6ddfdeaecfb7d6120f7db3780d91"></a>
  423. <div class="memitem">
  424. <div class="memproto">
  425. <table class="mlabels">
  426. <tr>
  427. <td class="mlabels-left">
  428. <table class="memname">
  429. <tr>
  430. <td class="memname">virtual void RakNet::CommandParserInterface::ReturnResult </td>
  431. <td>(</td>
  432. <td class="paramtype">const char *&#160;</td>
  433. <td class="paramname"><em>command</em>, </td>
  434. </tr>
  435. <tr>
  436. <td class="paramkey"></td>
  437. <td></td>
  438. <td class="paramtype"><a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *&#160;</td>
  439. <td class="paramname"><em>transport</em>, </td>
  440. </tr>
  441. <tr>
  442. <td class="paramkey"></td>
  443. <td></td>
  444. <td class="paramtype">const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;&#160;</td>
  445. <td class="paramname"><em>systemAddress</em>&#160;</td>
  446. </tr>
  447. <tr>
  448. <td></td>
  449. <td>)</td>
  450. <td></td><td></td>
  451. </tr>
  452. </table>
  453. </td>
  454. <td class="mlabels-right">
  455. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  456. </tr>
  457. </table>
  458. </div><div class="memdoc">
  459. <p>Just writes a string to the remote system when you are calling a function that has no return value. </p>
  460. <p>This is not necessary to call, but makes it easier to return results of function calls. </p>
  461. <dl class="params"><dt>Parameters</dt><dd>
  462. <table class="params">
  463. <tr><td class="paramdir">[in]</td><td class="paramname">res</td><td>The result to write </td></tr>
  464. <tr><td class="paramdir">[in]</td><td class="paramname">command</td><td>The command that this result came from </td></tr>
  465. <tr><td class="paramdir">[in]</td><td class="paramname">transport</td><td>The transport interface that will be written to </td></tr>
  466. <tr><td class="paramdir">[in]</td><td class="paramname">systemAddress</td><td>The player this result will be sent to </td></tr>
  467. </table>
  468. </dd>
  469. </dl>
  470. </div>
  471. </div>
  472. <a class="anchor" id="a6abf857d697bb11230ac0b153c17624a"></a>
  473. <div class="memitem">
  474. <div class="memproto">
  475. <table class="mlabels">
  476. <tr>
  477. <td class="mlabels-left">
  478. <table class="memname">
  479. <tr>
  480. <td class="memname">virtual void RakNet::CommandParserInterface::SendHelp </td>
  481. <td>(</td>
  482. <td class="paramtype"><a class="el" href="classRakNet_1_1TransportInterface.html">TransportInterface</a> *&#160;</td>
  483. <td class="paramname"><em>transport</em>, </td>
  484. </tr>
  485. <tr>
  486. <td class="paramkey"></td>
  487. <td></td>
  488. <td class="paramtype">const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;&#160;</td>
  489. <td class="paramname"><em>systemAddress</em>&#160;</td>
  490. </tr>
  491. <tr>
  492. <td></td>
  493. <td>)</td>
  494. <td></td><td></td>
  495. </tr>
  496. </table>
  497. </td>
  498. <td class="mlabels-right">
  499. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  500. </tr>
  501. </table>
  502. </div><div class="memdoc">
  503. <p>A callback for when you are expected to send a brief description of your parser to <em>systemAddress</em>. </p>
  504. <dl class="params"><dt>Parameters</dt><dd>
  505. <table class="params">
  506. <tr><td class="paramdir">[in]</td><td class="paramname">transport</td><td>The transport interface we can use to write to </td></tr>
  507. <tr><td class="paramdir">[in]</td><td class="paramname">systemAddress</td><td>The player that requested help. </td></tr>
  508. </table>
  509. </dd>
  510. </dl>
  511. <p>Implemented in <a class="el" href="classRakNet_1_1LogCommandParser.html#a6e7b04559fd0ba7e65d52f85a47b3819">RakNet::LogCommandParser</a>, and <a class="el" href="classRakNet_1_1RakNetCommandParser.html#ad7cff9f3086a6390fd72d4ca2826f271">RakNet::RakNetCommandParser</a>.</p>
  512. </div>
  513. </div>
  514. <hr/>The documentation for this class was generated from the following file:<ul>
  515. <li>D:/temp/RakNet_PC/Source/<a class="el" href="CommandParserInterface_8h.html">CommandParserInterface.h</a></li>
  516. </ul>
  517. </div><!-- contents -->
  518. <!-- start footer part -->
  519. <hr class="footer"/><address class="footer"><small>
  520. Generated on Mon Jun 2 2014 20:10:28 for RakNet by &#160;<a href="http://www.doxygen.org/index.html">
  521. <img class="footer" src="doxygen.png" alt="doxygen"/>
  522. </a> 1.8.2
  523. </small></address>
  524. </body>
  525. </html>
粤ICP备19079148号