mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-04 09:59:44 -05:00
changed definition of Lua function slightly to incorporate a boolean defining if the script should be shared or not.
added a constructor with the sharing variable as default to zero so every script doesn't have to be changed. added functionality in runScript function to check if a script should be shared and if so send it.
This commit is contained in:
@@ -46,6 +46,17 @@ public:
|
||||
lua_CFunction function;
|
||||
std::string argumentText;
|
||||
std::string helpText;
|
||||
bool parallelShared;
|
||||
|
||||
Function(std::string n, lua_CFunction f, std::string a, std::string h , bool ps = false):
|
||||
name(n),
|
||||
function(f),
|
||||
argumentText(a),
|
||||
helpText(h),
|
||||
parallelShared(ps)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
std::string name;
|
||||
std::vector<Function> functions;
|
||||
@@ -78,8 +89,6 @@ public:
|
||||
void preSynchronization();
|
||||
|
||||
void queueScript(const std::string &script);
|
||||
|
||||
std::vector<std::string> executedScripts();
|
||||
|
||||
std::vector<std::string> allLuaFunctions() const;
|
||||
|
||||
@@ -101,9 +110,6 @@ private:
|
||||
std::vector<std::string> _receivedScripts;
|
||||
std::string _currentSyncedScript;
|
||||
|
||||
//parallel variables @TODO make a more permanent solution to this - JK
|
||||
std::vector<std::string> _executedScripts;
|
||||
std::mutex _executedScriptsMutex;
|
||||
};
|
||||
|
||||
} // namespace scripting
|
||||
|
||||
Reference in New Issue
Block a user