1
0

y_hashmap.inc 3.2 KB

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