HoverRace
2.0
|
The global system environment. More...
#include <SysEnv.h>
Public Member Functions | |
SysEnv (Script::Core &scripting, DebugPeer &debugPeer, GamePeer &gamePeer, InputPeer &inputPeer) | |
virtual | ~SysEnv () |
void | RunScript (const Util::OS::path_t &filename) |
Protected Member Functions | |
void | InitEnv () override |
Initialize the environment in which scripts will run in. More... | |
virtual void | LogError (const std::string &s) |
virtual void | LogInfo (const std::string &s) |
Private Types | |
using | SUPER = Script::Env |
Private Attributes | |
DebugPeer & | debugPeer |
GamePeer & | gamePeer |
InputPeer & | inputPeer |
Script::Core::OutHandle | outHandle |
Additional Inherited Members | |
Private Member Functions inherited from HoverRace::Script::Env | |
Env (Core &scripting) | |
Constructor. More... | |
Env (const Env &)=delete | |
virtual | ~Env () |
Env & | operator= (const Env &)=delete |
bool | RunScript (const Util::OS::path_t &filename) |
Execute a script from a file. More... | |
void | CopyGlobals () |
Copy the global environment into the current table at the top of the stack. More... | |
template<class ReturnPolicy = Core::PrintReturn> | |
int | Execute (const Core::Chunk &chunk, ReturnPolicy rp=ReturnPolicy()) |
Execute a chunk of code in the current environment. More... | |
Core & | GetScripting () const |
lua_State * | GetState () const |
void | LogScriptError (const Script::ScriptExn &ex) |
void | PushEnv () |
Push the environment onto the stack. More... | |
void | SetHelpHandler (Help::HelpHandler *helpHandler) |
Static Private Member Functions inherited from HoverRace::Script::Env | |
static Core::Chunk | LoadChunkFromFile (const Util::OS::path_t &filename) |
Load a chunk from a file. More... | |
The global system environment.
|
private |
HoverRace::Client::HoverScript::SysEnv::SysEnv | ( | Script::Core & | scripting, |
DebugPeer & | debugPeer, | ||
GamePeer & | gamePeer, | ||
InputPeer & | inputPeer | ||
) |
|
virtual |
|
overrideprotectedvirtual |
Initialize the environment in which scripts will run in.
Upon entry, the Lua stack will have at least one entry, the table which represents the environment. Implementing functions will fill this table with the globals which will be available to the functions which are run in this environment. Upon return, this same table must be at the top of the stack.
Implements HoverRace::Script::Env.
|
protectedvirtual |
|
protectedvirtual |
|
inline |
|
private |
|
private |
|
private |
|
private |