Dictionary.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Dictionary" category="Built-In Types" version="3.1">
  3. <brief_description>
  4. Dictionary type.
  5. </brief_description>
  6. <description>
  7. Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference.
  8. Erasing elements while iterating over them [b]is not supported[/b].
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <demos>
  13. </demos>
  14. <methods>
  15. <method name="clear">
  16. <description>
  17. Clear the dictionary, removing all key/value pairs.
  18. </description>
  19. </method>
  20. <method name="duplicate">
  21. <return type="Dictionary">
  22. </return>
  23. <argument index="0" name="deep" type="bool" default="False">
  24. </argument>
  25. <description>
  26. Creates a copy of the dictionary, and returns it.
  27. </description>
  28. </method>
  29. <method name="empty">
  30. <return type="bool">
  31. </return>
  32. <description>
  33. Return true if the dictionary is empty.
  34. </description>
  35. </method>
  36. <method name="erase">
  37. <return type="bool">
  38. </return>
  39. <argument index="0" name="key" type="Variant">
  40. </argument>
  41. <description>
  42. Erase a dictionary key/value pair by key. Do not erase elements while iterating over the dictionary.
  43. </description>
  44. </method>
  45. <method name="get">
  46. <return type="Variant">
  47. </return>
  48. <argument index="0" name="key" type="Variant">
  49. </argument>
  50. <argument index="1" name="default" type="Variant" default="Null">
  51. </argument>
  52. <description>
  53. Returns the current value for the specified key in the [code]Dictionary[/code]. If the key does not exist, the method returns the value of the optional default argument, or Null if it is omitted.
  54. </description>
  55. </method>
  56. <method name="has">
  57. <return type="bool">
  58. </return>
  59. <argument index="0" name="key" type="Variant">
  60. </argument>
  61. <description>
  62. Return true if the dictionary has a given key.
  63. </description>
  64. </method>
  65. <method name="has_all">
  66. <return type="bool">
  67. </return>
  68. <argument index="0" name="keys" type="Array">
  69. </argument>
  70. <description>
  71. Return true if the dictionary has all of the keys in the given array.
  72. </description>
  73. </method>
  74. <method name="hash">
  75. <return type="int">
  76. </return>
  77. <description>
  78. Return a hashed integer value representing the dictionary contents.
  79. </description>
  80. </method>
  81. <method name="keys">
  82. <return type="Array">
  83. </return>
  84. <description>
  85. Return the list of keys in the [code]Dictionary[/code].
  86. </description>
  87. </method>
  88. <method name="size">
  89. <return type="int">
  90. </return>
  91. <description>
  92. Return the size of the dictionary (in pairs).
  93. </description>
  94. </method>
  95. <method name="values">
  96. <return type="Array">
  97. </return>
  98. <description>
  99. Return the list of values in the [code]Dictionary[/code].
  100. </description>
  101. </method>
  102. </methods>
  103. <constants>
  104. </constants>
  105. </class>