Feature/codegen lua (#1906)

Adapting Lua functions to new codegen functionality
Improve the documentation itself
Add some styling to generated documentation
Have parameter names for Lua-defined Lua function documentation

Co-authored-by: Emma Broman <emma.broman@liu.se>
This commit is contained in:
Alexander Bock
2022-03-21 09:05:37 +01:00
committed by GitHub
parent 6f25dd31e5
commit 3844df20c9
69 changed files with 2656 additions and 4474 deletions

View File

@@ -27,7 +27,9 @@
#include <modules/sync/syncs/httpsynchronization.h>
#include <modules/sync/syncs/urlsynchronization.h>
#include <openspace/documentation/documentation.h>
#include <openspace/engine/globals.h>
#include <openspace/engine/globalscallbacks.h>
#include <openspace/engine/moduleengine.h>
#include <openspace/rendering/renderable.h>
#include <openspace/rendering/screenspacerenderable.h>
#include <openspace/scripting/lualibrary.h>
@@ -119,30 +121,13 @@ std::vector<documentation::Documentation> SyncModule::documentations() const {
}
scripting::LuaLibrary SyncModule::luaLibrary() const {
scripting::LuaLibrary res;
res.name = "sync";
res.functions = {
return {
"sync",
{
"syncResource",
&luascriptfunctions::syncResource,
"string, number",
"Synchronizes the http resource identified by the name passed as the "
"first parameter and the version provided as the second parameter. The "
"application will hang while the data is being downloaded"
},
{
"unsyncResource",
&luascriptfunctions::unsyncResource,
"string [, number]",
"Unsynchronizes the http resources identified by the name passed as the "
"first parameter by removing all data that was downloaded as part of the "
"original synchronization. If the second parameter is provided, is it "
"the version of the resources that is unsynchronized, if the parameter "
"is not provided, all versions for the specified http resource are "
"removed."
codegen::lua::SyncResource,
codegen::lua::UnsyncResource
}
};
return res;
}
} // namespace openspace