SimpleFastOpenAtomicVisualiser
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
Console Class Reference

Lua console. More...

#include <console.h>

Public Member Functions

 Console (jLog::Log &l, VisualisationState *visualisationState, CommandLine *options, Camera *camera)
 Construct a new Console with a jLog::Log.
 
 ~Console ()
 
bool runFile (std::string file)
 Attempt to run a Lua script from a file on disc.
 
bool runString (std::string program)
 Attempt to run a Lua script from std::string.
 
bool luaIsOk ()
 
std::string luaStatus ()
 Convert Lua's status to a std::string.
 
template<class T >
T getGlobal (const char *n)
 
bool exitCalled () const
 If sfoav.exit() has been called.
 

Detailed Description

Lua console.

Constructor & Destructor Documentation

◆ Console()

Console::Console ( jLog::Log &  l,
VisualisationState visualisationState,
CommandLine options,
Camera camera 
)
inline

Construct a new Console with a jLog::Log.

Parameters
ljLog::Log outputting Lua's messages.

◆ ~Console()

Console::~Console ( )
inline

Member Function Documentation

◆ exitCalled()

bool Console::exitCalled ( ) const
inline

If sfoav.exit() has been called.

Returns
true exit has been requested in Lua.
false exit has not been requested in Lua.

◆ getGlobal()

template<class T >
T Console::getGlobal ( const char n)
inline

◆ luaIsOk()

bool Console::luaIsOk ( )
inline

◆ luaStatus()

std::string Console::luaStatus ( )
inline

Convert Lua's status to a std::string.

Returns
std::string Lua status name.

◆ runFile()

bool Console::runFile ( std::string  file)
inline

Attempt to run a Lua script from a file on disc.

Parameters
fileLua script location.
Returns
true Error occured.
false OK.

◆ runString()

bool Console::runString ( std::string  program)
inline

Attempt to run a Lua script from std::string.

Parameters
fileLua script.
Returns
true Error occured.
false OK.

The documentation for this class was generated from the following files: