SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
Registries.h
1#pragma once
2
3namespace spark::core
4{
5 template <typename T> requires std::derived_from<T, core::GameObject>
7 {
9 SerializationRegistry::registerType<T>(T::classRtti().className());
10 }
11
12 template <typename T> requires std::derived_from<T, core::Component>
14 {
16 SerializationRegistry::registerType<T>(T::classRtti().className());
17 }
18}
void registerType()
Registers a new Component into the registry.
Definition Registries.h:13
void registerType()
Registers a new GameObject into the registry.
Definition Registries.h:6
void registerType(const Key &key)
Registers a type the factory can create.
Definition Factory.h:13