class_dictionary.rst 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_Dictionary:
  4. Dictionary
  5. ==========
  6. **Category:** Built-In Types
  7. Brief Description
  8. -----------------
  9. Dictionary type.
  10. Member Functions
  11. ----------------
  12. +------------------------------+-----------------------------------------------------------------------------------------------+
  13. | void | :ref:`clear<class_Dictionary_clear>` **(** **)** |
  14. +------------------------------+-----------------------------------------------------------------------------------------------+
  15. | :ref:`bool<class_bool>` | :ref:`empty<class_Dictionary_empty>` **(** **)** |
  16. +------------------------------+-----------------------------------------------------------------------------------------------+
  17. | void | :ref:`erase<class_Dictionary_erase>` **(** var value **)** |
  18. +------------------------------+-----------------------------------------------------------------------------------------------+
  19. | :ref:`bool<class_bool>` | :ref:`has<class_Dictionary_has>` **(** var value **)** |
  20. +------------------------------+-----------------------------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`has_all<class_Dictionary_has_all>` **(** :ref:`Array<class_array>` values **)** |
  22. +------------------------------+-----------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`hash<class_Dictionary_hash>` **(** **)** |
  24. +------------------------------+-----------------------------------------------------------------------------------------------+
  25. | :ref:`Array<class_array>` | :ref:`keys<class_Dictionary_keys>` **(** **)** |
  26. +------------------------------+-----------------------------------------------------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`parse_json<class_Dictionary_parse_json>` **(** :ref:`String<class_string>` json **)** |
  28. +------------------------------+-----------------------------------------------------------------------------------------------+
  29. | :ref:`int<class_int>` | :ref:`size<class_Dictionary_size>` **(** **)** |
  30. +------------------------------+-----------------------------------------------------------------------------------------------+
  31. | :ref:`String<class_string>` | :ref:`to_json<class_Dictionary_to_json>` **(** **)** |
  32. +------------------------------+-----------------------------------------------------------------------------------------------+
  33. Description
  34. -----------
  35. Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference.
  36. Member Function Description
  37. ---------------------------
  38. .. _class_Dictionary_clear:
  39. - void **clear** **(** **)**
  40. Clear the dictionary, removing all key/value pairs.
  41. .. _class_Dictionary_empty:
  42. - :ref:`bool<class_bool>` **empty** **(** **)**
  43. Return true if the dictionary is empty.
  44. .. _class_Dictionary_erase:
  45. - void **erase** **(** var value **)**
  46. Erase a dictionary key/value pair by key.
  47. .. _class_Dictionary_has:
  48. - :ref:`bool<class_bool>` **has** **(** var value **)**
  49. Return true if the dictionary has a given key.
  50. .. _class_Dictionary_has_all:
  51. - :ref:`bool<class_bool>` **has_all** **(** :ref:`Array<class_array>` values **)**
  52. .. _class_Dictionary_hash:
  53. - :ref:`int<class_int>` **hash** **(** **)**
  54. Return a hashed integer value representing the dictionary contents.
  55. .. _class_Dictionary_keys:
  56. - :ref:`Array<class_array>` **keys** **(** **)**
  57. Return the list of keys in the dictionary.
  58. .. _class_Dictionary_parse_json:
  59. - :ref:`int<class_int>` **parse_json** **(** :ref:`String<class_string>` json **)**
  60. Parse json text to the dictionary. Return OK when successed or the error code when failed.
  61. .. _class_Dictionary_size:
  62. - :ref:`int<class_int>` **size** **(** **)**
  63. Return the size of the dictionary (in pairs).
  64. .. _class_Dictionary_to_json:
  65. - :ref:`String<class_string>` **to_json** **(** **)**
  66. Return the dictionary as json text.