Common.h 571 B

12345678910111213141516171819202122232425
  1. /// @file
  2. /// This file is included by all the .cpp files that wrap something
  3. #ifndef ANKI_SCRIPT_COMMON_H
  4. #define ANKI_SCRIPT_COMMON_H
  5. #include "anki/script/LuaBinder.h"
  6. /// Wrap a class
  7. #define ANKI_SCRIPT_WRAP(x) \
  8. void ankiScriptWrap##x(LuaBinder& lb)
  9. /// XXX
  10. #define ANKI_SCRIPT_CALL_WRAP(x) \
  11. extern void ankiScriptWrap##x(LuaBinder&); \
  12. ankiScriptWrap##x(*this);
  13. /// XXX
  14. #define ANKI_SCRIPT_WRAP_SINGLETON(x) \
  15. ANKI_SCRIPT_WRAP(x) { \
  16. ANKI_LUA_CLASS_BEGIN_NO_DESTRUCTOR(lb, x) \
  17. ANKI_LUA_STATIC_METHOD("get", &x::get) \
  18. ANKI_LUA_CLASS_END() }
  19. #endif