diff options
| author | Ricardo Buring <ricardo.buring@gmail.com> | 2022-10-15 12:23:36 +0200 |
|---|---|---|
| committer | Ricardo Buring <ricardo.buring@gmail.com> | 2022-10-15 13:15:05 +0200 |
| commit | 01960ffc9f30eb76bcdd3532141a874d4212e96c (patch) | |
| tree | 9d1d06543897d9136b1f54a03939c30d1e14d6c3 /test/src | |
| parent | 1044251a9e85e4c5cb484466c50f6cc309a1bfbe (diff) | |
| download | redot-cpp-01960ffc9f30eb76bcdd3532141a874d4212e96c.tar.gz | |
Add support for virtual and abstract classes
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/example.h | 14 | ||||
| -rw-r--r-- | test/src/register_types.cpp | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/src/example.h b/test/src/example.h index e9565f9..44c1531 100644 --- a/test/src/example.h +++ b/test/src/example.h @@ -107,4 +107,18 @@ public: VARIANT_ENUM_CAST(Example, Constants); +class ExampleVirtual : public Object { + GDCLASS(ExampleVirtual, Object); + +protected: + static void _bind_methods() {} +}; + +class ExampleAbstract : public Object { + GDCLASS(ExampleAbstract, Object); + +protected: + static void _bind_methods() {} +}; + #endif // EXAMPLE_CLASS_H diff --git a/test/src/register_types.cpp b/test/src/register_types.cpp index 6636d8a..873801b 100644 --- a/test/src/register_types.cpp +++ b/test/src/register_types.cpp @@ -24,6 +24,8 @@ void initialize_example_module(ModuleInitializationLevel p_level) { ClassDB::register_class<ExampleRef>(); ClassDB::register_class<ExampleMin>(); ClassDB::register_class<Example>(); + ClassDB::register_class<ExampleVirtual>(true); + ClassDB::register_abstract_class<ExampleAbstract>(); } void uninitialize_example_module(ModuleInitializationLevel p_level) { |
