1
0
cuberite-2a/source/LuaScript.h

46 lines
544 B
C
Raw Normal View History

2013-07-29 04:03:42 -04:00
// LuaScript.h
// Declares the cLuaScript class that loads a Lua script file to produce a web template out of it
#pragma once
2013-08-06 13:28:09 -04:00
#include "LuaState.h"
2013-07-29 04:03:42 -04:00
2013-08-06 13:28:09 -04:00
// fwd:
class cWebAdmin;
struct HTTPTemplateRequest;
2013-07-29 04:03:42 -04:00
class cLuaScript
{
public:
2013-08-06 13:28:09 -04:00
cLuaScript(void);
/// Prepares a Lua state
2013-08-06 13:28:09 -04:00
void Initialize();
/// Load a Lua script on the given path
2013-08-06 13:28:09 -04:00
bool LoadFile(const char * a_FilePath);
2013-08-06 13:28:09 -04:00
bool CallShowPage(cWebAdmin & a_WebAdmin, HTTPTemplateRequest & a_Request, AString & a_ReturnedString);
protected:
2013-08-06 13:28:09 -04:00
cLuaState m_LuaState;
2013-07-29 04:03:42 -04:00
} ;