@@ -325,97 +325,105 @@ public:
325
325
_gde_binding_create_callback, \
326
326
_gde_binding_free_callback, \
327
327
_gde_binding_reference_callback, \
328
- };
328
+ }; \
329
+ \
330
+ private:
329
331
330
332
// Don't use this for your classes, use GDCLASS() instead.
331
- #define GDEXTENSION_CLASS_ALIAS (m_class, m_alias_for, m_inherits ) \
332
- private: \
333
- inline static ::godot::internal::EngineClassRegistration<m_class> _gde_engine_class_registration_helper; \
334
- void operator =(const m_class &p_rval) {} \
335
- \
336
- protected: \
337
- virtual const GDExtensionInstanceBindingCallbacks *_get_bindings_callbacks () const override { \
338
- return &_gde_binding_callbacks; \
339
- } \
340
- \
341
- m_class (const char *p_godot_class) : m_inherits(p_godot_class) {} \
342
- m_class (GodotObject *p_godot_object) : m_inherits(p_godot_object) {} \
343
- \
344
- static void (*_get_bind_methods ())() { \
345
- return nullptr ; \
346
- } \
347
- \
348
- static void (Wrapped::*_get_notification ())(int ) { \
349
- return nullptr ; \
350
- } \
351
- \
352
- static bool (Wrapped::*_get_set ())(const ::godot::StringName &p_name, const Variant &p_property) { \
353
- return nullptr ; \
354
- } \
355
- \
356
- static bool (Wrapped::*_get_get ())(const ::godot::StringName &p_name, Variant &r_ret) const { \
357
- return nullptr ; \
358
- } \
359
- \
360
- static void (Wrapped::*_get_get_property_list ())(List<PropertyInfo> * p_list) const { \
361
- return nullptr ; \
362
- } \
363
- \
364
- static bool (Wrapped::*_get_property_can_revert ())(const ::godot::StringName &p_name) const { \
365
- return nullptr ; \
366
- } \
367
- \
368
- static bool (Wrapped::*_get_property_get_revert ())(const ::godot::StringName &p_name, Variant &) const { \
369
- return nullptr ; \
370
- } \
371
- \
372
- static String (Wrapped::*_get_to_string ())() const { \
373
- return nullptr ; \
374
- } \
375
- \
376
- public: \
377
- typedef m_class self_type; \
378
- \
379
- static void initialize_class () {} \
380
- \
381
- static ::godot::StringName &get_class_static () { \
382
- static ::godot::StringName string_name = ::godot::StringName (#m_alias_for); \
383
- return string_name; \
384
- } \
385
- \
386
- static ::godot::StringName &get_parent_class_static () { \
387
- return m_inherits::get_class_static (); \
388
- } \
389
- \
390
- static GDExtensionObjectPtr create (void *data) { \
391
- return nullptr ; \
392
- } \
393
- \
394
- static GDExtensionClassInstancePtr recreate (void *data, GDExtensionObjectPtr obj) { \
395
- return nullptr ; \
396
- } \
397
- \
398
- static void free (void *data, GDExtensionClassInstancePtr ptr) { \
399
- } \
400
- \
401
- static void *_gde_binding_create_callback (void *p_token, void *p_instance) { \
402
- /* Do not call memnew here, we don't want the post-initializer to be called */ \
403
- return new (" " ) m_class ((GodotObject *)p_instance); \
404
- } \
405
- static void _gde_binding_free_callback (void *p_token, void *p_instance, void *p_binding) { \
406
- /* Explicitly call the deconstructor to ensure proper lifecycle for non-trivial members */ \
407
- reinterpret_cast <m_class *>(p_binding)->~m_class (); \
408
- Memory::free_static (reinterpret_cast <m_class *>(p_binding)); \
409
- } \
410
- static GDExtensionBool _gde_binding_reference_callback (void *p_token, void *p_instance, GDExtensionBool p_reference) { \
411
- return true ; \
412
- } \
413
- static constexpr GDExtensionInstanceBindingCallbacks _gde_binding_callbacks = { \
414
- _gde_binding_create_callback, \
415
- _gde_binding_free_callback, \
416
- _gde_binding_reference_callback, \
417
- }; \
418
- m_class () : m_class(#m_alias_for) {}
333
+ #define GDEXTENSION_CLASS_ALIAS (m_class, m_alias_for, m_inherits ) /* *****************************************************************************************************************/ \
334
+ private: \
335
+ inline static ::godot::internal::EngineClassRegistration<m_class> _gde_engine_class_registration_helper; \
336
+ void operator =(const m_class &p_rval) {} \
337
+ \
338
+ protected: \
339
+ virtual const GDExtensionInstanceBindingCallbacks *_get_bindings_callbacks () const override { \
340
+ return &_gde_binding_callbacks; \
341
+ } \
342
+ \
343
+ m_class (const char *p_godot_class) : m_inherits(p_godot_class) {} \
344
+ m_class (GodotObject *p_godot_object) : m_inherits(p_godot_object) {} \
345
+ \
346
+ static void (*_get_bind_methods ())() { \
347
+ return nullptr ; \
348
+ } \
349
+ \
350
+ static void (Wrapped::*_get_notification ())(int ) { \
351
+ return nullptr ; \
352
+ } \
353
+ \
354
+ static bool (Wrapped::*_get_set ())(const ::godot::StringName &p_name, const Variant &p_property) { \
355
+ return nullptr ; \
356
+ } \
357
+ \
358
+ static bool (Wrapped::*_get_get ())(const ::godot::StringName &p_name, Variant &r_ret) const { \
359
+ return nullptr ; \
360
+ } \
361
+ \
362
+ static inline bool has_get_property_list () { \
363
+ return false ; \
364
+ } \
365
+ \
366
+ static void (Wrapped::*_get_get_property_list ())(List<PropertyInfo> * p_list) const { \
367
+ return nullptr ; \
368
+ } \
369
+ \
370
+ static bool (Wrapped::*_get_property_can_revert ())(const ::godot::StringName &p_name) const { \
371
+ return nullptr ; \
372
+ } \
373
+ \
374
+ static bool (Wrapped::*_get_property_get_revert ())(const ::godot::StringName &p_name, Variant &) const { \
375
+ return nullptr ; \
376
+ } \
377
+ \
378
+ static void (Wrapped::*_get_validate_property ())(::godot::PropertyInfo & p_property) const { \
379
+ return nullptr ; \
380
+ } \
381
+ \
382
+ static String (Wrapped::*_get_to_string ())() const { \
383
+ return nullptr ; \
384
+ } \
385
+ \
386
+ public: \
387
+ typedef m_class self_type; \
388
+ \
389
+ static void initialize_class () {} \
390
+ \
391
+ static ::godot::StringName &get_class_static () { \
392
+ static ::godot::StringName string_name = ::godot::StringName (#m_alias_for); \
393
+ return string_name; \
394
+ } \
395
+ \
396
+ static ::godot::StringName &get_parent_class_static () { \
397
+ return m_inherits::get_class_static (); \
398
+ } \
399
+ \
400
+ static GDExtensionObjectPtr create (void *data) { \
401
+ return nullptr ; \
402
+ } \
403
+ \
404
+ static void free (void *data, GDExtensionClassInstancePtr ptr) { \
405
+ } \
406
+ \
407
+ static void *_gde_binding_create_callback (void *p_token, void *p_instance) { \
408
+ /* Do not call memnew here, we don't want the post-initializer to be called */ \
409
+ return new (" " ) m_class ((GodotObject *)p_instance); \
410
+ } \
411
+ static void _gde_binding_free_callback (void *p_token, void *p_instance, void *p_binding) { \
412
+ /* Explicitly call the deconstructor to ensure proper lifecycle for non-trivial members */ \
413
+ reinterpret_cast <m_class *>(p_binding)->~m_class (); \
414
+ Memory::free_static (reinterpret_cast <m_class *>(p_binding)); \
415
+ } \
416
+ static GDExtensionBool _gde_binding_reference_callback (void *p_token, void *p_instance, GDExtensionBool p_reference) { \
417
+ return true ; \
418
+ } \
419
+ static constexpr GDExtensionInstanceBindingCallbacks _gde_binding_callbacks = { \
420
+ _gde_binding_create_callback, \
421
+ _gde_binding_free_callback, \
422
+ _gde_binding_reference_callback, \
423
+ }; \
424
+ m_class () : m_class(#m_alias_for) {} \
425
+ \
426
+ private:
419
427
420
428
// Don't use this for your classes, use GDCLASS() instead.
421
429
#define GDEXTENSION_CLASS (m_class, m_inherits ) GDEXTENSION_CLASS_ALIAS(m_class, m_class, m_inherits)
0 commit comments