2007-10-14 15:11:18 +03:00
|
|
|
#ifndef CLUAHANDLER_H
|
|
|
|
#define CLUAHANDLER_H
|
|
|
|
#include "global.h"
|
|
|
|
#if (LUA_VERSION_NUM < 500)
|
|
|
|
# define LUA_OPEN_LIB(L, lib) lib(L)
|
|
|
|
#else
|
|
|
|
# define LUA_OPEN_LIB(L, lib) \
|
|
|
|
lua_pushcfunction((L), lib); \
|
|
|
|
lua_pcall((L), 0, 0, 0);
|
|
|
|
#endif
|
|
|
|
class CLuaHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CLuaHandler();
|
2007-10-27 22:38:48 +03:00
|
|
|
|
|
|
|
static std::vector<std::string> * searchForScripts(std::string fol);
|
2007-11-19 00:58:28 +02:00
|
|
|
static std::vector<std::string> * functionList(std::string file);
|
2007-10-27 22:38:48 +03:00
|
|
|
|
2007-10-14 15:11:18 +03:00
|
|
|
~CLuaHandler();
|
|
|
|
|
|
|
|
void test();
|
|
|
|
};
|
2008-07-16 21:26:15 +03:00
|
|
|
#endif //CLUAHANDLER_H
|