mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-24 13:59:09 -06:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user