y_hashmap.inc 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /**
  2. * <library name="y_hashmap">
  3. * <section>
  4. * Description
  5. * </section>
  6. * Maps string indexes to integer indexes. Uses a fast hash to get an array
  7. * slot, then a linked list to resolve collisions.
  8. * <section>
  9. * Version
  10. * </section>
  11. * 2.0
  12. * <section>
  13. * Functions
  14. * </section>
  15. * <subsection>
  16. * Stock
  17. * </subsection><ul>
  18. * <symbol name="HashMap_Init">Associate a hash map with an array.</symbol>
  19. * <symbol name="HashMap_Add">Add a value under a given string.</symbol>
  20. * <symbol name="HashMap_Get">Get a value from a string.</symbol>
  21. * <symbol name="HashMap_RemoveKey">Remove a string and its value from a hash map.</symbol>
  22. * <symbol name="HashMap_Set">Change the value associated with a key.</symbol>
  23. * </ul><section>
  24. * Definitions
  25. * </section><ul>
  26. * <symbol name="HASH_MAP_DATA">What should be added to enums to be hash map referenced.</symbol>
  27. * <symbol name="HashMap">Declare a new hash map.</symbol>
  28. * </ul>
  29. * </library>
  30. *//** *//*
  31. Legal:
  32. Version: MPL 1.1
  33. The contents of this file are subject to the Mozilla Public License Version
  34. 1.1 the "License"; you may not use this file except in compliance with
  35. the License. You may obtain a copy of the License at
  36. http://www.mozilla.org/MPL/
  37. Software distributed under the License is distributed on an "AS IS" basis,
  38. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  39. for the specific language governing rights and limitations under the
  40. License.
  41. The Original Code is the YSI framework.
  42. The Initial Developer of the Original Code is Alex "Y_Less" Cole.
  43. Portions created by the Initial Developer are Copyright C 2011
  44. the Initial Developer. All Rights Reserved.
  45. Contributors:
  46. Y_Less
  47. koolk
  48. JoeBullet/Google63
  49. g_aSlice/Slice
  50. Misiur
  51. samphunter
  52. tianmeta
  53. maddinat0r
  54. spacemud
  55. Crayder
  56. Dayvison
  57. Ahmad45123
  58. Zeex
  59. irinel1996
  60. Yiin-
  61. Chaprnks
  62. Konstantinos
  63. Masterchen09
  64. Southclaws
  65. PatchwerkQWER
  66. m0k1
  67. paulommu
  68. udan111
  69. Thanks:
  70. JoeBullet/Google63 - Handy arbitrary ASM jump code using SCTRL.
  71. ZeeX - Very productive conversations.
  72. koolk - IsPlayerinAreaEx code.
  73. TheAlpha - Danish translation.
  74. breadfish - German translation.
  75. Fireburn - Dutch translation.
  76. yom - French translation.
  77. 50p - Polish translation.
  78. Zamaroht - Spanish translation.
  79. Los - Portuguese translation.
  80. Dracoblue, sintax, mabako, Xtreme, other coders - Producing other modes for
  81. me to strive to better.
  82. Pixels^ - Running XScripters where the idea was born.
  83. Matite - Pestering me to release it and using it.
  84. Very special thanks to:
  85. Thiadmer - PAWN, whose limits continue to amaze me!
  86. Kye/Kalcor - SA:MP.
  87. SA:MP Team past, present and future - SA:MP.
  88. Optional plugins:
  89. Gamer_Z - GPS.
  90. Incognito - Streamer.
  91. Me - sscanf2, fixes2, Whirlpool.
  92. */
  93. #if !defined _INC_y_hashmap
  94. #tryinclude "y_hashmap\y_hashmap_entry"
  95. #endif
  96. #if !defined _INC_y_hashmap
  97. #tryinclude "YSI_Core\y_hashmap\y_hashmap_entry"
  98. #endif
  99. #if !defined _INC_y_hashmap
  100. #tryinclude "YSI\YSI_Core\y_hashmap\y_hashmap_entry"
  101. #endif
  102. #if !defined _INC_y_hashmap
  103. #tryinclude <YSI_Core\y_hashmap\y_hashmap_entry>
  104. #endif
  105. #if !defined _INC_y_hashmap
  106. #tryinclude <YSI\YSI_Core\y_hashmap\y_hashmap_entry>
  107. #endif
  108. #if !defined _INC_y_hashmap
  109. #error Could not find y_hashmap
  110. #endif