Merge branch 'master' of github.com:OpenSpace/OpenSpace into feature/data-management

This commit is contained in:
Emil Axelsson
2017-11-10 16:07:58 +01:00
482 changed files with 7286 additions and 3720 deletions

View File

@@ -61,19 +61,19 @@ public:
* \throw LuaRuntimeException If the creation of the new Lua state fails
*/
void initialize();
/**
* Cleans the internal Lua state and leaves the ScriptEngine in a state to be newly
* initialize%d.
*/
void deinitialize();
void initializeLuaState(lua_State* state);
ghoul::lua::LuaState* luaState();
void addLibrary(LuaLibrary library);
bool hasLibrary(const std::string& name);
bool runScript(const std::string& script);
bool runScriptFile(const std::string& filename);
@@ -91,35 +91,35 @@ public:
std::vector<std::string> cachedScripts();
std::vector<std::string> allLuaFunctions() const;
//parallel functions
//bool parseLibraryAndFunctionNames(std::string &library, std::string &function, const std::string &script);
//bool shouldScriptBeSent(const std::string &library, const std::string &function);
//void cacheScript(const std::string &library, const std::string &function, const std::string &script);
static std::string OpenSpaceLibraryName;
private:
bool registerLuaLibrary(lua_State* state, LuaLibrary& library);
void addLibraryFunctions(lua_State* state, LuaLibrary& library, bool replace);
bool isLibraryNameAllowed(lua_State* state, const std::string& name);
void addBaseLibrary();
void remapPrintFunction();
std::string generateJson() const override;
ghoul::lua::LuaState _state;
std::vector<LuaLibrary> _registeredLibraries;
//sync variables
std::mutex _mutex;
std::vector<std::pair<std::string, bool>> _queuedScripts;
std::vector<std::string> _receivedScripts;
std::string _currentSyncedScript;
//parallel variables
//std::map<std::string, std::map<std::string, std::string>> _cachedScripts;
//std::mutex _cachedScriptsMutex;