classRakNet_1_1VariableListDeltaTracker.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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::VariableListDeltaTracker 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_1VariableListDeltaTracker.html">VariableListDeltaTracker</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="#pub-static-methods">Static Public Member Functions</a> &#124;
  56. <a href="classRakNet_1_1VariableListDeltaTracker-members.html">List of all members</a> </div>
  57. <div class="headertitle">
  58. <div class="title">RakNet::VariableListDeltaTracker Class Reference</div> </div>
  59. </div><!--header-->
  60. <div class="contents">
  61. <p><code>#include &lt;VariableListDeltaTracker.h&gt;</code></p>
  62. <table class="memberdecls">
  63. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  64. Public Member Functions</h2></td></tr>
  65. <tr class="memitem:a1b290d704a8c53be32a7613f86f113f4"><td class="memTemplParams" colspan="2">template&lt;class VarType &gt; </td></tr>
  66. <tr class="memitem:a1b290d704a8c53be32a7613f86f113f4"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classRakNet_1_1VariableListDeltaTracker.html#a1b290d704a8c53be32a7613f86f113f4">WriteVar</a> (const VarType &amp;varData)</td></tr>
  67. <tr class="separator:a1b290d704a8c53be32a7613f86f113f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  68. <tr class="memitem:a349cf26aa8c11dd567babb507241dd72"><td class="memTemplParams" colspan="2"><a class="anchor" id="a349cf26aa8c11dd567babb507241dd72"></a>
  69. template&lt;class VarType &gt; </td></tr>
  70. <tr class="memitem:a349cf26aa8c11dd567babb507241dd72"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classRakNet_1_1VariableListDeltaTracker.html#a349cf26aa8c11dd567babb507241dd72">WriteVarToBitstream</a> (const VarType &amp;varData, <a class="el" href="classRakNet_1_1BitStream.html">RakNet::BitStream</a> *bitStream)</td></tr>
  71. <tr class="memdesc:a349cf26aa8c11dd567babb507241dd72"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls WriteVar. If the variable has changed, writes true, and writes the variable. Otherwise writes false. <br/></td></tr>
  72. <tr class="separator:a349cf26aa8c11dd567babb507241dd72"><td class="memSeparator" colspan="2">&#160;</td></tr>
  73. <tr class="memitem:aeb21d3c2beb53cceeee6b5072c855043"><td class="memTemplParams" colspan="2"><a class="anchor" id="aeb21d3c2beb53cceeee6b5072c855043"></a>
  74. template&lt;class VarType &gt; </td></tr>
  75. <tr class="memitem:aeb21d3c2beb53cceeee6b5072c855043"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classRakNet_1_1VariableListDeltaTracker.html#aeb21d3c2beb53cceeee6b5072c855043">WriteVarToBitstream</a> (const VarType &amp;varData, <a class="el" href="classRakNet_1_1BitStream.html">RakNet::BitStream</a> *bitStream, unsigned char *bArray, unsigned short writeOffset)</td></tr>
  76. <tr class="memdesc:aeb21d3c2beb53cceeee6b5072c855043"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls <a class="el" href="classRakNet_1_1VariableListDeltaTracker.html#a349cf26aa8c11dd567babb507241dd72" title="Calls WriteVar. If the variable has changed, writes true, and writes the variable. Otherwise writes false.">WriteVarToBitstream()</a>. Additionally, adds the boolean result of <a class="el" href="classRakNet_1_1VariableListDeltaTracker.html#a1b290d704a8c53be32a7613f86f113f4">WriteVar()</a> to boolean bit array. <br/></td></tr>
  77. <tr class="separator:aeb21d3c2beb53cceeee6b5072c855043"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:a1e8263d93c52d3ba915bf7b6cf403e37"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1VariableListDeltaTracker.html#a1e8263d93c52d3ba915bf7b6cf403e37">FlagDirtyFromBitArray</a> (unsigned char *bArray)</td></tr>
  79. <tr class="separator:a1e8263d93c52d3ba915bf7b6cf403e37"><td class="memSeparator" colspan="2">&#160;</td></tr>
  80. </table><table class="memberdecls">
  81. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
  82. Static Public Member Functions</h2></td></tr>
  83. <tr class="memitem:a107d8082f40358de5025f1f44e93c47f"><td class="memTemplParams" colspan="2"><a class="anchor" id="a107d8082f40358de5025f1f44e93c47f"></a>
  84. template&lt;class VarType &gt; </td></tr>
  85. <tr class="memitem:a107d8082f40358de5025f1f44e93c47f"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classRakNet_1_1VariableListDeltaTracker.html#a107d8082f40358de5025f1f44e93c47f">ReadVarFromBitstream</a> (VarType &amp;varData, <a class="el" href="classRakNet_1_1BitStream.html">RakNet::BitStream</a> *bitStream)</td></tr>
  86. <tr class="memdesc:a107d8082f40358de5025f1f44e93c47f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Paired with a call to <a class="el" href="classRakNet_1_1VariableListDeltaTracker.html#a349cf26aa8c11dd567babb507241dd72" title="Calls WriteVar. If the variable has changed, writes true, and writes the variable. Otherwise writes false.">WriteVarToBitstream()</a>, will read a variable if it had changed. Otherwise the values remains the same. <br/></td></tr>
  87. <tr class="separator:a107d8082f40358de5025f1f44e93c47f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  88. </table>
  89. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  90. <div class="textblock"><p>Class to write a series of variables, copy the contents to memory, and return if the newly written value is different than what was last written Can also encode the reads, writes, and results directly to/from a bitstream </p>
  91. </div><h2 class="groupheader">Member Function Documentation</h2>
  92. <a class="anchor" id="a1e8263d93c52d3ba915bf7b6cf403e37"></a>
  93. <div class="memitem">
  94. <div class="memproto">
  95. <table class="memname">
  96. <tr>
  97. <td class="memname">void RakNet::VariableListDeltaTracker::FlagDirtyFromBitArray </td>
  98. <td>(</td>
  99. <td class="paramtype">unsigned char *&#160;</td>
  100. <td class="paramname"><em>bArray</em></td><td>)</td>
  101. <td></td>
  102. </tr>
  103. </table>
  104. </div><div class="memdoc">
  105. <p>Variables flagged dirty will cause <a class="el" href="classRakNet_1_1VariableListDeltaTracker.html#a1b290d704a8c53be32a7613f86f113f4">WriteVar()</a> to return true, even if the variable had not otherwise changed This updates all the variables in the list, where in each index <em>varsWritten</em> is true, so will the variable at the corresponding index be flagged dirty </p>
  106. </div>
  107. </div>
  108. <a class="anchor" id="a1b290d704a8c53be32a7613f86f113f4"></a>
  109. <div class="memitem">
  110. <div class="memproto">
  111. <div class="memtemplate">
  112. template&lt;class VarType &gt; </div>
  113. <table class="mlabels">
  114. <tr>
  115. <td class="mlabels-left">
  116. <table class="memname">
  117. <tr>
  118. <td class="memname">bool RakNet::VariableListDeltaTracker::WriteVar </td>
  119. <td>(</td>
  120. <td class="paramtype">const VarType &amp;&#160;</td>
  121. <td class="paramname"><em>varData</em></td><td>)</td>
  122. <td></td>
  123. </tr>
  124. </table>
  125. </td>
  126. <td class="mlabels-right">
  127. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  128. </tr>
  129. </table>
  130. </div><div class="memdoc">
  131. <p>Records the passed value of the variable to memory, and returns true if the value is different from the write before that (or if it is the first write) </p>
  132. <dl class="section pre"><dt>Precondition</dt><dd>Call StartWrite() before doing the first of a series of calls to WriteVar or other functions that call WriteVar </dd></dl>
  133. <dl class="section note"><dt>Note</dt><dd>Variables must be of the same type, written in the same order, each time </dd></dl>
  134. </div>
  135. </div>
  136. <hr/>The documentation for this class was generated from the following file:<ul>
  137. <li>D:/temp/RakNet_PC/Source/VariableListDeltaTracker.h</li>
  138. </ul>
  139. </div><!-- contents -->
  140. <!-- start footer part -->
  141. <hr class="footer"/><address class="footer"><small>
  142. Generated on Mon Jun 2 2014 20:10:29 for RakNet by &#160;<a href="http://www.doxygen.org/index.html">
  143. <img class="footer" src="doxygen.png" alt="doxygen"/>
  144. </a> 1.8.2
  145. </small></address>
  146. </body>
  147. </html>
粤ICP备19079148号