Tree_8c.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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. <meta name="generator" content="Doxygen 1.8.17"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>MQTT C Client Libraries Internals: Tree.c File Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
  24. <td id="projectalign" style="padding-left: 0.5em;">
  25. <div id="projectname">MQTT C Client Libraries Internals
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.17 -->
  34. <script type="text/javascript">
  35. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. /* @license-end */
  38. </script>
  39. <script type="text/javascript" src="menudata.js"></script>
  40. <script type="text/javascript" src="menu.js"></script>
  41. <script type="text/javascript">
  42. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  43. $(function() {
  44. initMenu('',true,false,'search.php','Search');
  45. $(document).ready(function() { init_search(); });
  46. });
  47. /* @license-end */</script>
  48. <div id="main-nav"></div>
  49. <!-- window showing the filter options -->
  50. <div id="MSearchSelectWindow"
  51. onmouseover="return searchBox.OnSearchSelectShow()"
  52. onmouseout="return searchBox.OnSearchSelectHide()"
  53. onkeydown="return searchBox.OnSearchSelectKey(event)">
  54. </div>
  55. <!-- iframe showing the search results (closed by default) -->
  56. <div id="MSearchResultsWindow">
  57. <iframe src="javascript:void(0)" frameborder="0"
  58. name="MSearchResults" id="MSearchResults">
  59. </iframe>
  60. </div>
  61. </div><!-- top -->
  62. <div class="header">
  63. <div class="summary">
  64. <a href="#define-members">Macros</a> &#124;
  65. <a href="#func-members">Functions</a> </div>
  66. <div class="headertitle">
  67. <div class="title">Tree.c File Reference</div> </div>
  68. </div><!--header-->
  69. <div class="contents">
  70. <p>functions which apply to tree structures.
  71. <a href="#details">More...</a></p>
  72. <div class="textblock"><code>#include &quot;Tree.h&quot;</code><br />
  73. <code>#include &lt;stdlib.h&gt;</code><br />
  74. <code>#include &lt;stdio.h&gt;</code><br />
  75. <code>#include &lt;string.h&gt;</code><br />
  76. <code>#include &quot;Heap.h&quot;</code><br />
  77. </div><div class="textblock"><div class="dynheader">
  78. Include dependency graph for Tree.c:</div>
  79. <div class="dyncontent">
  80. <div class="center"><img src="Tree_8c__incl.png" border="0" usemap="#Tree_8c" alt=""/></div>
  81. <map name="Tree_8c" id="Tree_8c">
  82. <area shape="rect" title="functions which apply to tree structures." alt="" coords="93,5,151,32"/>
  83. <area shape="rect" title=" " alt="" coords="5,80,68,107"/>
  84. <area shape="rect" title=" " alt="" coords="92,80,152,107"/>
  85. <area shape="rect" title=" " alt="" coords="177,80,241,107"/>
  86. </map>
  87. </div>
  88. </div><table class="memberdecls">
  89. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  90. Macros</h2></td></tr>
  91. <tr class="memitem:a98e60eaccf67d1bcce846ad591c71a2a"><td class="memItemLeft" align="right" valign="top"><a id="a98e60eaccf67d1bcce846ad591c71a2a"></a>
  92. #define&#160;</td><td class="memItemRight" valign="bottom"><b>TREE_C</b>&#160;&#160;&#160;/* so that malloc/free/realloc aren't redefined by Heap.h */</td></tr>
  93. <tr class="separator:a98e60eaccf67d1bcce846ad591c71a2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  94. <tr class="memitem:a437ef08681e7210d6678427030446a54"><td class="memItemLeft" align="right" valign="top"><a id="a437ef08681e7210d6678427030446a54"></a>
  95. #define&#160;</td><td class="memItemRight" valign="bottom"><b>LEFT</b>&#160;&#160;&#160;0</td></tr>
  96. <tr class="separator:a437ef08681e7210d6678427030446a54"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. <tr class="memitem:a80fb826a684cf3f0d306b22aa100ddac"><td class="memItemLeft" align="right" valign="top"><a id="a80fb826a684cf3f0d306b22aa100ddac"></a>
  98. #define&#160;</td><td class="memItemRight" valign="bottom"><b>RIGHT</b>&#160;&#160;&#160;1</td></tr>
  99. <tr class="separator:a80fb826a684cf3f0d306b22aa100ddac"><td class="memSeparator" colspan="2">&#160;</td></tr>
  100. <tr class="memitem:affe776513b24d84b39af8ab0930fef7f"><td class="memItemLeft" align="right" valign="top"><a id="affe776513b24d84b39af8ab0930fef7f"></a>
  101. #define&#160;</td><td class="memItemRight" valign="bottom"><b>max</b>(a, b)&#160;&#160;&#160;(a &gt; b) ? a : b;</td></tr>
  102. <tr class="separator:affe776513b24d84b39af8ab0930fef7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  103. </table><table class="memberdecls">
  104. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  105. Functions</h2></td></tr>
  106. <tr class="memitem:a652270057d64439ce3d6207d7a2cc84b"><td class="memItemLeft" align="right" valign="top"><a id="a652270057d64439ce3d6207d7a2cc84b"></a>
  107. int&#160;</td><td class="memItemRight" valign="bottom"><b>isRed</b> (<a class="el" href="structNodeStruct.html">Node</a> *aNode)</td></tr>
  108. <tr class="separator:a652270057d64439ce3d6207d7a2cc84b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. <tr class="memitem:a88bbea08f3a6d6f58e794f20a77cd114"><td class="memItemLeft" align="right" valign="top"><a id="a88bbea08f3a6d6f58e794f20a77cd114"></a>
  110. int&#160;</td><td class="memItemRight" valign="bottom"><b>isBlack</b> (<a class="el" href="structNodeStruct.html">Node</a> *aNode)</td></tr>
  111. <tr class="separator:a88bbea08f3a6d6f58e794f20a77cd114"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. <tr class="memitem:a9410a1449678720e084a7e19e1419f0b"><td class="memItemLeft" align="right" valign="top"><a id="a9410a1449678720e084a7e19e1419f0b"></a>
  113. void&#160;</td><td class="memItemRight" valign="bottom"><b>TreeRotate</b> (<a class="el" href="structTree.html">Tree</a> *aTree, <a class="el" href="structNodeStruct.html">Node</a> *curnode, int direction, int index)</td></tr>
  114. <tr class="separator:a9410a1449678720e084a7e19e1419f0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  115. <tr class="memitem:a09e97005c4b558e417576263f6a2e519"><td class="memItemLeft" align="right" valign="top"><a id="a09e97005c4b558e417576263f6a2e519"></a>
  116. <a class="el" href="structNodeStruct.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeBAASub</b> (<a class="el" href="structTree.html">Tree</a> *aTree, <a class="el" href="structNodeStruct.html">Node</a> *curnode, int which, int index)</td></tr>
  117. <tr class="separator:a09e97005c4b558e417576263f6a2e519"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <tr class="memitem:a798ac646499c5855a4a0bbb0980ad574"><td class="memItemLeft" align="right" valign="top"><a id="a798ac646499c5855a4a0bbb0980ad574"></a>
  119. void&#160;</td><td class="memItemRight" valign="bottom"><b>TreeBalanceAfterAdd</b> (<a class="el" href="structTree.html">Tree</a> *aTree, <a class="el" href="structNodeStruct.html">Node</a> *curnode, int index)</td></tr>
  120. <tr class="separator:a798ac646499c5855a4a0bbb0980ad574"><td class="memSeparator" colspan="2">&#160;</td></tr>
  121. <tr class="memitem:afa8473167abb71831644bf8a322bc3b6"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Tree_8c.html#afa8473167abb71831644bf8a322bc3b6">TreeAddByIndex</a> (<a class="el" href="structTree.html">Tree</a> *aTree, void *content, size_t size, int index)</td></tr>
  122. <tr class="memdesc:afa8473167abb71831644bf8a322bc3b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add an item to a tree. <a href="Tree_8c.html#afa8473167abb71831644bf8a322bc3b6">More...</a><br /></td></tr>
  123. <tr class="separator:afa8473167abb71831644bf8a322bc3b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  124. <tr class="memitem:a22375e6de7f2422f62f2094994568e15"><td class="memItemLeft" align="right" valign="top"><a id="a22375e6de7f2422f62f2094994568e15"></a>
  125. <a class="el" href="structNodeStruct.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeFindIndex1</b> (<a class="el" href="structTree.html">Tree</a> *aTree, void *key, int index, int value)</td></tr>
  126. <tr class="separator:a22375e6de7f2422f62f2094994568e15"><td class="memSeparator" colspan="2">&#160;</td></tr>
  127. <tr class="memitem:a250a4ceabb1ca40055aa195374dd5411"><td class="memItemLeft" align="right" valign="top"><a id="a250a4ceabb1ca40055aa195374dd5411"></a>
  128. <a class="el" href="structNodeStruct.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeFindContentIndex</b> (<a class="el" href="structTree.html">Tree</a> *aTree, void *key, int index)</td></tr>
  129. <tr class="separator:a250a4ceabb1ca40055aa195374dd5411"><td class="memSeparator" colspan="2">&#160;</td></tr>
  130. <tr class="memitem:a9d8b49c88976a5fe898cde75921d1455"><td class="memItemLeft" align="right" valign="top"><a id="a9d8b49c88976a5fe898cde75921d1455"></a>
  131. <a class="el" href="structNodeStruct.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeMinimum</b> (<a class="el" href="structNodeStruct.html">Node</a> *curnode)</td></tr>
  132. <tr class="separator:a9d8b49c88976a5fe898cde75921d1455"><td class="memSeparator" colspan="2">&#160;</td></tr>
  133. <tr class="memitem:ad985fd2cdb2aa281a4be97566eb13853"><td class="memItemLeft" align="right" valign="top"><a id="ad985fd2cdb2aa281a4be97566eb13853"></a>
  134. <a class="el" href="structNodeStruct.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeSuccessor</b> (<a class="el" href="structNodeStruct.html">Node</a> *curnode)</td></tr>
  135. <tr class="separator:ad985fd2cdb2aa281a4be97566eb13853"><td class="memSeparator" colspan="2">&#160;</td></tr>
  136. <tr class="memitem:afaf848f42d095378d5045464fa4a1abd"><td class="memItemLeft" align="right" valign="top"><a id="afaf848f42d095378d5045464fa4a1abd"></a>
  137. <a class="el" href="structNodeStruct.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeNextElementIndex</b> (<a class="el" href="structTree.html">Tree</a> *aTree, <a class="el" href="structNodeStruct.html">Node</a> *curnode, int index)</td></tr>
  138. <tr class="separator:afaf848f42d095378d5045464fa4a1abd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  139. <tr class="memitem:a1340134baba9248dbabf43ad4a8aa622"><td class="memItemLeft" align="right" valign="top"><a id="a1340134baba9248dbabf43ad4a8aa622"></a>
  140. <a class="el" href="structNodeStruct.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeBARSub</b> (<a class="el" href="structTree.html">Tree</a> *aTree, <a class="el" href="structNodeStruct.html">Node</a> *curnode, int which, int index)</td></tr>
  141. <tr class="separator:a1340134baba9248dbabf43ad4a8aa622"><td class="memSeparator" colspan="2">&#160;</td></tr>
  142. <tr class="memitem:a3e25fa034e04bd945ab61dcbca9243dc"><td class="memItemLeft" align="right" valign="top"><a id="a3e25fa034e04bd945ab61dcbca9243dc"></a>
  143. void&#160;</td><td class="memItemRight" valign="bottom"><b>TreeBalanceAfterRemove</b> (<a class="el" href="structTree.html">Tree</a> *aTree, <a class="el" href="structNodeStruct.html">Node</a> *curnode, int index)</td></tr>
  144. <tr class="separator:a3e25fa034e04bd945ab61dcbca9243dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  145. <tr class="memitem:a1263bdfc6a906db3023ca1a6ad5302a4"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Tree_8c.html#a1263bdfc6a906db3023ca1a6ad5302a4">TreeRemoveIndex</a> (<a class="el" href="structTree.html">Tree</a> *aTree, void *content, int index)</td></tr>
  146. <tr class="memdesc:a1263bdfc6a906db3023ca1a6ad5302a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove an item from a tree. <a href="Tree_8c.html#a1263bdfc6a906db3023ca1a6ad5302a4">More...</a><br /></td></tr>
  147. <tr class="separator:a1263bdfc6a906db3023ca1a6ad5302a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  148. <tr class="memitem:a6ec04f95fe9b003836f7f789cc6d90af"><td class="memItemLeft" align="right" valign="top"><a id="a6ec04f95fe9b003836f7f789cc6d90af"></a>
  149. void&#160;</td><td class="memItemRight" valign="bottom"><b>TreeInitializeNoMalloc</b> (<a class="el" href="structTree.html">Tree</a> *aTree, int(*compare)(void *, void *, int))</td></tr>
  150. <tr class="separator:a6ec04f95fe9b003836f7f789cc6d90af"><td class="memSeparator" colspan="2">&#160;</td></tr>
  151. <tr class="memitem:aa5ee1e466d266b289dc45cbd97116b83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structTree.html">Tree</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Tree_8c.html#aa5ee1e466d266b289dc45cbd97116b83">TreeInitialize</a> (int(*compare)(void *, void *, int))</td></tr>
  152. <tr class="memdesc:aa5ee1e466d266b289dc45cbd97116b83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates and initializes a new tree structure. <a href="Tree_8c.html#aa5ee1e466d266b289dc45cbd97116b83">More...</a><br /></td></tr>
  153. <tr class="separator:aa5ee1e466d266b289dc45cbd97116b83"><td class="memSeparator" colspan="2">&#160;</td></tr>
  154. <tr class="memitem:a8e255acb509907266243b2881d0d0baa"><td class="memItemLeft" align="right" valign="top"><a id="a8e255acb509907266243b2881d0d0baa"></a>
  155. void&#160;</td><td class="memItemRight" valign="bottom"><b>TreeAddIndex</b> (<a class="el" href="structTree.html">Tree</a> *aTree, int(*compare)(void *, void *, int))</td></tr>
  156. <tr class="separator:a8e255acb509907266243b2881d0d0baa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  157. <tr class="memitem:ac3cc0c325bb8ee4d1bfd5b823d7c0c44"><td class="memItemLeft" align="right" valign="top"><a id="ac3cc0c325bb8ee4d1bfd5b823d7c0c44"></a>
  158. void&#160;</td><td class="memItemRight" valign="bottom"><b>TreeFree</b> (<a class="el" href="structTree.html">Tree</a> *aTree)</td></tr>
  159. <tr class="separator:ac3cc0c325bb8ee4d1bfd5b823d7c0c44"><td class="memSeparator" colspan="2">&#160;</td></tr>
  160. <tr class="memitem:a2ca6a0094a3e0e0760423cb9a9057bdd"><td class="memItemLeft" align="right" valign="top"><a id="a2ca6a0094a3e0e0760423cb9a9057bdd"></a>
  161. void *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeAdd</b> (<a class="el" href="structTree.html">Tree</a> *aTree, void *content, size_t size)</td></tr>
  162. <tr class="separator:a2ca6a0094a3e0e0760423cb9a9057bdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  163. <tr class="memitem:accf6b6e5252b940776ab3753e6534ce9"><td class="memItemLeft" align="right" valign="top"><a id="accf6b6e5252b940776ab3753e6534ce9"></a>
  164. <a class="el" href="structNodeStruct.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeFindIndex</b> (<a class="el" href="structTree.html">Tree</a> *aTree, void *key, int index)</td></tr>
  165. <tr class="separator:accf6b6e5252b940776ab3753e6534ce9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  166. <tr class="memitem:a4d470b2b9029b3f2fba6a7f6010be415"><td class="memItemLeft" align="right" valign="top"><a id="a4d470b2b9029b3f2fba6a7f6010be415"></a>
  167. <a class="el" href="structNodeStruct.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeFind</b> (<a class="el" href="structTree.html">Tree</a> *aTree, void *key)</td></tr>
  168. <tr class="separator:a4d470b2b9029b3f2fba6a7f6010be415"><td class="memSeparator" colspan="2">&#160;</td></tr>
  169. <tr class="memitem:a4a8f51ee862702cb3e6b8df539b5e1a4"><td class="memItemLeft" align="right" valign="top"><a id="a4a8f51ee862702cb3e6b8df539b5e1a4"></a>
  170. <a class="el" href="structNodeStruct.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeNextElement</b> (<a class="el" href="structTree.html">Tree</a> *aTree, <a class="el" href="structNodeStruct.html">Node</a> *curnode)</td></tr>
  171. <tr class="separator:a4a8f51ee862702cb3e6b8df539b5e1a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  172. <tr class="memitem:a9c3b81e7e63498e3a8f7bd28c4caec10"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Tree_8c.html#a9c3b81e7e63498e3a8f7bd28c4caec10">TreeRemoveNodeIndex</a> (<a class="el" href="structTree.html">Tree</a> *aTree, <a class="el" href="structNodeStruct.html">Node</a> *curnode, int index)</td></tr>
  173. <tr class="memdesc:a9c3b81e7e63498e3a8f7bd28c4caec10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove an item from a tree. <a href="Tree_8c.html#a9c3b81e7e63498e3a8f7bd28c4caec10">More...</a><br /></td></tr>
  174. <tr class="separator:a9c3b81e7e63498e3a8f7bd28c4caec10"><td class="memSeparator" colspan="2">&#160;</td></tr>
  175. <tr class="memitem:a118186877dc679b41a00db4edf8b473e"><td class="memItemLeft" align="right" valign="top"><a id="a118186877dc679b41a00db4edf8b473e"></a>
  176. void *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeRemove</b> (<a class="el" href="structTree.html">Tree</a> *aTree, void *content)</td></tr>
  177. <tr class="separator:a118186877dc679b41a00db4edf8b473e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  178. <tr class="memitem:afe83c51e65e3cb9ba66acd431e3bdb6e"><td class="memItemLeft" align="right" valign="top"><a id="afe83c51e65e3cb9ba66acd431e3bdb6e"></a>
  179. void *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeRemoveKeyIndex</b> (<a class="el" href="structTree.html">Tree</a> *aTree, void *key, int index)</td></tr>
  180. <tr class="separator:afe83c51e65e3cb9ba66acd431e3bdb6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  181. <tr class="memitem:a2476b2a8c0ba785b45dfa82b8fd52907"><td class="memItemLeft" align="right" valign="top"><a id="a2476b2a8c0ba785b45dfa82b8fd52907"></a>
  182. void *&#160;</td><td class="memItemRight" valign="bottom"><b>TreeRemoveKey</b> (<a class="el" href="structTree.html">Tree</a> *aTree, void *key)</td></tr>
  183. <tr class="separator:a2476b2a8c0ba785b45dfa82b8fd52907"><td class="memSeparator" colspan="2">&#160;</td></tr>
  184. <tr class="memitem:a5900a3b9572e7b362b76a30d6074438d"><td class="memItemLeft" align="right" valign="top"><a id="a5900a3b9572e7b362b76a30d6074438d"></a>
  185. int&#160;</td><td class="memItemRight" valign="bottom"><b>TreeIntCompare</b> (void *a, void *b, int content)</td></tr>
  186. <tr class="separator:a5900a3b9572e7b362b76a30d6074438d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  187. <tr class="memitem:ac7cdf54a1d2710c2231d64e9a1c5550d"><td class="memItemLeft" align="right" valign="top"><a id="ac7cdf54a1d2710c2231d64e9a1c5550d"></a>
  188. int&#160;</td><td class="memItemRight" valign="bottom"><b>TreePtrCompare</b> (void *a, void *b, int content)</td></tr>
  189. <tr class="separator:ac7cdf54a1d2710c2231d64e9a1c5550d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  190. <tr class="memitem:a7160d170563e914085a8769155c9eae1"><td class="memItemLeft" align="right" valign="top"><a id="a7160d170563e914085a8769155c9eae1"></a>
  191. int&#160;</td><td class="memItemRight" valign="bottom"><b>TreeStringCompare</b> (void *a, void *b, int content)</td></tr>
  192. <tr class="separator:a7160d170563e914085a8769155c9eae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  193. </table>
  194. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  195. <div class="textblock"><p>functions which apply to tree structures. </p>
  196. <p>These trees can hold data of any sort, pointed to by the content pointer of the Node structure. </p>
  197. </div><h2 class="groupheader">Function Documentation</h2>
  198. <a id="afa8473167abb71831644bf8a322bc3b6"></a>
  199. <h2 class="memtitle"><span class="permalink"><a href="#afa8473167abb71831644bf8a322bc3b6">&#9670;&nbsp;</a></span>TreeAddByIndex()</h2>
  200. <div class="memitem">
  201. <div class="memproto">
  202. <table class="memname">
  203. <tr>
  204. <td class="memname">void * TreeAddByIndex </td>
  205. <td>(</td>
  206. <td class="paramtype"><a class="el" href="structTree.html">Tree</a> *&#160;</td>
  207. <td class="paramname"><em>aTree</em>, </td>
  208. </tr>
  209. <tr>
  210. <td class="paramkey"></td>
  211. <td></td>
  212. <td class="paramtype">void *&#160;</td>
  213. <td class="paramname"><em>content</em>, </td>
  214. </tr>
  215. <tr>
  216. <td class="paramkey"></td>
  217. <td></td>
  218. <td class="paramtype">size_t&#160;</td>
  219. <td class="paramname"><em>size</em>, </td>
  220. </tr>
  221. <tr>
  222. <td class="paramkey"></td>
  223. <td></td>
  224. <td class="paramtype">int&#160;</td>
  225. <td class="paramname"><em>index</em>&#160;</td>
  226. </tr>
  227. <tr>
  228. <td></td>
  229. <td>)</td>
  230. <td></td><td></td>
  231. </tr>
  232. </table>
  233. </div><div class="memdoc">
  234. <p>Add an item to a tree. </p>
  235. <dl class="params"><dt>Parameters</dt><dd>
  236. <table class="params">
  237. <tr><td class="paramname">aTree</td><td>the list to which the item is to be added </td></tr>
  238. <tr><td class="paramname">content</td><td>the list item content itself </td></tr>
  239. <tr><td class="paramname">size</td><td>the size of the element </td></tr>
  240. </table>
  241. </dd>
  242. </dl>
  243. <div class="dynheader">
  244. Here is the call graph for this function:</div>
  245. <div class="dyncontent">
  246. <div class="center"><img src="Tree_8c_afa8473167abb71831644bf8a322bc3b6_cgraph.png" border="0" usemap="#Tree_8c_afa8473167abb71831644bf8a322bc3b6_cgraph" alt=""/></div>
  247. <map name="Tree_8c_afa8473167abb71831644bf8a322bc3b6_cgraph" id="Tree_8c_afa8473167abb71831644bf8a322bc3b6_cgraph">
  248. <area shape="rect" title="Add an item to a tree." alt="" coords="5,5,123,32"/>
  249. <area shape="rect" href="Heap_8c.html#a59e53a989d69c3da767487596d9bfa1f" title="Allocates a block of memory." alt="" coords="171,5,248,32"/>
  250. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="296,5,431,32"/>
  251. </map>
  252. </div>
  253. </div>
  254. </div>
  255. <a id="aa5ee1e466d266b289dc45cbd97116b83"></a>
  256. <h2 class="memtitle"><span class="permalink"><a href="#aa5ee1e466d266b289dc45cbd97116b83">&#9670;&nbsp;</a></span>TreeInitialize()</h2>
  257. <div class="memitem">
  258. <div class="memproto">
  259. <table class="memname">
  260. <tr>
  261. <td class="memname"><a class="el" href="structTree.html">Tree</a>* TreeInitialize </td>
  262. <td>(</td>
  263. <td class="paramtype">int(*)(void *, void *, int)&#160;</td>
  264. <td class="paramname"><em>compare</em></td><td>)</td>
  265. <td></td>
  266. </tr>
  267. </table>
  268. </div><div class="memdoc">
  269. <p>Allocates and initializes a new tree structure. </p>
  270. <dl class="section return"><dt>Returns</dt><dd>a pointer to the new tree structure </dd></dl>
  271. <div class="dynheader">
  272. Here is the call graph for this function:</div>
  273. <div class="dyncontent">
  274. <div class="center"><img src="Tree_8c_aa5ee1e466d266b289dc45cbd97116b83_cgraph.png" border="0" usemap="#Tree_8c_aa5ee1e466d266b289dc45cbd97116b83_cgraph" alt=""/></div>
  275. <map name="Tree_8c_aa5ee1e466d266b289dc45cbd97116b83_cgraph" id="Tree_8c_aa5ee1e466d266b289dc45cbd97116b83_cgraph">
  276. <area shape="rect" title="Allocates and initializes a new tree structure." alt="" coords="5,5,100,32"/>
  277. <area shape="rect" href="Heap_8c.html#a59e53a989d69c3da767487596d9bfa1f" title="Allocates a block of memory." alt="" coords="148,5,225,32"/>
  278. <area shape="rect" href="Thread_8c.html#a7e92185eb22775c76e1b6b8865468f17" title="Lock a mutex which has alrea." alt="" coords="273,5,408,32"/>
  279. </map>
  280. </div>
  281. </div>
  282. </div>
  283. <a id="a1263bdfc6a906db3023ca1a6ad5302a4"></a>
  284. <h2 class="memtitle"><span class="permalink"><a href="#a1263bdfc6a906db3023ca1a6ad5302a4">&#9670;&nbsp;</a></span>TreeRemoveIndex()</h2>
  285. <div class="memitem">
  286. <div class="memproto">
  287. <table class="memname">
  288. <tr>
  289. <td class="memname">void * TreeRemoveIndex </td>
  290. <td>(</td>
  291. <td class="paramtype"><a class="el" href="structTree.html">Tree</a> *&#160;</td>
  292. <td class="paramname"><em>aTree</em>, </td>
  293. </tr>
  294. <tr>
  295. <td class="paramkey"></td>
  296. <td></td>
  297. <td class="paramtype">void *&#160;</td>
  298. <td class="paramname"><em>content</em>, </td>
  299. </tr>
  300. <tr>
  301. <td class="paramkey"></td>
  302. <td></td>
  303. <td class="paramtype">int&#160;</td>
  304. <td class="paramname"><em>index</em>&#160;</td>
  305. </tr>
  306. <tr>
  307. <td></td>
  308. <td>)</td>
  309. <td></td><td></td>
  310. </tr>
  311. </table>
  312. </div><div class="memdoc">
  313. <p>Remove an item from a tree. </p>
  314. <dl class="params"><dt>Parameters</dt><dd>
  315. <table class="params">
  316. <tr><td class="paramname">aTree</td><td>the list to which the item is to be added </td></tr>
  317. <tr><td class="paramname">curnode</td><td>the list item content itself </td></tr>
  318. </table>
  319. </dd>
  320. </dl>
  321. </div>
  322. </div>
  323. <a id="a9c3b81e7e63498e3a8f7bd28c4caec10"></a>
  324. <h2 class="memtitle"><span class="permalink"><a href="#a9c3b81e7e63498e3a8f7bd28c4caec10">&#9670;&nbsp;</a></span>TreeRemoveNodeIndex()</h2>
  325. <div class="memitem">
  326. <div class="memproto">
  327. <table class="memname">
  328. <tr>
  329. <td class="memname">void* TreeRemoveNodeIndex </td>
  330. <td>(</td>
  331. <td class="paramtype"><a class="el" href="structTree.html">Tree</a> *&#160;</td>
  332. <td class="paramname"><em>aTree</em>, </td>
  333. </tr>
  334. <tr>
  335. <td class="paramkey"></td>
  336. <td></td>
  337. <td class="paramtype"><a class="el" href="structNodeStruct.html">Node</a> *&#160;</td>
  338. <td class="paramname"><em>curnode</em>, </td>
  339. </tr>
  340. <tr>
  341. <td class="paramkey"></td>
  342. <td></td>
  343. <td class="paramtype">int&#160;</td>
  344. <td class="paramname"><em>index</em>&#160;</td>
  345. </tr>
  346. <tr>
  347. <td></td>
  348. <td>)</td>
  349. <td></td><td></td>
  350. </tr>
  351. </table>
  352. </div><div class="memdoc">
  353. <p>Remove an item from a tree. </p>
  354. <dl class="params"><dt>Parameters</dt><dd>
  355. <table class="params">
  356. <tr><td class="paramname">aTree</td><td>the list to which the item is to be added </td></tr>
  357. <tr><td class="paramname">curnode</td><td>the list item content itself </td></tr>
  358. </table>
  359. </dd>
  360. </dl>
  361. </div>
  362. </div>
  363. </div><!-- contents -->
  364. <!-- start footer part -->
  365. <hr class="footer"/><address class="footer"><small>
  366. Generated on Thu Sep 29 2022 11:34:46 for MQTT C Client Libraries Internals by &#160;<a href="http://www.doxygen.org/index.html">
  367. <img class="footer" src="doxygen.png" alt="doxygen"/>
  368. </a> 1.8.17
  369. </small></address>
  370. </body>
  371. </html>