2023-01-05 13:25:55 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/**************************************************************************/  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*  object.h                                                              */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/**************************************************************************/  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*                         This file is part of:                          */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*                             GODOT ENGINE                               */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*                        https://godotengine.org                         */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/**************************************************************************/  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*                                                                        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* Permission is hereby granted, free of charge, to any person obtaining  */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* a copy of this software and associated documentation files (the        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* "Software"), to deal in the Software without restriction, including    */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* without limitation the rights to use, copy, modify, merge, publish,    */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* distribute, sublicense, and/or sell copies of the Software, and to     */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* permit persons to whom the Software is furnished to do so, subject to  */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* the following conditions:                                              */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*                                                                        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* The above copyright notice and this permission notice shall be         */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* included in all copies or substantial portions of the Software.        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*                                                                        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/**************************************************************************/  
						 
					
						
							
								
									
										
										
										
											2018-01-05 00:50:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-02-01 10:33:58 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# pragma once 
  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/extension/gdextension_interface.h" 
  
						 
					
						
							
								
									
										
										
										
											2025-05-02 01:57:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/object/gdtype.h" 
  
						 
					
						
							
								
									
										
										
										
											2022-03-09 14:58:40 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/object/message_queue.h" 
  
						 
					
						
							
								
									
										
										
										
											2020-11-07 19:33:38 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/object/object_id.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "core/os/spin_lock.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "core/templates/hash_map.h" 
  
						 
					
						
							
								
									
										
										
										
											2022-05-19 17:00:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/templates/hash_set.h" 
  
						 
					
						
							
								
									
										
										
										
											2020-11-07 19:33:38 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/templates/list.h" 
  
						 
					
						
							
								
									
										
										
										
											2021-02-10 19:22:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/templates/safe_refcount.h" 
  
						 
					
						
							
								
									
										
										
										
											2020-11-07 19:33:38 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/variant/callable_bind.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "core/variant/variant.h" 
  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-08-05 20:35:08 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								template  < typename  T >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								class  TypedArray ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-27 14:42:42 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								template  < typename  T >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								class  Ref ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								enum  PropertyHint  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_HINT_NONE ,  ///< no hint provided.
 
							 
						 
					
						
							
								
									
										
										
										
											2025-09-12 12:40:07 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_RANGE ,  ///< hint_text = "min,max[,step][,or_greater][,or_less][,prefer_slider][,hide_control][,radians_as_degrees][,degrees][,exp][,suffix:<keyword>] range.
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									PROPERTY_HINT_ENUM ,  ///< hint_text= "val1,val2,val3,etc"
 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-04 23:42:23 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_ENUM_SUGGESTION ,  ///< hint_text= "val1,val2,val3,etc"
 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-07 18:17:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_EXP_EASING ,  /// exponential easing function (Math::ease) use "attenuation" hint string to revert (flip h), "positive_only" to exclude in-out and out-in. (ie: "attenuation,positive_only")
 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-05 02:58:21 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_LINK , 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									PROPERTY_HINT_FLAGS ,  ///< hint_text= "flag1,flag2,etc" (as bit flags)
 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-10 22:20:57 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_LAYERS_2D_RENDER , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_HINT_LAYERS_2D_PHYSICS , 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-08 20:56:33 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_LAYERS_2D_NAVIGATION , 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-10 22:20:57 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_LAYERS_3D_RENDER , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_HINT_LAYERS_3D_PHYSICS , 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-08 20:56:33 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_LAYERS_3D_NAVIGATION , 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_FILE ,  ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,"
 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-21 23:58:29 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_DIR ,  ///< a directory path must be passed
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									PROPERTY_HINT_GLOBAL_FILE ,  ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,"
 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-21 23:58:29 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_GLOBAL_DIR ,  ///< a directory path must be passed
 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-15 00:26:37 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_RESOURCE_TYPE ,  ///< a comma-separated resource object type, e.g. "NoiseTexture,GradientTexture2D". Subclasses can be excluded with a "-" prefix if placed *after* the base class, e.g. "Texture2D,-MeshTexture".
 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_MULTILINE_TEXT ,  ///< used for string properties that can contain multiple lines
 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-27 13:10:04 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_EXPRESSION ,  ///< used for string properties that can contain multiple lines
 
							 
						 
					
						
							
								
									
										
										
										
											2018-08-17 03:50:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_PLACEHOLDER_TEXT ,  ///< used to set a placeholder text for string properties
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									PROPERTY_HINT_COLOR_NO_ALPHA ,  ///< used for ignoring alpha component when editing a color
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-22 19:28:37 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_OBJECT_ID , 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-02 19:11:05 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_TYPE_STRING ,  ///< a type string, the hint is the base type to choose
 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-20 02:39:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE ,  // Deprecated.
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-18 10:59:31 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_OBJECT_TOO_BIG ,  ///< object is too big to send
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-27 20:50:25 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_NODE_PATH_VALID_TYPES , 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-19 15:54:33 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_SAVE_FILE ,  ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,". This opens a save dialog
 
							 
						 
					
						
							
								
									
										
											 
										
											
												Implement Running Godot as Movie Writer
* Allows running the game in "movie writer" mode.
* It ensures entirely stable framerate, so your run can be saved stable and with proper sound (which is impossible if your CPU/GPU can't sustain doing this in real-time).
* If disabling vsync, it can save movies faster than the game is run, but if you want to control the interaction it can get difficult.
* Implements a simple, default MJPEG writer.
This new features has two main use cases, which have high demand:
* Saving game videos in high quality and ensuring the frame rate is *completely* stable, always.
* Using Godot as a tool to make movies and animations (which is ideal if you want interaction, or creating them procedurally. No other software is as good for this).
**Note**: This feature **IS NOT** for capturing real-time footage. Use something like OBS, SimpleScreenRecorder or FRAPS to achieve that, as they do a much better job at intercepting the compositor than Godot can probably do using Vulkan or OpenGL natively. If your game runs near real-time when capturing, you can still use this feature but it will play no sound (sound will be saved directly).
Usage:
$ godot --write-movie movie.avi [scene_file.tscn]
Missing:
* Options for configuring video writing via GLOBAL_DEF
* UI Menu for launching with this mode from the editor.
* Add to list of command line options.
* Add a feature tag to override configurations when movie writing (fantastic for saving videos with highest quality settings).
											 
										 
										
											2022-06-17 00:55:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_GLOBAL_SAVE_FILE ,  ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,". This opens a save dialog
 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-20 02:39:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_INT_IS_OBJECTID ,  // Deprecated.
 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-23 14:53:27 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_INT_IS_POINTER , 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-21 01:02:29 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_ARRAY_TYPE , 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-23 14:08:50 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_LOCALE_ID , 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-04 15:04:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_LOCALIZABLE_STRING , 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-19 00:42:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_NODE_TYPE ,  ///< a node object type
 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-21 16:03:38 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_HIDE_QUATERNION_EDIT ,  /// Only Node3D::transform should hide the quaternion editor.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-09 18:51:43 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_PASSWORD , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-12 01:37:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_LAYERS_AVOIDANCE , 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-24 13:03:28 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_DICTIONARY_TYPE , 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-26 20:34:29 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_TOOL_BUTTON , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-18 04:00:43 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_ONESHOT ,  ///< the property will be changed by self after setting, such as AudioStreamPlayer.playing, Particles.emitting.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-26 00:04:25 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_NO_NODEPATH ,  /// < this property will not contain a NodePath, regardless of type (Array, Dictionary, List, etc.). Needed for SceneTreeDock.
 
							 
						 
					
						
							
								
									
										
										
										
											2025-06-16 19:47:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_GROUP_ENABLE ,  ///< used to make the property's group checkable. Only use for boolean types.
 
							 
						 
					
						
							
								
									
										
										
										
											2025-01-13 23:00:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_INPUT_NAME , 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-15 13:16:42 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_HINT_FILE_PATH , 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									PROPERTY_HINT_MAX , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								enum  PropertyUsageFlags  {  
						 
					
						
							
								
									
										
										
										
											2021-06-17 19:10:18 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_NONE  =  0 , 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-23 02:54:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_STORAGE  =  1  < <  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_EDITOR  =  1  < <  2 , 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-09 15:31:44 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_INTERNAL  =  1  < <  3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_CHECKABLE  =  1  < <  4 ,  // Used for editing global variables.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_CHECKED  =  1  < <  5 ,  // Used for editing global variables.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-23 02:54:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_GROUP  =  1  < <  6 ,  // Used for grouping props in the editor.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_CATEGORY  =  1  < <  7 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_SUBGROUP  =  1  < <  8 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_CLASS_IS_BITFIELD  =  1  < <  9 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_NO_INSTANCE_STATE  =  1  < <  10 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_RESTART_IF_CHANGED  =  1  < <  11 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_SCRIPT_VARIABLE  =  1  < <  12 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_STORE_IF_NULL  =  1  < <  13 , 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-29 18:51:45 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED  =  1  < <  14 , 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-20 02:39:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE  =  1  < <  15 ,  // Deprecated.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-29 18:51:45 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_CLASS_IS_ENUM  =  1  < <  16 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_NIL_IS_VARIANT  =  1  < <  17 , 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-09 15:31:44 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_ARRAY  =  1  < <  18 ,  // Used in the inspector to group properties as elements of an array.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-10 00:04:35 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_ALWAYS_DUPLICATE  =  1  < <  19 ,  // When duplicating a resource, always duplicate, even with subresource duplication disabled.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-10 14:42:05 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_NEVER_DUPLICATE  =  1  < <  20 ,  // When duplicating a resource, never duplicate, even with subresource duplication enabled.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_HIGH_END_GFX  =  1  < <  21 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT  =  1  < <  22 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT  =  1  < <  23 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_KEYING_INCREMENTS  =  1  < <  24 ,  // Used in inspector to increment property when keyed in animation player.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-20 02:39:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_DEFERRED_SET_RESOURCE  =  1  < <  25 ,  // Deprecated.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-10 14:42:05 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT  =  1  < <  26 ,  // For Object properties, instantiate them when creating in editor.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_EDITOR_BASIC_SETTING  =  1  < <  27 ,  //for project or editor settings, show when basic settings are selected.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_READ_ONLY  =  1  < <  28 ,  // Mark a property as read-only in the inspector.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-10 11:40:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PROPERTY_USAGE_SECRET  =  1  < <  29 ,  // Export preset credentials that should be stored separately from the rest of the export config.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-23 02:54:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_DEFAULT  =  PROPERTY_USAGE_STORAGE  |  PROPERTY_USAGE_EDITOR , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PROPERTY_USAGE_NO_EDITOR  =  PROPERTY_USAGE_STORAGE , 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								} ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-13 16:46:14 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define ADD_SIGNAL(m_signal) ::ClassDB::add_signal(get_class_static(), m_signal) 
  
						 
					
						
							
								
									
										
										
										
											2025-04-03 22:09:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define ADD_PROPERTY(m_property, m_setter, m_getter) ::ClassDB::add_property(get_class_static(), m_property, StringName(m_setter), StringName(m_getter)) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define ADD_PROPERTYI(m_property, m_setter, m_getter, m_index) ::ClassDB::add_property(get_class_static(), m_property, StringName(m_setter), StringName(m_getter), m_index) 
  
						 
					
						
							
								
									
										
										
										
											2021-08-13 16:46:14 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define ADD_PROPERTY_DEFAULT(m_property, m_default) ::ClassDB::set_property_default_value(get_class_static(), m_property, m_default) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define ADD_GROUP(m_name, m_prefix) ::ClassDB::add_property_group(get_class_static(), m_name, m_prefix) 
  
						 
					
						
							
								
									
										
										
										
											2021-11-08 23:53:41 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define ADD_GROUP_INDENT(m_name, m_prefix, m_depth) ::ClassDB::add_property_group(get_class_static(), m_name, m_prefix, m_depth) 
  
						 
					
						
							
								
									
										
										
										
											2021-08-13 16:46:14 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define ADD_SUBGROUP(m_name, m_prefix) ::ClassDB::add_property_subgroup(get_class_static(), m_name, m_prefix) 
  
						 
					
						
							
								
									
										
										
										
											2021-11-08 23:53:41 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define ADD_SUBGROUP_INDENT(m_name, m_prefix, m_depth) ::ClassDB::add_property_subgroup(get_class_static(), m_name, m_prefix, m_depth) 
  
						 
					
						
							
								
									
										
										
										
											2021-08-12 11:26:47 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define ADD_LINKED_PROPERTY(m_property, m_linked_property) ::ClassDB::add_linked_property(get_class_static(), m_property, m_linked_property) 
  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-06 15:42:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define ADD_CLASS_DEPENDENCY(m_class) ::ClassDB::add_class_dependency(get_class_static(), m_class) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# else 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define ADD_CLASS_DEPENDENCY(m_class) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-03 22:09:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define ADD_ARRAY_COUNT(m_label, m_count_property, m_count_property_setter, m_count_property_getter, m_prefix) ClassDB::add_property_array_count(get_class_static(), m_label, m_count_property, StringName(m_count_property_setter), StringName(m_count_property_getter), m_prefix) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define ADD_ARRAY_COUNT_WITH_USAGE_FLAGS(m_label, m_count_property, m_count_property_setter, m_count_property_getter, m_prefix, m_property_usage_flags) ClassDB::add_property_array_count(get_class_static(), m_label, m_count_property, StringName(m_count_property_setter), StringName(m_count_property_getter), m_prefix, m_property_usage_flags) 
  
						 
					
						
							
								
									
										
										
										
											2021-08-31 10:48:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define ADD_ARRAY(m_array_path, m_prefix) ClassDB::add_property_array(get_class_static(), m_array_path, m_prefix) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-11-22 16:10:41 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								// Helper macro to use with PROPERTY_HINT_ARRAY_TYPE for arrays of specific resources:
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// PropertyInfo(Variant::ARRAY, "fallbacks", PROPERTY_HINT_ARRAY_TYPE, MAKE_RESOURCE_TYPE_HINT("Font")
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define MAKE_RESOURCE_TYPE_HINT(m_type) vformat("%s / %s:%s", Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, m_type) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								struct  PropertyInfo  {  
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Variant : : Type  type  =  Variant : : NIL ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									String  name ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-13 16:46:14 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									StringName  class_name ;  // For classes
 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PropertyHint  hint  =  PROPERTY_HINT_NONE ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									String  hint_string ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									uint32_t  usage  =  PROPERTY_USAGE_DEFAULT ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-07-21 01:18:14 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// If you are thinking about adding another member to this class, ask the maintainer (Juan) first.
 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-12 11:26:47 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-30 21:24:34 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  PropertyInfo  added_usage ( uint32_t  p_fl )  const  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										PropertyInfo  pi  =  * this ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										pi . usage  | =  p_fl ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  pi ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-25 17:45:20 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									operator  Dictionary ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  PropertyInfo  from_dict ( const  Dictionary  & p_dict ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-25 17:45:20 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PropertyInfo ( )  { } 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-14 12:54:37 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-08 22:36:19 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PropertyInfo ( const  Variant : : Type  p_type ,  const  String  & p_name ,  const  PropertyHint  p_hint  =  PROPERTY_HINT_NONE ,  const  String  & p_hint_string  =  " " ,  const  uint32_t  p_usage  =  PROPERTY_USAGE_DEFAULT ,  const  StringName  & p_class_name  =  StringName ( ) )  : 
							 
						 
					
						
							
								
									
										
										
										
											2017-12-06 21:36:34 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											type ( p_type ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											name ( p_name ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											hint ( p_hint ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											hint_string ( p_hint_string ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											usage ( p_usage )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-23 19:10:32 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										if  ( hint  = =  PROPERTY_HINT_RESOURCE_TYPE )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											class_name  =  hint_string ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											class_name  =  p_class_name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-14 12:54:37 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-12-06 21:36:34 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PropertyInfo ( const  StringName  & p_class_name )  : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											type ( Variant : : OBJECT ) , 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											class_name ( p_class_name )  { } 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-23 19:10:32 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									explicit  PropertyInfo ( const  GDExtensionPropertyInfo  & pinfo )  : 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-06 22:24:13 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											type ( ( Variant : : Type ) pinfo . type ) , 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-23 10:43:09 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											name ( * reinterpret_cast < StringName  * > ( pinfo . name ) ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											class_name ( * reinterpret_cast < StringName  * > ( pinfo . class_name ) ) , 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-06 22:24:13 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											hint ( ( PropertyHint ) pinfo . hint ) , 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-23 10:43:09 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											hint_string ( * reinterpret_cast < String  * > ( pinfo . hint_string ) ) , 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-06 22:24:13 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											usage ( pinfo . usage )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-07-05 16:30:01 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  operator = = ( const  PropertyInfo  & p_info )  const  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  ( ( type  = =  p_info . type )  & & 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												( name  = =  p_info . name )  & & 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												( class_name  = =  p_info . class_name )  & & 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												( hint  = =  p_info . hint )  & & 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												( hint_string  = =  p_info . hint_string )  & & 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												( usage  = =  p_info . usage ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  operator < ( const  PropertyInfo  & p_info )  const  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  name  <  p_info . name ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-05-01 02:53:41 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								} ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-08-05 20:35:08 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								TypedArray < Dictionary >  convert_property_list ( const  List < PropertyInfo >  * p_list ) ;  
						 
					
						
							
								
									
										
										
										
											2024-05-07 12:48:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								TypedArray < Dictionary >  convert_property_list ( const  Vector < PropertyInfo >  & p_vector ) ;  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-23 12:21:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								enum  MethodFlags  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									METHOD_FLAG_NORMAL  =  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									METHOD_FLAG_EDITOR  =  2 , 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-23 02:54:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									METHOD_FLAG_CONST  =  4 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									METHOD_FLAG_VIRTUAL  =  8 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									METHOD_FLAG_VARARG  =  16 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									METHOD_FLAG_STATIC  =  32 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									METHOD_FLAG_OBJECT_CORE  =  64 , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-18 10:07:35 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									METHOD_FLAG_VIRTUAL_REQUIRED  =  128 , 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-23 12:21:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									METHOD_FLAGS_DEFAULT  =  METHOD_FLAG_NORMAL , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								struct  MethodInfo  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									String  name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PropertyInfo  return_val ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-23 12:21:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									uint32_t  flags  =  METHOD_FLAGS_DEFAULT ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  id  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-07 12:48:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Vector < PropertyInfo >  arguments ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-28 17:17:38 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Vector < Variant >  default_arguments ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-25 03:51:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  return_val_metadata  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Vector < int >  arguments_metadata ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  get_argument_meta ( int  p_arg )  const  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										ERR_FAIL_COND_V ( p_arg  <  - 1  | |  p_arg  >  arguments . size ( ) ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( p_arg  = =  - 1 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return  return_val_metadata ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  arguments_metadata . size ( )  >  p_arg  ?  arguments_metadata [ p_arg ]  :  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-12-17 12:42:14 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									inline  bool  operator = = ( const  MethodInfo  & p_method )  const  {  return  id  = =  p_method . id  & &  name  = =  p_method . name ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									inline  bool  operator < ( const  MethodInfo  & p_method )  const  {  return  id  = =  p_method . id  ?  ( name  <  p_method . name )  :  ( id  <  p_method . id ) ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-08-25 17:45:20 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									operator  Dictionary ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  MethodInfo  from_dict ( const  Dictionary  & p_dict ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-12-20 17:10:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									uint32_t  get_compatibility_hash ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-23 12:21:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									MethodInfo ( )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									explicit  MethodInfo ( const  GDExtensionMethodInfo  & pinfo )  : 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-23 10:43:09 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											name ( * reinterpret_cast < StringName  * > ( pinfo . name ) ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return_val ( PropertyInfo ( pinfo . return_value ) ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											flags ( pinfo . flags ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											id ( pinfo . id )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-07 12:48:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										for  ( uint32_t  i  =  0 ;  i  <  pinfo . argument_count ;  i + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											arguments . push_back ( PropertyInfo ( pinfo . arguments [ i ] ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-23 10:43:09 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										const  Variant  * def_values  =  ( const  Variant  * ) pinfo . default_arguments ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										for  ( uint32_t  j  =  0 ;  j  <  pinfo . default_argument_count ;  j + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											default_arguments . push_back ( def_values [ j ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-23 12:21:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									MethodInfo ( const  String  & p_name )  {  name  =  p_name ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									template  < typename . . .  VarArgs > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MethodInfo ( const  String  & p_name ,  VarArgs . . .  p_params )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										name  =  p_name ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-07 12:48:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										arguments  =  Vector < PropertyInfo > {  p_params . . .  } ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-23 12:21:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MethodInfo ( Variant : : Type  ret )  {  return_val . type  =  ret ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MethodInfo ( Variant : : Type  ret ,  const  String  & p_name )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return_val . type  =  ret ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										name  =  p_name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									template  < typename . . .  VarArgs > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MethodInfo ( Variant : : Type  ret ,  const  String  & p_name ,  VarArgs . . .  p_params )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										name  =  p_name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return_val . type  =  ret ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-07 12:48:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										arguments  =  Vector < PropertyInfo > {  p_params . . .  } ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-23 12:21:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MethodInfo ( const  PropertyInfo  & p_ret ,  const  String  & p_name )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return_val  =  p_ret ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										name  =  p_name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									template  < typename . . .  VarArgs > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MethodInfo ( const  PropertyInfo  & p_ret ,  const  String  & p_name ,  VarArgs . . .  p_params )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return_val  =  p_ret ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										name  =  p_name ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-07 12:48:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										arguments  =  Vector < PropertyInfo > {  p_params . . .  } ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-23 12:21:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								} ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								// API used to extend in GDExtension and other C compatible compiled languages.
  
						 
					
						
							
								
									
										
										
										
											2021-06-04 14:33:48 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								class  MethodBind ;  
						 
					
						
							
								
									
										
										
										
											2023-02-16 09:38:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								class  GDExtension ;  
						 
					
						
							
								
									
										
										
										
											2021-06-04 14:33:48 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								struct  ObjectGDExtension  {  
						 
					
						
							
								
									
										
										
										
											2023-02-16 09:38:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtension  * library  =  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ObjectGDExtension  * parent  =  nullptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									List < ObjectGDExtension  * >  children ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-04 14:33:48 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									StringName  parent_class_name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									StringName  class_name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  editor_class  =  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-04 20:34:14 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  reloadable  =  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-15 12:01:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  is_virtual  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  is_abstract  =  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-20 11:36:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  is_exposed  =  true ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-02 14:10:54 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  is_runtime  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  is_placeholder  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# endif 
  
						 
					
						
							
								
									
										
										
										
											2025-09-30 14:34:46 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifndef DISABLE_DEPRECATED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  legacy_unexposed_class  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# endif  // DISABLE_DEPRECATED
  
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassSet  set ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									GDExtensionClassGet  get ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									GDExtensionClassGetPropertyList  get_property_list ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-25 22:19:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassFreePropertyList2  free_property_list2 ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassPropertyCanRevert  property_can_revert ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									GDExtensionClassPropertyGetRevert  property_get_revert ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-09-09 13:05:16 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassValidateProperty  validate_property ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-24 03:07:22 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifndef DISABLE_DEPRECATED 
  
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassNotification  notification ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-25 22:19:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassFreePropertyList  free_property_list ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-24 03:07:22 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# endif  // DISABLE_DEPRECATED
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									GDExtensionClassNotification2  notification2 ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassToString  to_string ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									GDExtensionClassReference  reference ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									GDExtensionClassReference  unreference ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									GDExtensionClassGetRID  get_rid ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-04 14:33:48 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  bool  is_class ( const  String  & p_class )  const  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										const  ObjectGDExtension  * e  =  this ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-04 14:33:48 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										while  ( e )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( p_class  = =  e - > class_name . operator  String ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											e  =  e - > parent ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-19 12:58:49 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  * class_userdata  =  nullptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-22 22:34:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifndef DISABLE_DEPRECATED 
  
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassCreateInstance  create_instance ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-22 22:34:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# endif  // DISABLE_DEPRECATED
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									GDExtensionClassCreateInstance2  create_instance2 ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassFreeInstance  free_instance ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-20 17:10:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifndef DISABLE_DEPRECATED 
  
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassGetVirtual  get_virtual ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-15 20:03:49 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassGetVirtualCallData  get_virtual_call_data ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-20 17:10:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# endif  // DISABLE_DEPRECATED
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									GDExtensionClassGetVirtual2  get_virtual2 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									GDExtensionClassGetVirtualCallData2  get_virtual_call_data2 ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-15 20:03:49 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassCallVirtualWithData  call_virtual_with_data ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-04 20:34:14 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassRecreateInstance  recreate_instance ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  * tracking_userdata  =  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-21 17:56:50 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  ( * track_instance ) ( void  * p_userdata ,  void  * p_instance )  =  nullptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  ( * untrack_instance ) ( void  * p_userdata ,  void  * p_instance )  =  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-04 20:34:14 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# endif 
  
						 
					
						
							
								
									
										
										
										
											2021-06-04 14:33:48 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								} ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-06-18 10:07:35 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define GDVIRTUAL_CALL(m_name, ...) _gdvirtual_##m_name##_call(__VA_ARGS__) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define GDVIRTUAL_CALL_PTR(m_obj, m_name, ...) m_obj->_gdvirtual_##m_name##_call(__VA_ARGS__) 
  
						 
					
						
							
								
									
										
										
										
											2022-03-10 08:17:38 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-05-15 13:09:41 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifdef DEBUG_ENABLED 
  
						 
					
						
							
								
									
										
										
										
											2021-08-21 22:52:44 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define GDVIRTUAL_BIND(m_name, ...) ::ClassDB::add_virtual_method(get_class_static(), _gdvirtual_##m_name##_get_method_info(), true, sarray(__VA_ARGS__)); 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# else 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define GDVIRTUAL_BIND(m_name, ...) 
  
						 
					
						
							
								
									
										
										
										
											2025-05-15 13:09:41 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# endif  // DEBUG_ENABLED
  
						 
					
						
							
								
									
										
										
										
											2024-12-20 17:10:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define GDVIRTUAL_BIND_COMPAT(m_alias, ...) ::ClassDB::add_virtual_compatibility_method(get_class_static(), _gdvirtual_##m_alias##_get_method_info(), true, sarray(__VA_ARGS__)); 
  
						 
					
						
							
								
									
										
										
										
											2021-08-26 01:44:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define GDVIRTUAL_IS_OVERRIDDEN(m_name) _gdvirtual_##m_name##_overridden() 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define GDVIRTUAL_IS_OVERRIDDEN_PTR(m_obj, m_name) m_obj->_gdvirtual_##m_name##_overridden() 
  
						 
					
						
							
								
									
										
										
										
											2021-06-19 12:58:49 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								/*
  
						 
					
						
							
								
									
										
										
										
											2022-02-16 13:56:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 *  The  following  is  an  incomprehensible  blob  of  hacks  and  workarounds  to 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  compensate  for  many  of  the  fallacies  in  C + + .  As  a  plus ,  this  macro  pretty 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  much  alone  defines  the  object  model . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 */ 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-05-24 17:12:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/// `GDSOFTCLASS` provides `Object` functionality, such as being able to use `Object::cast_to()`.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/// Use this for `Object` subclasses that are not registered in `ClassDB` (use `GDCLASS` otherwise).
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define GDSOFTCLASS(m_class, m_inherits)                                                                         \ 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								public :                                                                                                           \ 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									using  self_type  =  m_class ;                                                                                    \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									using  super_type  =  m_inherits ;                                                                                \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  _FORCE_INLINE_  void  * get_class_ptr_static ( )  {                                                          \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										static  int  ptr ;                                                                                           \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  & ptr ;                                                                                              \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  is_class_ptr ( void  * p_ptr )  const  override  {                                                       \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  ( p_ptr  = =  get_class_ptr_static ( ) )  | |  m_inherits : : is_class_ptr ( p_ptr ) ;                              \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                                                                                 \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								protected :                                                                                                        \ 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  bool  ( Object : : * _get_get ( )  const ) ( const  StringName  & p_name ,  Variant  & )  const  {                  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  ( bool  ( Object : : * ) ( const  StringName  & ,  Variant  & )  const )  &  m_class : : _get ;                           \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  _getv ( const  StringName  & p_name ,  Variant  & r_ret )  const  override  {                                 \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( m_class : : _get_get ( )  ! =  m_inherits : : _get_get ( ) )  {                                                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( _get ( p_name ,  r_ret ) )  {                                                                            \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												return  true ;                                                                                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}                                                                                                     \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                         \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  m_inherits : : _getv ( p_name ,  r_ret ) ;                                                                  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  bool  ( Object : : * _get_set ( )  const ) ( const  StringName  & p_name ,  const  Variant  & p_property )  {        \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  ( bool  ( Object : : * ) ( const  StringName  & ,  const  Variant  & ) )  &  m_class : : _set ;                           \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  _setv ( const  StringName  & p_name ,  const  Variant  & p_property )  override  {                            \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( m_inherits : : _setv ( p_name ,  p_property ) )  {                                                              \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return  true ;                                                                                          \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                         \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( m_class : : _get_set ( )  ! =  m_inherits : : _get_set ( ) )  {                                                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return  _set ( p_name ,  p_property ) ;                                                                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                         \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  false ;                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  void  ( Object : : * _get_validate_property ( )  const ) ( PropertyInfo  &  p_property )  const  {              \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  ( void  ( Object : : * ) ( PropertyInfo  & )  const )  &  m_class : : _validate_property ;                            \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  void  _validate_propertyv ( PropertyInfo  & p_property )  const  override  {                                   \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										m_inherits : : _validate_propertyv ( p_property ) ;                                                              \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( m_class : : _get_validate_property ( )  ! =  m_inherits : : _get_validate_property ( ) )  {                          \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											_validate_property ( p_property ) ;                                                                       \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                         \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  bool  ( Object : : * _get_property_can_revert ( )  const ) ( const  StringName  & p_name )  const  {             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  ( bool  ( Object : : * ) ( const  StringName  & )  const )  &  m_class : : _property_can_revert ;                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  _property_can_revertv ( const  StringName  & p_name )  const  override  {                                 \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( m_class : : _get_property_can_revert ( )  ! =  m_inherits : : _get_property_can_revert ( ) )  {                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( _property_can_revert ( p_name ) )  {                                                                   \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												return  true ;                                                                                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}                                                                                                     \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                         \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  m_inherits : : _property_can_revertv ( p_name ) ;                                                         \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  bool  ( Object : : * _get_property_get_revert ( )  const ) ( const  StringName  & p_name ,  Variant  & )  const  {  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  ( bool  ( Object : : * ) ( const  StringName  & ,  Variant  & )  const )  &  m_class : : _property_get_revert ;           \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  _property_get_revertv ( const  StringName  & p_name ,  Variant  & r_ret )  const  override  {                 \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( m_class : : _get_property_get_revert ( )  ! =  m_inherits : : _get_property_get_revert ( ) )  {                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( _property_get_revert ( p_name ,  r_ret ) )  {                                                            \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												return  true ;                                                                                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}                                                                                                     \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                         \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  m_inherits : : _property_get_revertv ( p_name ,  r_ret ) ;                                                  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  void  ( Object : : * _get_notification ( )  const ) ( int )  {                                               \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  ( void  ( Object : : * ) ( int ) )  &  m_class : : _notification ;                                                  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  void  _notification_forwardv ( int  p_notification )  override  {                                            \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										m_inherits : : _notification_forwardv ( p_notification ) ;                                                       \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( m_class : : _get_notification ( )  ! =  m_inherits : : _get_notification ( ) )  {                                    \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											_notification ( p_notification ) ;                                                                        \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                         \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  void  _notification_backwardv ( int  p_notification )  override  {                                           \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( m_class : : _get_notification ( )  ! =  m_inherits : : _get_notification ( ) )  {                                    \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											_notification ( p_notification ) ;                                                                        \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                         \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										m_inherits : : _notification_backwardv ( p_notification ) ;                                                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                                                                                 \
							 
						 
					
						
							
								
									
										
										
										
											2025-03-31 15:18:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								private :  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-05-24 17:12:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/// `GDSOFTCLASS` provides `Object` functionality, such as being able to use `Object::cast_to()`.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/// Use this for `Object` subclasses that are registered in `ObjectDB` (use `GDSOFTCLASS` otherwise).
  
						 
					
						
							
								
									
										
										
										
											2024-12-30 10:23:23 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define GDCLASS(m_class, m_inherits)                                                                                                        \ 
  
						 
					
						
							
								
									
										
										
										
											2025-03-31 15:18:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDSOFTCLASS ( m_class ,  m_inherits )                                                                                                         \
							 
						 
					
						
							
								
									
										
										
										
											2024-12-30 10:23:23 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								private :                                                                                                                                     \ 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  operator = ( const  m_class  & p_rval )  { }                                                                                                 \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									friend  class  : : ClassDB ;                                                                                                                  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                                                                                                            \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								public :                                                                                                                                      \ 
						 
					
						
							
								
									
										
										
										
											2025-05-02 01:57:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  const  GDType  & _get_typev ( )  const  override  {                                                                                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  get_gdtype_static ( ) ;                                                                                                          \
							 
						 
					
						
							
								
									
										
										
										
											2025-04-08 23:25:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									}                                                                                                                                        \
							 
						 
					
						
							
								
									
										
										
										
											2025-05-02 01:57:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  const  GDType  & get_gdtype_static ( )  {                                                                                               \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										static  GDType  * _class_static ;                                                                                                        \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( unlikely ( ! _class_static ) )  {                                                                                                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											assign_type_static ( & _class_static ,  # m_class ,  & super_type : : get_gdtype_static ( ) ) ;                                                  \
							 
						 
					
						
							
								
									
										
										
										
											2024-12-30 10:23:23 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										}                                                                                                                                    \
							 
						 
					
						
							
								
									
										
										
										
											2025-05-02 01:57:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  * _class_static ;                                                                                                               \
							 
						 
					
						
							
								
									
										
										
										
											2024-12-30 10:23:23 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									}                                                                                                                                        \
							 
						 
					
						
							
								
									
										
										
										
											2025-05-02 01:57:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  const  StringName  & get_class_static ( )  {                                                                                            \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  get_gdtype_static ( ) . get_name ( ) ;                                                                                               \
							 
						 
					
						
							
								
									
										
										
										
											2024-12-30 10:23:23 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									}                                                                                                                                        \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                                                                                                            \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								protected :                                                                                                                                   \ 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  static  void  ( * _get_bind_methods ( ) ) ( )  {                                                                                    \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  & m_class : : _bind_methods ;                                                                                                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                                                        \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  static  void  ( * _get_bind_compatibility_methods ( ) ) ( )  {                                                                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  & m_class : : _bind_compatibility_methods ;                                                                                        \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                                                        \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                                                                                                            \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								public :                                                                                                                                      \ 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  void  initialize_class ( )  {                                                                                                         \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										static  bool  initialized  =  false ;                                                                                                     \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( initialized )  {                                                                                                                   \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return ;                                                                                                                          \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                                                    \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										m_inherits : : initialize_class ( ) ;                                                                                                      \
							 
						 
					
						
							
								
									
										
										
										
											2025-04-06 16:53:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										_add_class_to_classdb ( get_class_static ( ) ,  super_type : : get_class_static ( ) ) ;                                                           \
							 
						 
					
						
							
								
									
										
										
										
											2024-12-30 10:23:23 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										if  ( m_class : : _get_bind_methods ( )  ! =  m_inherits : : _get_bind_methods ( ) )  {                                                               \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											_bind_methods ( ) ;                                                                                                                 \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                                                    \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( m_class : : _get_bind_compatibility_methods ( )  ! =  m_inherits : : _get_bind_compatibility_methods ( ) )  {                                   \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											_bind_compatibility_methods ( ) ;                                                                                                   \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                                                    \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										initialized  =  true ;                                                                                                                  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                                                        \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                                                                                                            \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								protected :                                                                                                                                   \ 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  void  _initialize_classv ( )  override  {                                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										initialize_class ( ) ;                                                                                                                  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                                                        \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  void  ( Object : : * _get_get_property_list ( )  const ) ( List < PropertyInfo >  *  p_list )  const  {                                       \
							 
						 
					
						
							
								
									
										
										
										
											2025-03-29 12:56:52 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  ( void  ( Object : : * ) ( List < PropertyInfo >  * )  const )  &  m_class : : _get_property_list ;                                                 \
							 
						 
					
						
							
								
									
										
										
										
											2024-12-30 10:23:23 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									}                                                                                                                                        \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  void  _get_property_listv ( List < PropertyInfo >  * p_list ,  bool  p_reversed )  const  override  {                                           \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( ! p_reversed )  {                                                                                                                   \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											m_inherits : : _get_property_listv ( p_list ,  p_reversed ) ;                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                                                    \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										p_list - > push_back ( PropertyInfo ( Variant : : NIL ,  get_class_static ( ) ,  PROPERTY_HINT_NONE ,  get_class_static ( ) ,  PROPERTY_USAGE_CATEGORY ) ) ;  \
							 
						 
					
						
							
								
									
										
										
										
											2025-04-04 15:53:35 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										_get_property_list_from_classdb ( # m_class ,  p_list ,  true ,  this ) ;                                                                       \
							 
						 
					
						
							
								
									
										
										
										
											2024-12-30 10:23:23 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										if  ( m_class : : _get_get_property_list ( )  ! =  m_inherits : : _get_get_property_list ( ) )  {                                                     \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											_get_property_list ( p_list ) ;                                                                                                      \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                                                    \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( p_reversed )  {                                                                                                                    \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											m_inherits : : _get_property_listv ( p_list ,  p_reversed ) ;                                                                             \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}                                                                                                                                    \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                                                                                                        \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                                                                                                            \
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								private :  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-12-30 10:23:23 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define OBJ_SAVE_TYPE(m_class)                       \ 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								public :                                               \ 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  String  get_save_class ( )  const  override  {  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  # m_class ;                              \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}                                                 \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                     \
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								private :  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-10-05 13:04:18 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								class  ClassDB ;  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								class  ScriptInstance ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								class  Object  {  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								public :  
						 
					
						
							
								
									
										
										
										
											2023-08-26 17:39:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									typedef  Object  self_type ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									enum  ConnectFlags  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										CONNECT_DEFERRED  =  1 , 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-11 17:37:23 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										CONNECT_PERSIST  =  2 ,  // Hint for scene to save this connection.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-01 15:44:42 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										CONNECT_ONE_SHOT  =  4 , 
							 
						 
					
						
							
								
									
										
										
										
											2018-08-20 13:38:18 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										CONNECT_REFERENCE_COUNTED  =  8 , 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-11 17:37:23 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										CONNECT_APPEND_SOURCE_OBJECT  =  16 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										CONNECT_INHERITED  =  32 ,  // Used in editor builds.
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-06-22 23:08:23 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// Store on each object a bitfield to quickly test whether it is derived from some "key" classes
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// that are commonly tested in performance sensitive code.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// Ensure unsigned to bitpack.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									enum  class  AncestralClass  :  unsigned  int  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										REF_COUNTED  =  1  < <  0 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										NODE  =  1  < <  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										RESOURCE  =  1  < <  2 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										SCRIPT  =  1  < <  3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										CANVAS_ITEM  =  1  < <  4 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										CONTROL  =  1  < <  5 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										NODE_2D  =  1  < <  6 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										COLLISION_OBJECT_2D  =  1  < <  7 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										AREA_2D  =  1  < <  8 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										NODE_3D  =  1  < <  9 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										VISUAL_INSTANCE_3D  =  1  < <  10 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										GEOMETRY_INSTANCE_3D  =  1  < <  11 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										COLLISION_OBJECT_3D  =  1  < <  12 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										PHYSICS_BODY_3D  =  1  < <  13 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										MESH_INSTANCE_3D  =  1  < <  14 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-09-22 01:30:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  constexpr  AncestralClass  static_ancestral_class  =  ( AncestralClass ) 0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									struct  Connection  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-19 16:27:19 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										: : Signal  signal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										Callable  callable ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										uint32_t  flags  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										bool  operator < ( const  Connection  & p_conn )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										operator  Variant ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										Connection ( )  { } 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										Connection ( const  Variant  & p_variant ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								private :  
						 
					
						
							
								
									
										
										
										
											2014-04-05 12:39:30 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifdef DEBUG_ENABLED 
  
						 
					
						
							
								
									
										
										
										
											2018-10-01 16:46:50 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									friend  struct  _ObjectDebugLock ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-15 13:09:41 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# endif  // DEBUG_ENABLED
  
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									friend  bool  predelete_handler ( Object  * ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									friend  void  postinitialize_handler ( Object  * ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ObjectGDExtension  * _extension  =  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-19 12:58:49 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDExtensionClassInstancePtr  _extension_instance  =  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-04 14:33:48 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-19 16:27:19 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									struct  SignalData  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										struct  Slot  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											int  reference_count  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											Connection  conn ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											List < Connection > : : Element  * cE  =  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										MethodInfo  user ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-15 11:50:46 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										HashMap < Callable ,  Slot >  slot_map ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-18 11:22:59 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										bool  removable  =  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-16 15:28:41 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									friend  struct  _ObjectSignalLock ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									mutable  Mutex  * signal_mutex  =  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-19 16:27:19 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									HashMap < StringName ,  SignalData >  signal_map ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									List < Connection >  connections ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-04-05 12:39:30 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifdef DEBUG_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									SafeRefCount  _lock_index ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-15 13:09:41 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# endif  // DEBUG_ENABLED
  
						 
					
						
							
								
									
										
										
										
											2019-05-09 05:21:49 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ObjectID  _instance_id ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									bool  _predelete ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-22 22:34:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  _initialize ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									void  _postinitialize ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-06-22 23:08:23 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									uint32_t  _ancestry  :  15 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  _block_signals  :  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  _can_translate  :  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  _emitting  :  1 ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-10-06 22:01:22 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  _predelete_ok  :  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								public :  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  _is_queued_for_deletion  :  1 ;  // Set to true by SceneTree::queue_delete().
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								private :  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
									
										
										
										
											2025-06-22 23:08:23 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  _edited  :  1 ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									uint32_t  _edited_version  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-19 17:00:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									HashSet < String >  editor_section_folding ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# endif 
  
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ScriptInstance  * script_instance  =  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-16 13:56:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Variant  script ;  // Reference does not exist yet, store it in a Variant.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-08 10:09:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									HashMap < StringName ,  Variant >  metadata ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									HashMap < StringName ,  Variant  * >  metadata_properties ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-02 01:57:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									mutable  const  GDType  * _gdtype_ptr  =  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-08-11 15:10:05 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  _add_user_signal ( const  String  & p_name ,  const  Array  & p_args  =  Array ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  _has_user_signal ( const  StringName  & p_name )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-18 11:22:59 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  _remove_user_signal ( const  StringName  & p_name ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-22 12:15:43 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Error  _emit_signal ( const  Variant  * * p_args ,  int  p_argcount ,  Callable : : CallError  & r_error ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-05 20:35:08 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									TypedArray < Dictionary >  _get_signal_list ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									TypedArray < Dictionary >  _get_signal_connection_list ( const  StringName  & p_signal )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									TypedArray < Dictionary >  _get_incoming_connections ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-14 15:28:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  _set_bind ( const  StringName  & p_set ,  const  Variant  & p_value ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Variant  _get_bind ( const  StringName  & p_name )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-05-30 23:20:15 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  _set_indexed_bind ( const  NodePath  & p_name ,  const  Variant  & p_value ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Variant  _get_indexed_bind ( const  NodePath  & p_name )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-28 15:16:09 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  _get_method_argument_count_bind ( const  StringName  & p_name )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  void  _construct_object ( bool  p_reference ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-04 18:03:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									friend  class  RefCounted ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-08 16:16:02 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-11-17 20:44:38 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BinaryMutex  _instance_binding_mutex ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-08 16:16:02 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									struct  InstanceBinding  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-04 15:06:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										void  * binding  =  nullptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										void  * token  =  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										GDExtensionInstanceBindingFreeCallback  free_callback  =  nullptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										GDExtensionInstanceBindingReferenceCallback  reference_callback  =  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-08 16:16:02 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									InstanceBinding  * _instance_bindings  =  nullptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									uint32_t  _instance_binding_count  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Object ( bool  p_reference ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-22 15:34:08 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								protected :  
						 
					
						
							
								
									
										
										
										
											2024-08-16 17:25:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									StringName  _translation_domain ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-08 16:16:02 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  bool  _instance_binding_reference ( bool  p_reference )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										bool  can_die  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( _instance_bindings )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-28 11:27:01 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											MutexLock  instance_binding_lock ( _instance_binding_mutex ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-08 16:16:02 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											for  ( uint32_t  i  =  0 ;  i  <  _instance_binding_count ;  i + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if  ( _instance_bindings [ i ] . reference_callback )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													if  ( ! _instance_bindings [ i ] . reference_callback ( _instance_bindings [ i ] . token ,  _instance_bindings [ i ] . binding ,  p_reference ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														can_die  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  can_die ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-16 13:56:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-10-06 21:56:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// Used in gdvirtual.gen.inc
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  _gdvirtual_init_method_ptr ( uint32_t  p_compat_hash ,  void  * & r_fn_ptr ,  const  StringName  & p_fn_name ,  bool  p_compat )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									friend  class  GDExtensionMethodBind ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_ALWAYS_INLINE_  const  ObjectGDExtension  * _get_extension ( )  const  {  return  _extension ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-19 12:58:49 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_ALWAYS_INLINE_  GDExtensionClassInstancePtr  _get_extension_instance ( )  const  {  return  _extension_instance ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-02 23:03:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  void  _initialize_classv ( )  {  initialize_class ( ) ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-07 10:57:21 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  bool  _setv ( const  StringName  & p_name ,  const  Variant  & p_property )  {  return  false ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  _getv ( const  StringName  & p_name ,  Variant  & r_property )  const  {  return  false ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  void  _get_property_listv ( List < PropertyInfo >  * p_list ,  bool  p_reversed )  const  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  void  _validate_propertyv ( PropertyInfo  & p_property )  const  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  _property_can_revertv ( const  StringName  & p_name )  const  {  return  false ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  _property_get_revertv ( const  StringName  & p_name ,  Variant  & r_property )  const  {  return  false ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-01 12:50:14 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  _notification_forward ( int  p_notification ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  _notification_backward ( int  p_notification ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  void  _notification_forwardv ( int  p_notification )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  void  _notification_backwardv ( int  p_notification )  { } 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									static  void  _bind_methods ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-20 12:53:10 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  void  _bind_compatibility_methods ( )  { } 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-07 10:57:21 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  _set ( const  StringName  & p_name ,  const  Variant  & p_property )  {  return  false ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  _get ( const  StringName  & p_name ,  Variant  & r_property )  const  {  return  false ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  _get_property_list ( List < PropertyInfo >  * p_list )  const  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  _validate_property ( PropertyInfo  & p_property )  const  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  _property_can_revert ( const  StringName  & p_name )  const  {  return  false ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  _property_get_revert ( const  StringName  & p_name ,  Variant  & r_property )  const  {  return  false ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  _notification ( int  p_notification )  { } 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  static  void  ( * _get_bind_methods ( ) ) ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  & Object : : _bind_methods ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-20 12:53:10 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  static  void  ( * _get_bind_compatibility_methods ( ) ) ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  & Object : : _bind_compatibility_methods ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 22:25:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  bool  ( Object : : * _get_get ( )  const ) ( const  StringName  & p_name ,  Variant  & r_ret )  const  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										return  & Object : : _get ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 22:25:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  bool  ( Object : : * _get_set ( )  const ) ( const  StringName  & p_name ,  const  Variant  & p_property )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  & Object : : _set ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 22:25:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  void  ( Object : : * _get_get_property_list ( )  const ) ( List < PropertyInfo >  * p_list )  const  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  & Object : : _get_property_list ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-12 23:57:11 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  void  ( Object : : * _get_validate_property ( )  const ) ( PropertyInfo  & p_property )  const  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  & Object : : _validate_property ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-12 21:43:14 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  bool  ( Object : : * _get_property_can_revert ( )  const ) ( const  StringName  & p_name )  const  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  & Object : : _property_can_revert ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  bool  ( Object : : * _get_property_get_revert ( )  const ) ( const  StringName  & p_name ,  Variant  & )  const  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  & Object : : _property_get_revert ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 22:25:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  void  ( Object : : * _get_notification ( )  const ) ( int )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  & Object : : _notification ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-19 16:27:19 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Variant  _call_bind ( const  Variant  * * p_args ,  int  p_argcount ,  Callable : : CallError  & r_error ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Variant  _call_deferred_bind ( const  Variant  * * p_args ,  int  p_argcount ,  Callable : : CallError  & r_error ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-05-02 01:57:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  const  GDType  & _get_typev ( )  const  {  return  get_gdtype_static ( ) ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-25 00:21:32 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									TypedArray < StringName >  _get_meta_list_bind ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-05 20:35:08 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									TypedArray < Dictionary >  _get_property_list_bind ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									TypedArray < Dictionary >  _get_method_list_bind ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-22 00:03:19 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  _clear_internal_resource_paths ( const  Variant  & p_var ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-10-05 13:04:18 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									friend  class  : : ClassDB ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-02 14:10:54 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									friend  class  PlaceholderExtensionInstance ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-14 23:48:23 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-04 15:53:35 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  void  _add_class_to_classdb ( const  StringName  & p_class ,  const  StringName  & p_inherits ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  void  _get_property_list_from_classdb ( const  StringName  & p_class ,  List < PropertyInfo >  * p_list ,  bool  p_no_inheritance ,  const  Object  * p_validator ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 01:20:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  _disconnect ( const  StringName  & p_signal ,  const  Callable  & p_callable ,  bool  p_force  =  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-06-22 23:08:23 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  _define_ancestry ( AncestralClass  p_class )  {  _ancestry  | =  ( uint32_t ) p_class ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2025-09-22 01:30:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// Prefer using derives_from.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  _has_ancestry ( AncestralClass  p_class )  const  {  return  _ancestry  &  ( uint32_t ) p_class ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2018-08-20 16:35:36 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-16 15:28:41 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  bool  _uses_signal_mutex ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-04 20:34:14 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									struct  VirtualMethodTracker  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										void  * * method ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										VirtualMethodTracker  * next ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									mutable  VirtualMethodTracker  * virtual_method_list  =  nullptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-02-16 13:56:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								public :  // Should be protected, but bug in clang++.
  
						 
					
						
							
								
									
										
										
										
											2017-01-02 23:03:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  void  initialize_class ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  static  void  register_custom_data_to_otdb ( )  { } 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								public :  
						 
					
						
							
								
									
										
										
										
											2021-02-10 17:18:45 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  notify_property_list_changed ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  void  * get_class_ptr_static ( )  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										static  int  ptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  & ptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  detach_from_objectdb ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-09 05:21:49 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  ObjectID  get_instance_id ( )  const  {  return  _instance_id ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-03-07 20:29:49 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									template  < typename  T > 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-24 21:58:13 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  T  * cast_to ( Object  * p_object )  { 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-27 15:39:53 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										// This is like dynamic_cast, but faster.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// The reason is that we can assume no virtual and multiple inheritance.
 
							 
						 
					
						
							
								
									
										
										
										
											2025-09-22 01:30:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  p_object  & &  p_object - > derives_from < T > ( )  ?  static_cast < T  * > ( p_object )  :  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-24 21:58:13 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-03-07 20:29:49 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									template  < typename  T > 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-24 21:58:13 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  const  T  * cast_to ( const  Object  * p_object )  { 
							 
						 
					
						
							
								
									
										
										
										
											2025-09-22 01:30:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  p_object  & &  p_object - > derives_from < T > ( )  ?  static_cast < const  T  * > ( p_object )  :  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-24 21:58:13 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									enum  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										NOTIFICATION_POSTINITIALIZE  =  0 , 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-04 20:34:14 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										NOTIFICATION_PREDELETE  =  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										NOTIFICATION_EXTENSION_RELOADED  =  2 , 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-20 13:43:42 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										// Internal notification to send after NOTIFICATION_PREDELETE, not bound to scripting.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										NOTIFICATION_PREDELETE_CLEANUP  =  3 , 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									/* TYPE API */ 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-02 01:57:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  void  assign_type_static ( GDType  * * type_ptr ,  const  char  * p_name ,  const  GDType  * super_type ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-09 14:53:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-05-02 01:57:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  const  GDType  & get_gdtype_static ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										static  GDType  * _class_static ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( unlikely ( ! _class_static ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											assign_type_static ( & _class_static ,  " Object " ,  nullptr ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-08 23:25:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-02 01:57:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  * _class_static ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-08 23:25:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-05-02 01:57:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									const  GDType  & get_gdtype ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  const  StringName  & get_class_static ( )  {  return  get_gdtype_static ( ) . get_name ( ) ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-06 16:53:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  String  get_class ( )  const  {  return  get_class_name ( ) ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-01-02 23:03:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  String  get_save_class ( )  const  {  return  get_class ( ) ;  }  //class stored when saving
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-29 00:29:49 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-05-02 01:57:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  is_class ( const  String  & p_class )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  bool  is_class_ptr ( void  * p_ptr )  const  {  return  get_class_ptr_static ( )  = =  p_ptr ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-29 00:29:49 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-09-22 01:30:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									template  < typename  T > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  derives_from ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-06-22 23:08:23 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-06 16:53:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									const  StringName  & get_class_name ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-09 12:30:39 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									StringName  get_class_name_for_extension ( const  GDExtension  * p_library )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-16 09:38:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									/* IAPI */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 01:20:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  set ( const  StringName  & p_name ,  const  Variant  & p_value ,  bool  * r_valid  =  nullptr ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Variant  get ( const  StringName  & p_name ,  bool  * r_valid  =  nullptr )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  set_indexed ( const  Vector < StringName >  & p_names ,  const  Variant  & p_value ,  bool  * r_valid  =  nullptr ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Variant  get_indexed ( const  Vector < StringName >  & p_names ,  bool  * r_valid  =  nullptr )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  get_property_list ( List < PropertyInfo >  * p_list ,  bool  p_reversed  =  false )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-12 23:57:11 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  validate_property ( PropertyInfo  & p_property )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-22 12:43:14 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  property_can_revert ( const  StringName  & p_name )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Variant  property_get_revert ( const  StringName  & p_name )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  has_method ( const  StringName  & p_method )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-28 15:16:09 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  get_method_argument_count ( const  StringName  & p_method ,  bool  * r_is_valid  =  nullptr )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									void  get_method_list ( List < MethodInfo >  * p_list )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Variant  callv ( const  StringName  & p_method ,  const  Array  & p_args ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-09 14:58:40 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  Variant  callp ( const  StringName  & p_method ,  const  Variant  * * p_args ,  int  p_argcount ,  Callable : : CallError  & r_error ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-27 13:10:04 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  Variant  call_const ( const  StringName  & p_method ,  const  Variant  * * p_args ,  int  p_argcount ,  Callable : : CallError  & r_error ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-09 14:58:40 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									template  < typename . . .  VarArgs > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Variant  call ( const  StringName  & p_method ,  VarArgs . . .  p_args )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										Variant  args [ sizeof . . . ( p_args )  +  1 ]  =  {  p_args . . . ,  Variant ( )  } ;  // +1 makes sure zero sized arrays are also supported.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										const  Variant  * argptrs [ sizeof . . . ( p_args )  +  1 ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										for  ( uint32_t  i  =  0 ;  i  <  sizeof . . . ( p_args ) ;  i + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											argptrs [ i ]  =  & args [ i ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										Callable : : CallError  cerr ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-30 21:09:30 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										const  Variant  ret  =  callp ( p_method ,  sizeof . . . ( p_args )  = =  0  ?  nullptr  :  ( const  Variant  * * ) argptrs ,  sizeof . . . ( p_args ) ,  cerr ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  ( cerr . error  = =  Callable : : CallError : : CALL_OK )  ?  ret  :  Variant ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-09 14:58:40 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-01 12:50:14 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// Depending on the boolean, we call either the virtual function _notification_backward or _notification_forward.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// - Forward calls subclasses in descending order (e.g. Object -> Node -> Node3D -> extension -> script).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									//   Backward calls subclasses in descending order (e.g. script -> extension -> Node3D -> Node -> Object).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  void  notification ( int  p_notification ,  bool  p_reversed  =  false )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( p_reversed )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											_notification_backward ( p_notification ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											_notification_forward ( p_notification ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-15 18:14:45 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  String  to_string ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-02-16 13:56:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// Used mainly by script, get and set all INCLUDING string.
 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 01:20:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  Variant  getvar ( const  Variant  & p_key ,  bool  * r_valid  =  nullptr )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  void  setvar ( const  Variant  & p_key ,  const  Variant  & p_value ,  bool  * r_valid  =  nullptr ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* SCRIPT */ 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-12 13:53:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								// When in debug, some non-virtual functions can be overridden for multithreaded guards.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# ifdef DEBUG_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define MTVIRTUAL virtual 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# else 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define MTVIRTUAL 
  
						 
					
						
							
								
									
										
										
										
											2025-05-15 13:09:41 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# endif  // DEBUG_ENABLED
  
						 
					
						
							
								
									
										
										
										
											2023-05-12 13:53:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  void  set_script ( const  Variant  & p_script ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  Variant  get_script ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-12 13:53:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									MTVIRTUAL  bool  has_meta ( const  StringName  & p_name )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  void  set_meta ( const  StringName  & p_name ,  const  Variant  & p_value ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  void  remove_meta ( const  StringName  & p_name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  Variant  get_meta ( const  StringName  & p_name ,  const  Variant  & p_default  =  Variant ( ) )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  void  get_meta_list ( List < StringName >  * p_list )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-11 20:47:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									MTVIRTUAL  void  merge_meta_from ( const  Object  * p_src ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  set_edited ( bool  p_edited ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  is_edited ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-16 13:56:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// This function is used to check when something changed beyond a point, it's used mainly for generating previews.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									uint32_t  get_edited_version ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  set_script_instance ( ScriptInstance  * p_instance ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  ScriptInstance  * get_script_instance ( )  const  {  return  script_instance ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-02-16 13:56:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// Some script languages can't control instance creation, so this function eases the process.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  set_script_and_instance ( const  Variant  & p_script ,  ScriptInstance  * p_instance ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-22 16:57:56 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  add_user_signal ( const  MethodInfo  & p_signal ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-09 14:58:40 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									template  < typename . . .  VarArgs > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Error  emit_signal ( const  StringName  & p_name ,  VarArgs . . .  p_args )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										Variant  args [ sizeof . . . ( p_args )  +  1 ]  =  {  p_args . . . ,  Variant ( )  } ;  // +1 makes sure zero sized arrays are also supported.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										const  Variant  * argptrs [ sizeof . . . ( p_args )  +  1 ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										for  ( uint32_t  i  =  0 ;  i  <  sizeof . . . ( p_args ) ;  i + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											argptrs [ i ]  =  & args [ i ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  emit_signalp ( p_name ,  sizeof . . . ( p_args )  = =  0  ?  nullptr  :  ( const  Variant  * * ) argptrs ,  sizeof . . . ( p_args ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-12 13:53:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									MTVIRTUAL  Error  emit_signalp ( const  StringName  & p_name ,  const  Variant  * * p_args ,  int  p_argcount ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  bool  has_signal ( const  StringName  & p_name )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  void  get_signal_list ( List < MethodInfo >  * p_signals )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  void  get_signal_connection_list ( const  StringName  & p_signal ,  List < Connection >  * p_connections )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  void  get_all_signal_connections ( List < Connection >  * p_connections )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  int  get_persistent_signal_connection_count ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  void  get_signals_connected_to_this ( List < Connection >  * p_connections )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-12 13:53:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									MTVIRTUAL  Error  connect ( const  StringName  & p_signal ,  const  Callable  & p_callable ,  uint32_t  p_flags  =  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  void  disconnect ( const  StringName  & p_signal ,  const  Callable  & p_callable ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MTVIRTUAL  bool  is_connected ( const  StringName  & p_signal ,  const  Callable  & p_callable )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-18 17:20:56 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									MTVIRTUAL  bool  has_connections ( const  StringName  & p_signal )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-09 14:58:40 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									template  < typename . . .  VarArgs > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  call_deferred ( const  StringName  & p_name ,  VarArgs . . .  p_args )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										MessageQueue : : get_singleton ( ) - > push_call ( this ,  p_name ,  p_args . . . ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-11-16 08:49:26 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  set_deferred ( const  StringName  & p_property ,  const  Variant  & p_value ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  set_block_signals ( bool  p_block ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  is_blocking_signals ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 01:20:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Variant : : Type  get_static_property_type ( const  StringName  & p_property ,  bool  * r_valid  =  nullptr )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Variant : : Type  get_static_property_type_indexed ( const  Vector < StringName >  & p_path ,  bool  * r_valid  =  nullptr )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-12-05 14:18:22 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-02-16 13:56:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// Translate message (internationalization).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									String  tr ( const  StringName  & p_message ,  const  StringName  & p_context  =  " " )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-16 10:52:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									String  tr_n ( const  StringName  & p_message ,  const  StringName  & p_message_plural ,  int  p_n ,  const  StringName  & p_context  =  " " )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  is_queued_for_deletion ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-03-28 18:34:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-08-18 22:29:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_FORCE_INLINE_  void  set_message_translation ( bool  p_enable )  {  _can_translate  =  p_enable ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									_FORCE_INLINE_  bool  can_translate_messages ( )  const  {  return  _can_translate ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-22 00:03:19 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-16 17:25:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  StringName  get_translation_domain ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  void  set_translation_domain ( const  StringName  & p_domain ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-06-25 17:30:28 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
									
										
										
										
											2024-01-03 12:10:11 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  void  get_argument_options ( const  StringName  & p_function ,  int  p_idx ,  List < String >  * r_options )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-06 15:04:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  editor_set_section_unfold ( const  String  & p_section ,  bool  p_unfolded ,  bool  p_initializing  =  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-06-25 17:30:28 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  editor_is_section_unfolded ( const  String  & p_section ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-19 17:00:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									const  HashSet < String >  & editor_get_section_folding ( )  const  {  return  editor_section_folding ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-29 16:36:31 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  editor_clear_section_folding ( )  {  editor_section_folding . clear ( ) ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2017-06-25 17:30:28 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-15 11:41:57 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// Used by script languages to store binding data.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  * get_instance_binding ( void  * p_token ,  const  GDExtensionInstanceBindingCallbacks  * p_callbacks ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-15 11:41:57 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// Used on creation by binding only.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-07 12:11:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  set_instance_binding ( void  * p_token ,  void  * p_binding ,  const  GDExtensionInstanceBindingCallbacks  * p_callbacks ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-16 17:16:36 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  has_instance_binding ( void  * p_token ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-04 19:13:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  free_instance_binding ( void  * p_token ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-16 12:39:23 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-04 20:34:14 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  clear_internal_extension ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  reset_internal_extension ( ObjectGDExtension  * p_extension ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-02 14:10:54 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  is_extension_placeholder ( )  const  {  return  _extension  & &  _extension - > is_placeholder ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-04 20:34:14 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-22 00:03:19 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  clear_internal_resource_paths ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-09-22 01:30:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_ALWAYS_INLINE_  bool  is_ref_counted ( )  const  {  return  _has_ancestry ( AncestralClass : : REF_COUNTED ) ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-10 18:45:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  cancel_free ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Object ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									virtual  ~ Object ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								bool  predelete_handler ( Object  * p_object ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  postinitialize_handler ( Object  * p_object ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-09-22 01:30:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								template  < typename  T >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								bool  Object : : derives_from ( )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static_assert ( std : : is_base_of_v < Object ,  T > ,  " T must be derived from Object. " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static_assert ( std : : is_same_v < std : : decay_t < T > ,  typename  T : : self_type > ,  " T must use GDCLASS or GDSOFTCLASS. " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// If there is an explicitly set ancestral class on the type, we can use that.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  constexpr  ( T : : static_ancestral_class  ! =  T : : super_type : : static_ancestral_class )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  _has_ancestry ( T : : static_ancestral_class ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  is_class_ptr ( T : : get_class_ptr_static ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								template  < >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								inline  bool  Object : : derives_from < Object > ( )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								template  < >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								inline  bool  Object : : derives_from < const  Object > ( )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								class  ObjectDB  {  
						 
					
						
							
								
									
										
										
										
											2022-02-16 13:56:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								// This needs to add up to 63, 1 bit is for reference.
  
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define OBJECTDB_VALIDATOR_BITS 39 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define OBJECTDB_VALIDATOR_MASK ((uint64_t(1) << OBJECTDB_VALIDATOR_BITS) - 1) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define OBJECTDB_SLOT_MAX_COUNT_BITS 24 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define OBJECTDB_SLOT_MAX_COUNT_MASK ((uint64_t(1) << OBJECTDB_SLOT_MAX_COUNT_BITS) - 1) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define OBJECTDB_REFERENCE_BIT (uint64_t(1) << (OBJECTDB_SLOT_MAX_COUNT_BITS + OBJECTDB_VALIDATOR_BITS)) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-02-16 13:56:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									struct  ObjectSlot  {  // 128 bits per slot.
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										uint64_t  validator  :  OBJECTDB_VALIDATOR_BITS ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										uint64_t  next_free  :  OBJECTDB_SLOT_MAX_COUNT_BITS ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-04 18:03:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										uint64_t  is_ref_counted  :  1 ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-04 15:06:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										Object  * object  =  nullptr ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  SpinLock  spin_lock ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  uint32_t  slot_count ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  uint32_t  slot_max ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  ObjectSlot  * object_slots ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  uint64_t  validator_counter ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									friend  class  Object ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									friend  void  unregister_core_types ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									static  void  cleanup ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-06-09 00:23:50 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  ObjectID  add_instance ( Object  * p_object ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									static  void  remove_instance ( Object  * p_object ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									friend  void  register_core_types ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-07 18:25:37 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  void  setup ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 21:09:11 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								public :  
						 
					
						
							
								
									
										
										
										
											2025-05-06 10:30:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									typedef  void  ( * DebugFunc ) ( Object  * p_obj ,  void  * p_user_data ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									_ALWAYS_INLINE_  static  Object  * get_instance ( ObjectID  p_instance_id )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										uint64_t  id  =  p_instance_id ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										uint32_t  slot  =  id  &  OBJECTDB_SLOT_MAX_COUNT_MASK ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-02-16 13:56:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										ERR_FAIL_COND_V ( slot  > =  slot_max ,  nullptr ) ;  // This should never happen unless RID is corrupted.
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										spin_lock . lock ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										uint64_t  validator  =  ( id  > >  OBJECTDB_SLOT_MAX_COUNT_BITS )  &  OBJECTDB_VALIDATOR_MASK ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										if  ( unlikely ( object_slots [ slot ] . validator  ! =  validator ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											spin_lock . unlock ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return  nullptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										Object  * object  =  object_slots [ slot ] . object ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-07-28 23:19:44 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										spin_lock . unlock ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-07-28 23:19:44 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  object ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-27 14:42:42 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									template  < typename  T > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_ALWAYS_INLINE_  static  T  * get_instance ( ObjectID  p_instance_id )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  Object : : cast_to < T > ( get_instance ( p_instance_id ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									template  < typename  T > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									_ALWAYS_INLINE_  static  Ref < T >  get_ref ( ObjectID  p_instance_id ) ;  // Defined in ref_counted.h
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-05-06 10:30:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  void  debug_objects ( DebugFunc  p_func ,  void  * p_user_data ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-13 16:03:10 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  int  get_object_count ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								} ;