ClassDB.xml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ClassDB" inherits="Object" category="Core" version="3.1.2">
  3. <brief_description>
  4. Class information repository.
  5. </brief_description>
  6. <description>
  7. Provides access to metadata stored for every available class.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="can_instance" qualifiers="const">
  13. <return type="bool">
  14. </return>
  15. <argument index="0" name="class" type="String">
  16. </argument>
  17. <description>
  18. Returns [code]true[/code] if you can instance objects from the specified 'class', [code]false[/code] in other case.
  19. </description>
  20. </method>
  21. <method name="class_exists" qualifiers="const">
  22. <return type="bool">
  23. </return>
  24. <argument index="0" name="class" type="String">
  25. </argument>
  26. <description>
  27. Returns whether the specified 'class' is available or not.
  28. </description>
  29. </method>
  30. <method name="class_get_category" qualifiers="const">
  31. <return type="String">
  32. </return>
  33. <argument index="0" name="class" type="String">
  34. </argument>
  35. <description>
  36. Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required.
  37. </description>
  38. </method>
  39. <method name="class_get_integer_constant" qualifiers="const">
  40. <return type="int">
  41. </return>
  42. <argument index="0" name="class" type="String">
  43. </argument>
  44. <argument index="1" name="name" type="String">
  45. </argument>
  46. <description>
  47. Returns the value of the integer constant 'name' of 'class' or its ancestry. Always returns 0 when the constant could not be found.
  48. </description>
  49. </method>
  50. <method name="class_get_integer_constant_list" qualifiers="const">
  51. <return type="PoolStringArray">
  52. </return>
  53. <argument index="0" name="class" type="String">
  54. </argument>
  55. <argument index="1" name="no_inheritance" type="bool" default="false">
  56. </argument>
  57. <description>
  58. Returns an array with the names all the integer constants of 'class' or its ancestry.
  59. </description>
  60. </method>
  61. <method name="class_get_method_list" qualifiers="const">
  62. <return type="Array">
  63. </return>
  64. <argument index="0" name="class" type="String">
  65. </argument>
  66. <argument index="1" name="no_inheritance" type="bool" default="false">
  67. </argument>
  68. <description>
  69. Returns an array with all the methods of 'class' or its ancestry if 'no_inheritance' is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: args, default_args, flags, id, name, return: (class_name, hint, hint_string, name, type, usage).
  70. </description>
  71. </method>
  72. <method name="class_get_property" qualifiers="const">
  73. <return type="Variant">
  74. </return>
  75. <argument index="0" name="object" type="Object">
  76. </argument>
  77. <argument index="1" name="property" type="String">
  78. </argument>
  79. <description>
  80. Returns the value of 'property' of 'class' or its ancestry.
  81. </description>
  82. </method>
  83. <method name="class_get_property_list" qualifiers="const">
  84. <return type="Array">
  85. </return>
  86. <argument index="0" name="class" type="String">
  87. </argument>
  88. <argument index="1" name="no_inheritance" type="bool" default="false">
  89. </argument>
  90. <description>
  91. Returns an array with all the properties of 'class' or its ancestry if 'no_inheritance' is [code]false[/code].
  92. </description>
  93. </method>
  94. <method name="class_get_signal" qualifiers="const">
  95. <return type="Dictionary">
  96. </return>
  97. <argument index="0" name="class" type="String">
  98. </argument>
  99. <argument index="1" name="signal" type="String">
  100. </argument>
  101. <description>
  102. Returns the 'signal' data of 'class' or its ancestry. The returned value is a [Dictionary] with the following keys: args, default_args, flags, id, name, return: (class_name, hint, hint_string, name, type, usage).
  103. </description>
  104. </method>
  105. <method name="class_get_signal_list" qualifiers="const">
  106. <return type="Array">
  107. </return>
  108. <argument index="0" name="class" type="String">
  109. </argument>
  110. <argument index="1" name="no_inheritance" type="bool" default="false">
  111. </argument>
  112. <description>
  113. Returns an array with all the signals of 'class' or its ancestry if 'no_inheritance' is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal].
  114. </description>
  115. </method>
  116. <method name="class_has_integer_constant" qualifiers="const">
  117. <return type="bool">
  118. </return>
  119. <argument index="0" name="class" type="String">
  120. </argument>
  121. <argument index="1" name="name" type="String">
  122. </argument>
  123. <description>
  124. Returns whether 'class' or its ancestry has an integer constant called 'name' or not.
  125. </description>
  126. </method>
  127. <method name="class_has_method" qualifiers="const">
  128. <return type="bool">
  129. </return>
  130. <argument index="0" name="class" type="String">
  131. </argument>
  132. <argument index="1" name="method" type="String">
  133. </argument>
  134. <argument index="2" name="no_inheritance" type="bool" default="false">
  135. </argument>
  136. <description>
  137. Returns whether 'class' (or its ancestry if 'no_inheritance' is false) has a method called 'method' or not.
  138. </description>
  139. </method>
  140. <method name="class_has_signal" qualifiers="const">
  141. <return type="bool">
  142. </return>
  143. <argument index="0" name="class" type="String">
  144. </argument>
  145. <argument index="1" name="signal" type="String">
  146. </argument>
  147. <description>
  148. Returns whether 'class' or its ancestry has a signal called 'signal' or not.
  149. </description>
  150. </method>
  151. <method name="class_set_property" qualifiers="const">
  152. <return type="int" enum="Error">
  153. </return>
  154. <argument index="0" name="object" type="Object">
  155. </argument>
  156. <argument index="1" name="property" type="String">
  157. </argument>
  158. <argument index="2" name="value" type="Variant">
  159. </argument>
  160. <description>
  161. Sets 'property' value of 'class' to 'value'.
  162. </description>
  163. </method>
  164. <method name="get_class_list" qualifiers="const">
  165. <return type="PoolStringArray">
  166. </return>
  167. <description>
  168. Returns the names of all the classes available.
  169. </description>
  170. </method>
  171. <method name="get_inheriters_from_class" qualifiers="const">
  172. <return type="PoolStringArray">
  173. </return>
  174. <argument index="0" name="class" type="String">
  175. </argument>
  176. <description>
  177. Returns the names of all the classes that directly or indirectly inherit from 'class'.
  178. </description>
  179. </method>
  180. <method name="get_parent_class" qualifiers="const">
  181. <return type="String">
  182. </return>
  183. <argument index="0" name="class" type="String">
  184. </argument>
  185. <description>
  186. Returns the parent class of 'class'.
  187. </description>
  188. </method>
  189. <method name="instance" qualifiers="const">
  190. <return type="Variant">
  191. </return>
  192. <argument index="0" name="class" type="String">
  193. </argument>
  194. <description>
  195. Creates an instance of 'class'.
  196. </description>
  197. </method>
  198. <method name="is_class_enabled" qualifiers="const">
  199. <return type="bool">
  200. </return>
  201. <argument index="0" name="class" type="String">
  202. </argument>
  203. <description>
  204. Returns whether this class is enabled or not.
  205. </description>
  206. </method>
  207. <method name="is_parent_class" qualifiers="const">
  208. <return type="bool">
  209. </return>
  210. <argument index="0" name="class" type="String">
  211. </argument>
  212. <argument index="1" name="inherits" type="String">
  213. </argument>
  214. <description>
  215. Returns whether 'inherits' is an ancestor of 'class' or not.
  216. </description>
  217. </method>
  218. </methods>
  219. <constants>
  220. </constants>
  221. </class>