Orxonox
0.0.5 Codename: Arcturus
|
Representation of an interface to lua. More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/LuaState.h>
Public Member Functions | |
LuaState () | |
~LuaState () | |
void | clearOutput () |
LuaFunctor * | createLuaFunctor (const std::string &code) |
bool | doFile (const std::string &filename) |
bool | doString (const std::string &code, const std::shared_ptr< ResourceInfo > &sourceFileInfo=std::shared_ptr< ResourceInfo >()) |
bool | fileExists (const std::string &filename) |
const std::shared_ptr< ResourceInfo > & | getDefaultResourceInfo () |
lua_State * | getInternalLuaState () |
const std::stringstream & | getOutput () const |
std::string | getSourceCode (const std::string &filename) |
Returns the content of a file. More... | |
bool | includeFile (const std::string &filename) |
bool | includeString (const std::string &code, const std::shared_ptr< ResourceInfo > &sourceFileInfo=std::shared_ptr< ResourceInfo >()) |
void | luaOutput (orxonox::level::OutputLevel level, const std::string &context, const std::string &message) |
void | luaOutput (orxonox::level::OutputLevel level, const std::string &message) |
void | luaOutput (const std::string &message) |
void | luaPrint (const std::string &str) |
void | setDefaultResourceInfo (const std::shared_ptr< ResourceInfo > &sourceFileInfo) |
void | setIncludeParser (std::string(*function)(const std::string &)) |
void | setTraceMap (std::shared_ptr< std::vector< std::vector< std::pair< std::string, size_t >>>> map) |
bool | usingIOConsole () const |
Tells about whether IOConsole was activated. The Lua debugger only works with a normal console. More... | |
Static Public Member Functions | |
static bool | addToluaInterface (int(*function)(lua_State *), const std::string &name) |
static void | closeToluaInterfaces (lua_State *state) |
static void | openToluaInterfaces (lua_State *state) |
static bool | removeToluaInterface (const std::string &name) |
Static Public Attributes | |
static const std::string | ERROR_HANDLER_NAME = "errorHandler" |
Private Types | |
typedef std::map< std::string, int(*)(lua_State *L)> | ToluaInterfaceMap |
Private Member Functions | |
std::shared_ptr< ResourceInfo > | getFileInfo (const std::string &filename) |
Static Private Member Functions | |
static std::vector< LuaState * > & | getInstances () |
static ToluaInterfaceMap & | getToluaInterfaces () |
Private Attributes | |
bool | bIsRunning_ |
std::string(* | includeParseFunction_ )(const std::string &) |
std::shared_ptr< std::vector< std::vector< std::pair< std::string, size_t > > > > | lineTrace_ |
lua_State * | luaState_ |
std::stringstream | output_ |
std::map< std::string, std::string > | sourceCodeMap_ |
std::shared_ptr< ResourceInfo > | sourceFileInfo_ |
Representation of an interface to lua.
|
private |
orxonox::LuaState::LuaState | ( | ) |
orxonox::LuaState::~LuaState | ( | ) |
|
static |
|
inline |
|
static |
|
inline |
bool orxonox::LuaState::doFile | ( | const std::string & | filename | ) |
bool orxonox::LuaState::doString | ( | const std::string & | code, |
const std::shared_ptr< ResourceInfo > & | sourceFileInfo = std::shared_ptr<ResourceInfo>() |
||
) |
bool orxonox::LuaState::fileExists | ( | const std::string & | filename | ) |
|
inline |
|
private |
|
staticprivate |
|
inline |
|
inline |
std::string orxonox::LuaState::getSourceCode | ( | const std::string & | filename | ) |
Returns the content of a file.
|
staticprivate |
bool orxonox::LuaState::includeFile | ( | const std::string & | filename | ) |
bool orxonox::LuaState::includeString | ( | const std::string & | code, |
const std::shared_ptr< ResourceInfo > & | sourceFileInfo = std::shared_ptr<ResourceInfo>() |
||
) |
void orxonox::LuaState::luaOutput | ( | orxonox::level::OutputLevel | level, |
const std::string & | context, | ||
const std::string & | message | ||
) |
void orxonox::LuaState::luaOutput | ( | orxonox::level::OutputLevel | level, |
const std::string & | message | ||
) |
void orxonox::LuaState::luaOutput | ( | const std::string & | message | ) |
void orxonox::LuaState::luaPrint | ( | const std::string & | str | ) |
|
static |
|
static |
|
inline |
|
inline |
|
inline |
bool orxonox::LuaState::usingIOConsole | ( | ) | const |
Tells about whether IOConsole was activated. The Lua debugger only works with a normal console.
|
private |
|
static |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |