Documentation
¶
Overview ¶
Package ClassDB provides methods for working with ClassDB object instances.
Index ¶
- func Advanced() class
- func CanInstantiate(class_ string) bool
- func ClassExists(class_ string) bool
- func ClassGetEnumConstants(class_ string, enum string) []string
- func ClassGetEnumList(class_ string) []string
- func ClassGetIntegerConstant(class_ string, name string) int
- func ClassGetIntegerConstantEnum(class_ string, name string) string
- func ClassGetIntegerConstantList(class_ string) []string
- func ClassGetMethodArgumentCount(class_ string, method string) int
- func ClassGetProperty(obj Object.Instance, property string) any
- func ClassGetPropertyDefaultValue(class_ string, property string) any
- func ClassHasEnum(class_ string, name string) bool
- func ClassHasIntegerConstant(class_ string, name string) bool
- func ClassHasMethod(class_ string, method string) bool
- func ClassHasSignal(class_ string, signal string) bool
- func ClassSetProperty(obj Object.Instance, property string, value any) error
- func GetClassList() []string
- func GetInheritersFromClass(class_ string) []string
- func GetParentClass(class_ string) string
- func Instantiate(class_ string) any
- func IsClassEnabled(class_ string) bool
- func IsClassEnumBitfield(class_ string, enum string) bool
- func IsParentClass(class_ string, inherits string) bool
- type PropertyInfo
- type SignalInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Advanced ¶
func Advanced() class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
func CanInstantiate ¶
Returns [code]true[/code] if objects can be instantiated from the specified [param class], otherwise returns [code]false[/code].
func ClassExists ¶
Returns whether the specified [param class] is available or not.
func ClassGetEnumConstants ¶
Returns an array with all the keys in [param enum] of [param class] or its ancestry.
func ClassGetEnumList ¶
Returns an array with all the enums of [param class] or its ancestry.
func ClassGetIntegerConstant ¶
Returns the value of the integer constant [param name] of [param class] or its ancestry. Always returns 0 when the constant could not be found.
func ClassGetIntegerConstantEnum ¶
Returns which enum the integer constant [param name] of [param class] or its ancestry belongs to.
func ClassGetIntegerConstantList ¶
Returns an array with the names all the integer constants of [param class] or its ancestry.
func ClassGetMethodArgumentCount ¶
Returns the number of arguments of the method [param method] of [param class] or its ancestry if [param no_inheritance] is [code]false[/code].
func ClassGetProperty ¶
Returns the value of [param property] of [param object] or its ancestry.
func ClassGetPropertyDefaultValue ¶
Returns the default value of [param property] of [param class] or its ancestor classes.
func ClassHasEnum ¶
Returns whether [param class] or its ancestry has an enum called [param name] or not.
func ClassHasIntegerConstant ¶
Returns whether [param class] or its ancestry has an integer constant called [param name] or not.
func ClassHasMethod ¶
Returns whether [param class] (or its ancestry if [param no_inheritance] is [code]false[/code]) has a method called [param method] or not.
func ClassHasSignal ¶
Returns whether [param class] or its ancestry has a signal called [param signal] or not.
func ClassSetProperty ¶
Sets [param property] value of [param object] to [param value].
func GetInheritersFromClass ¶
Returns the names of all the classes that directly or indirectly inherit from [param class].
func GetParentClass ¶
Returns the parent class of [param class].
func IsClassEnabled ¶
Returns whether this [param class] is enabled or not.
func IsClassEnumBitfield ¶
Returns whether [param class] (or its ancestor classes if [param no_inheritance] is [code]false[/code]) has an enum called [param enum] that is a bitfield.
func IsParentClass ¶
Returns whether [param inherits] is an ancestor of [param class] or not.
Types ¶
type PropertyInfo ¶
type PropertyInfo struct { ClassName string `gd:"class_name"` Name string `gd:"name"` Hint int `gd:"hint"` HintString string `gd:"hint_string"` Type reflect.Type `gd:"type"` Usage int `gd:"usage"` }
func ClassGetMethodList ¶
func ClassGetMethodList(class_ string) []PropertyInfo
Returns an array with all the methods of [param class] or its ancestry if [param no_inheritance] is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code]. [b]Note:[/b] In exported release builds the debug info is not available, so the returned dictionaries will contain only method names.
func ClassGetPropertyList ¶
func ClassGetPropertyList(class_ string) []PropertyInfo
Returns an array with all the properties of [param class] or its ancestry if [param no_inheritance] is [code]false[/code].
type SignalInfo ¶
type SignalInfo struct { Name string `gd:"name"` Flags int `gd:"flags"` ID int `gd:"id"` DefaultArgs []interface{} `gd:"default_args"` Args []PropertyInfo `gd:"args"` }
func ClassGetSignal ¶
func ClassGetSignal(class_ string, signal string) SignalInfo
Returns the [param signal] data of [param class] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code].
func ClassGetSignalList ¶
func ClassGetSignalList(class_ string) []SignalInfo
Returns an array with all the signals of [param class] or its ancestry if [param no_inheritance] is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal].