#include <src/core/LuaBind.h>
Public Member Functions | |
void | clearLuaOutput () |
const std::string & | getLuaOutput () |
lua_State * | getLuaState () |
void | loadFile (const std::string &filename, bool luaTags) |
Loads the specified file line by line. | |
void | loadString (const std::string &code) |
LuaBind () | |
void | luaPrint (const std::string &str) |
std::string | replaceLuaTags (const std::string &text) |
void | run () |
void | setIncludePath (const std::string &includepath) |
~LuaBind () | |
Static Public Member Functions | |
static LuaBind & | getInstance () |
static const char * | lua_Chunkreader (lua_State *L, void *data, size_t *size) |
Private Attributes | |
std::string | includePath_ |
bool | isRunning_ |
std::string | luaSource_ |
lua_State * | luaState_ |
std::string | output_ |
Static Private Attributes | |
static LuaBind * | singletonRef_s = NULL |
Classes | |
struct | LoadS |
orxonox::LuaBind::LuaBind | ( | ) |
References orxonox::Core::getMediaPathString(), includePath_, isRunning_, luaSource_, luaState_, output_, singletonRef_s, and tolua_Core_open().
orxonox::LuaBind::~LuaBind | ( | ) | [inline] |
References singletonRef_s.
void orxonox::LuaBind::clearLuaOutput | ( | ) | [inline] |
Referenced by orxonox::Loader::load().
static LuaBind& orxonox::LuaBind::getInstance | ( | ) | [inline, static] |
References singletonRef_s.
Referenced by orxonox::Script::execute(), orxonox::Loader::load(), and tolua_Core_orxonox_LuaBind_getInstance00().
const std::string& orxonox::LuaBind::getLuaOutput | ( | ) | [inline] |
Referenced by orxonox::Loader::load().
lua_State* orxonox::LuaBind::getLuaState | ( | ) | [inline] |
void orxonox::LuaBind::loadFile | ( | const std::string & | filename, | |
bool | luaTags | |||
) |
Loads the specified file line by line.
filename | The filename of the file | |
luaTags | if true, the loaded file gets stripped off luaTags |
References COUT, luaSource_, output_, and replaceLuaTags().
Referenced by orxonox::Loader::load().
void orxonox::LuaBind::loadString | ( | const std::string & | code | ) |
const char * orxonox::LuaBind::lua_Chunkreader | ( | lua_State * | L, | |
void * | data, | |||
size_t * | size | |||
) | [static] |
void orxonox::LuaBind::luaPrint | ( | const std::string & | str | ) |
std::string orxonox::LuaBind::replaceLuaTags | ( | const std::string & | text | ) |
void orxonox::LuaBind::run | ( | ) |
References COUT, includePath_, isRunning_, lua_Chunkreader(), luaSource_, and luaState_.
Referenced by orxonox::Script::execute(), and orxonox::Loader::load().
void orxonox::LuaBind::setIncludePath | ( | const std::string & | includepath | ) | [inline] |
std::string orxonox::LuaBind::includePath_ [private] |
bool orxonox::LuaBind::isRunning_ [private] |
std::string orxonox::LuaBind::luaSource_ [private] |
Referenced by loadFile(), loadString(), LuaBind(), and run().
lua_State* orxonox::LuaBind::luaState_ [private] |
std::string orxonox::LuaBind::output_ [private] |
Referenced by loadFile(), loadString(), LuaBind(), and luaPrint().
LuaBind * orxonox::LuaBind::singletonRef_s = NULL [static, private] |
Referenced by getInstance(), LuaBind(), and ~LuaBind().