| 15 | |
| 16 | template <typename TList> |
| 17 | struct Register |
| 18 | { |
| 19 | static void _Register(lua_State* L) |
| 20 | { |
| 21 | imdexlib::ts_apply<imdexlib::ts_reverse_t<TList>>([&](const auto type) { registerOne(L, type); }); |
| 22 | } |
| 23 | |
| 24 | private: |
| 25 | template <typename T> |
| 26 | static void registerOne(lua_State* L, imdexlib::identity<T>) |
| 27 | { |
| 28 | #ifdef DEBUG |
| 29 | Msg("Exporting [%s]", typeid(T).name()); |
| 30 | #endif |
| 31 | T::script_register(L); |
| 32 | } |
| 33 | }; |
| 34 | |
| 35 | void export_classes(lua_State* L) { Register<script_type_list>::_Register(L); } |
no outgoing calls
no test coverage detected