40 #ifndef _lua51scriptingengine_h
41 #define _lua51scriptingengine_h
52 #include "entresolmanagerfactory.h"
88 class iScriptCompilationManager;
111 virtual void ThrowFromLuaErrorCode(
int LuaReturn);
115 void CheckLuaStateAfterConstruction()
const;
126 void ScriptArgsOntoStack(
Lua51Script* ScriptToLoad);
131 void StackExecute(
Whole ArgumentCount);
162 MezzXMLSafeLib = 2048,
163 MezzThreadingLib = 4096,
164 MezzThreadingSafeLib = 8192,
165 MezzPhysicsLib = 16384,
166 MezzPhysicsSafeLib = 32768,
167 MezzMathToolsLib = 65536,
168 MezzMathToolsSafeLib = 131072,
172 LastLib = MezzMathToolsSafeLib,
174 DefaultLibs = BaseLib | StringLib | TableLib | MathLib |
175 MezzSafeLib | MezzXMLSafeLib | MezzThreadingSafeLib |
176 MezzPhysicsSafeLib | MezzMathToolsSafeLib,
177 AllLibs = BaseLib | PackageLib | StringLib | TableLib |
178 MathLib | IOLib | OSLib | DebugLib | MezzLib |
179 MezzSafeLib | MezzXMLLib | MezzXMLSafeLib |
180 MezzThreadingLib | MezzThreadingSafeLib |
181 MezzPhysicsSafeLib | MezzPhysicsLib |
182 MezzMathToolsLib | MezzMathToolsSafeLib
325 virtual void Compile(
Lua51Script& ScriptToCompile);
328 virtual void Compile(
Lua51Script* ScriptToCompile);
334 virtual String GetImplementationTypeName()
const;
340 virtual void OpenLibraries(
int LibrariesToOpen);
359 virtual void AliasLibrary(
const String& Base,
const String& Sub,
const String& Alias);
366 virtual void OpenDefaultLibraries();
369 virtual void OpenAllLibraries();
375 virtual void OpenBaseLibrary();
380 virtual void OpenPackageLibrary();
383 virtual void OpenStringLibrary();
386 virtual void OpenTableLibrary();
389 virtual void OpenMathLibrary();
393 virtual void OpenIOLibrary();
397 virtual void OpenOSLibrary();
402 virtual void OpenDebugLibrary();
406 virtual void OpenMezzanineLibrary();
409 virtual void OpenMezzanineSafeLibrary();
413 virtual void OpenMezzanineXMLLibrary();
416 virtual void OpenMezzanineXMLSafeLibrary();
420 virtual void OpenMezzanineThreadingLibrary();
423 virtual void OpenMezzanineThreadingSafeLibrary();
427 virtual void OpenMezzaninePhysicsLibrary();
430 virtual void OpenMezzaninePhysicsSafeLibrary();
433 virtual void OpenMezzanineMathToolsLibrary();
436 virtual void OpenMezzanineMathToolsSafeLibrary();
448 void SetThreadingSafe();
453 void SetPhysicsSafe();
458 void SetMathToolsSafe();
466 lua_State* GetRawLuaState();
475 static bool IsValidCharStartIdentifier(
const char IdChar);
479 static bool IsValidCharInIdentifier(
const char IdChar);
483 static bool IsValidCharInTableIdentifier(
const char IdChar);
487 static bool IsValidIdentifier(
const String& Id);
490 typedef Mezzanine::Trie<char,const Mezzanine::String*>
CommandTrie;
495 const String& GetLuaTypeString(
int StackLocation);
509 void PopulateTabCompletionTrie(CommandTrie& CommandGroup,
const String& TableName=
"", std::vector<String> AlreadyDidTables=std::vector<String>());
526 String GetManagerImplName()
const;
550 #endif // \_scriptinglua_h
static const String MezzSafeTableName
The name used to identify a table loaded by the MezzanineSafe library, "MezzanineSafe".
What a scripting manager should look like.
static const String StringLibName
The name used to identify the String library, "String".
static const String MezzMathToolsTableName
The name used to identify a table loaded by the MezzanineMathTools library, "MezzanineMathTools".
static const String MezzMathToolsSafeTableName
The name used to identify a table loaded by the MezzanineMathToolsSafe library, "MezzanineMathToolsSa...
static const String TypeNameNil
A human friendly representation of the Lua type nil.
bool Boole
Generally acts a single bit, true or false.
static const String TypeNameUserData
A human friendly representation of the Lua type user data.
static const String MezzPhysicsLibName
The name used to identify the MezzaninePhysics library, "MezzaninePhysics".
static const String BaseLibName
The name used to identify the Base library, "Base".
ManagerType
A listing of Manager Types.
virtual ~Lua51ScriptingEngineFactory()
Class destructor.
static const String MezzThreadingSafeTableName
The name used to identify a table loaded by the MezzanineThreadingSafe library, "MezzanineThreadingSa...
This is a base class for factories that construct managers used by the Entresol class.
static const String MezzLibName
The name used to identify the Mezzanine library, "Mezzanine".
All the definitions for datatypes as well as some basic conversion functions are defined here...
int Integer
A datatype used to represent any integer close to.
This class is used to store a Lua script and in its source and compiled state.
static const String DebugLibName
The name used to identify the Debug library, "Debug".
static const String PackageTableName
The name used to identify a table loaded by the Package library, "package".
This file has the interfaces for Scripts and tag derived classes.
static const String IOLibName
The name used to identify the IO library, "IO".
static const String MezzPhysicsSafeTableName
The name used to identify a table loaded by the MezzaninePhysicsSafe library, "MezzaninePhysicsSafe"...
static const String BaseTableName
The name used to identify a table loaded by the Base library, "coroutine".
static const String PackageLibName
The name used to identify the Package library, "Package".
Mezzanine::Trie< char, const Mezzanine::String * > CommandTrie
A type for efficiently storing the kinds of Lexigraphical data aboutthe Lua runtime.
static const String MezzPhysicsTableName
The name used to identify a table loaded by the MezzaninePhysics library, "MezzaninePhysics".
static const String TypeNameFunction
A human friendly representation of the Lua type function.
static const String MezzMathToolsLibName
The name used to identify the MezzanineMathTools library, "MezzanineMathTools".
static const String TypeNameBoolean
A human friendly representation of the Lua type boolean.
This is the base class for all managers that do no describe properties of a single world...
A light-weight handle for manipulating nodes in DOM tree.
static const String StringTableName
The name used to identify a table loaded by the String library, "string".
static const String OSLibName
The name used to identify the OS library, "OS".
static const String MathTableName
The name used to identify a table loaded by the Math library, "math".
The workhorse of the Lua scripting system. All scripts come here to be executed.
static const String MezzMathToolsSafeLibName
The name used to identify the MezzanineMathToolsSafe library, "MezzanineMathToolsSafe".
static const String ScriptEngineName
The name of this scripting engine for inspection purposes, "Lua51ScriptingEngine".
static const String TableTableName
The name used to identify a table loaded by the Table library, "table".
Lua51ScriptingEngineFactory()
Class constructor.
A factory responsible for the creation and destruction of the default scripting engine providing Lua ...
static const String MezzPhysicsSafeLibName
The name used to identify the MezzaninePhysicsSafe library, "MezzaninePhysicsSafe".
static const String TypeNameNumber
A human friendly representation of the Lua type number.
static const String DebugTableName
The name used to identify a table loaded by the Debug library, "debug".
static const String TypeNameLightUserData
A human friendly representation of the Lua type light user data.
std::list< NameValuePair > NameValuePairList
This is a datatype mostly used for describing settings or parameters that can't be declared in advanc...
static const String GlobalTableName
The place Lua keeps all the identifiers in a single Lua State.
static const String OSTableName
The name used to identify a table loaded by the OS library, "os".
static const String TypeNameTable
A human friendly representation of the Lua type table.
static const String MathLibName
The name used to identify the Math library, "Math".
This file has the interfaces for Script Arguments and the associated dependency chain.
static const String TypeNameString
A human friendly representation of the Lua type string.
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
static const String IOTableName
The name used to identify a table loaded by the IO library, "io".
static const String MezzThreadingLibName
The name used to identify the MezzanineThreading library, "MezzanineThreading".
static const String MezzThreadingSafeLibName
The name used to identify the MezzanineThreadingSafe library, "MezzanineThreadingSafe".
static const String MezzThreadingTableName
The name used to identify a table loaded by the MezzanineThreading library, "MezzanineThreading".
static const String MezzXMLSafeTableName
The name used to identify a table loaded by the MezzanineXMLSafe library, "MezzanineXMLSafe".
static const String MezzXMLTableName
The name used to identify a table loaded by the MezzanineXML library, "MezzanineXML".
static const String MezzXMLLibName
The name used to identify the MezzanineXML library, "MezzanineXML".
std::string String
A datatype used to a series of characters.
static const String TableLibName
The name used to identify the Table library, "Table".
static const ManagerBase::ManagerType InterfaceType
The type of functionality this manager provides. For ManagerBase compatibility.
Lua51Libraries
Intended only to make constructing an Lua51ScriptingEngine with the desired libraries open a little e...
static const String MezzXMLSafeLibName
The name used to identify the MezzanineXMLSafe library, "MezzanineXMLSafe".
static const String MezzSafeLibName
The name used to identify the MezzanineSafe library, "MezzanineSafe".
static const String AllLibsName
The name used to identify the set of all libraries, "All".
This file has the interfaces for Scripting managers and the associated dependency chain...
static const String MezzTableName
The name used to identify a table loaded by the Mezzanine library, "Mezzanine".
static const String NoLibName
The name used to identify No libraries, "None".
static const String TypeNameThread
A human friendly representation of the Lua type thread.
static const String DefaultLibsName
The name used to identify the Default set of libraries, "Default".