CompEnumRegistry

gdext.internal.register.CompEnumRegistry

Runtime backing for the component-reference dropdown annotations (exportBoneName / exportAnimation / exportSpriteAnimation / exportAnimationProperty).

The Register macro registers, for each annotated String property, a builder closure keyed by (className, propName). The closure reads the sibling comp's current value off the live instance and enumerates the option names. At inspect time ClassRegistration's validate_property trampoline looks the builder up and rewrites the property to an ENUM with those options.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def clear(): Unit

Drop all builders on hot-reload deinit (mirrors ClassRegistry.clearClasses).

Drop all builders on hot-reload deinit (mirrors ClassRegistry.clearClasses).

Attributes

def isEmpty: Boolean

True when no comp-enum builder is registered for ANY property. Lets the validate_property trampoline early-out before allocating per-call strings — the common case (a project using no comp-reference dropdowns), where the editor still calls validate_property for every property of every node.

True when no comp-enum builder is registered for ANY property. Lets the validate_property trampoline early-out before allocating per-call strings — the common case (a project using no comp-reference dropdowns), where the editor still calls validate_property for every property of every node.

Attributes

def namesFor(className: String, propName: String, inst: GodotScriptClass): Option[Seq[String]]

Look up and run the builder for (className, propName). Returns None when no comp annotation governs the property (so the trampoline leaves it alone). A throwing builder degrades to Some(Seq.empty) — never let an exception unwind across the C ABI boundary.

Look up and run the builder for (className, propName). Returns None when no comp annotation governs the property (so the trampoline leaves it alone). A throwing builder degrades to Some(Seq.empty) — never let an exception unwind across the C ABI boundary.

Attributes

def register(className: String, propName: String, build: GodotScriptClass => Seq[String]): Unit

Register an enum-names builder for one string property.

Register an enum-names builder for one string property.

Attributes