2011-07-16 13:08:58 -06:00
|
|
|
#ifndef LUAMAIN_H
|
|
|
|
#define LUAMAIN_H
|
2011-07-16 10:29:46 -06:00
|
|
|
#include <string>
|
|
|
|
using std::string;
|
|
|
|
|
2011-07-16 11:43:57 -06:00
|
|
|
|
|
|
|
|
2012-03-26 09:48:24 -06:00
|
|
|
|
2011-07-16 10:29:46 -06:00
|
|
|
#include "lua.h"
|
|
|
|
#include "lauxlib.h"
|
|
|
|
#include "lualib.h"
|
2012-03-26 09:48:24 -06:00
|
|
|
|
2011-07-16 10:29:46 -06:00
|
|
|
|
2011-08-03 07:07:57 -06:00
|
|
|
#include "lune.h"
|
2011-07-16 10:29:46 -06:00
|
|
|
#include "luaxx.hpp"
|
|
|
|
|
|
|
|
namespace lua
|
|
|
|
{
|
|
|
|
//global lua state singleton
|
|
|
|
class glua
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static state &Get();
|
|
|
|
private:
|
|
|
|
glua();
|
|
|
|
static glua *ptr;
|
|
|
|
state mystate;
|
|
|
|
};
|
|
|
|
//registers basic lua commands
|
|
|
|
void RegBasics(lua::state &L);
|
|
|
|
//dumps lua function trace, useless unless called from lua.
|
|
|
|
string DebugDump(lua::state &L);
|
|
|
|
//register functions, first registers into global scope, second into current table
|
2012-03-31 02:11:43 -06:00
|
|
|
void RegFunctions(lua::state &L,luaL_Reg const *arr);
|
|
|
|
void RegFunctionsLocal(lua::state &L,luaL_Reg const *arr);
|
2011-07-16 10:29:46 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-16 13:08:58 -06:00
|
|
|
#endif // LUAMAIN_H
|