More foundation for more reflection.

This commit is contained in:
2024-05-21 23:44:46 +02:00
parent 433c3b4633
commit cd886cefff
9 changed files with 223 additions and 78 deletions

View File

@@ -13,6 +13,8 @@ VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
namespace iwa
{
IWA_REGISTER_CLASS(Instance)
namespace
{
void buildDefaultInstanceExtensionList(std::vector<ExtensionInfo>& outExtensions) noexcept

18
source/type_meta.cpp Normal file
View File

@@ -0,0 +1,18 @@
#include "iwa/type_meta.hpp"
namespace iwa
{
namespace
{
std::vector<const Class*> gClassRegistry;
}
void registerClass(const Class* clazz) noexcept
{
gClassRegistry.push_back(clazz);
}
std::span<const Class*> getRegisteredClasses() noexcept
{
return gClassRegistry;
}
}

View File

@@ -9,6 +9,8 @@ namespace iwa
{
inline constexpr const char* WINDOW_DATA_NAME = "iwa_window";
IWA_REGISTER_CLASS(Window)
namespace
{
Window* gLastEventWindow = nullptr;