lib.cpp 589 B

1234567891011121314151617181920212223242526
  1. #include <entt/meta/factory.hpp>
  2. #include "types.h"
  3. #ifndef LIB_EXPORT
  4. #if defined _WIN32 || defined __CYGWIN__
  5. #define LIB_EXPORT __declspec(dllexport)
  6. #elif defined __GNUC__
  7. #define LIB_EXPORT __attribute__((visibility("default")))
  8. #else
  9. #define LIB_EXPORT
  10. #endif
  11. #endif
  12. LIB_EXPORT void bind_ctx(entt::meta_ctx context) {
  13. entt::meta_ctx::bind(context);
  14. }
  15. LIB_EXPORT void meta_init() {
  16. entt::meta<char>().type().data<'c'>("c"_hs);
  17. entt::meta<int>().type().data<0>("0"_hs);
  18. }
  19. LIB_EXPORT void meta_deinit() {
  20. entt::meta<char>().reset();
  21. entt::meta<int>().reset();
  22. }