CLuaHandler.h 497 B

123456789101112131415161718192021222324
  1. #ifndef __CLUAHANDLER_H__
  2. #define __CLUAHANDLER_H__
  3. #include "global.h"
  4. #if (LUA_VERSION_NUM < 500)
  5. # define LUA_OPEN_LIB(L, lib) lib(L)
  6. #else
  7. # define LUA_OPEN_LIB(L, lib) \
  8. lua_pushcfunction((L), lib); \
  9. lua_pcall((L), 0, 0, 0);
  10. #endif
  11. class CLuaHandler
  12. {
  13. public:
  14. CLuaHandler();
  15. static std::vector<std::string> * searchForScripts(std::string fol);
  16. static std::vector<std::string> * functionList(std::string file);
  17. ~CLuaHandler();
  18. void test();
  19. };
  20. #endif // __CLUAHANDLER_H__