mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Doxygen style overhaul (#2954)
Reformatting the existing Doxygen comments to be unified
This commit is contained in:
@@ -33,15 +33,15 @@
|
||||
namespace openspace::scripting {
|
||||
|
||||
/**
|
||||
* This structure represents a Lua library, itself consisting of a unique #name and
|
||||
* an arbitrary number of #functions
|
||||
* This structure represents a Lua library, itself consisting of a unique #name and an
|
||||
* arbitrary number of #functions.
|
||||
*/
|
||||
struct LuaLibrary {
|
||||
/**
|
||||
* This structure represents a Lua function with its #name, #function pointer
|
||||
* #arguments describe the arguments this function takes, and the #helpText describing
|
||||
* the function.
|
||||
*/
|
||||
* This structure represents a Lua function with its #name, #function pointer
|
||||
* #arguments describe the arguments this function takes, and the #helpText describing
|
||||
* the function.
|
||||
*/
|
||||
struct Function {
|
||||
/// The name of the function
|
||||
std::string name;
|
||||
|
||||
@@ -44,9 +44,9 @@ namespace openspace::scripting {
|
||||
* The ScriptEngine is responsible for handling the execution of custom Lua functions and
|
||||
* executing scripts (#runScript and #runScriptFile). Before usage, it has to be
|
||||
* #initialize%d and #deinitialize%d. New ScriptEngine::Library%s consisting of
|
||||
* ScriptEngine::Library::Function%s have to be added which can then be called using the
|
||||
* `openspace` namespace prefix in Lua. The same functions can be exposed to
|
||||
* other Lua states by passing them to the #initializeLuaState method.
|
||||
* Library::Function%s have to be added which can then be called using the
|
||||
* `openspace` namespace prefix in Lua. The same functions can be exposed to other Lua
|
||||
* states by passing them to the #initializeLuaState method.
|
||||
*/
|
||||
class ScriptEngine : public Syncable {
|
||||
public:
|
||||
@@ -66,7 +66,8 @@ public:
|
||||
ScriptEngine();
|
||||
|
||||
/**
|
||||
* Initializes the internal Lua state and registers a common set of library functions
|
||||
* Initializes the internal Lua state and registers a common set of library functions.
|
||||
*
|
||||
* \throw LuaRuntimeException If the creation of the new Lua state fails
|
||||
*/
|
||||
void initialize();
|
||||
|
||||
@@ -45,8 +45,8 @@ namespace openspace::scripting {
|
||||
struct LuaLibrary;
|
||||
|
||||
/**
|
||||
* Maintains an ordered list of `ScheduledScript`s and provides a simple
|
||||
* interface for retrieveing scheduled scripts
|
||||
* Maintains an ordered list of `ScheduledScript`s and provides a simple interface for
|
||||
* retrieveing scheduled scripts.
|
||||
*/
|
||||
class ScriptScheduler : public properties::PropertyOwner {
|
||||
public:
|
||||
@@ -69,8 +69,9 @@ public:
|
||||
* ScheduledScript%s to the list of stored scripts.
|
||||
*
|
||||
* \param scheduledScripts The scripts that should be loaded
|
||||
*
|
||||
* \throw SpecificationError If the dictionary does not adhere to the Documentation as
|
||||
* specified in the openspace::Documentation function
|
||||
* specified in the openspace::Documentation function
|
||||
*/
|
||||
void loadScripts(std::vector<ScheduledScript> scheduledScripts);
|
||||
|
||||
@@ -84,51 +85,48 @@ public:
|
||||
* Removes all scripts for the schedule.
|
||||
*
|
||||
* \param group An int that specifies which group to clear. If none given then all
|
||||
* scripts
|
||||
* is cleared from the schedule.
|
||||
* scripts are cleared from the schedule
|
||||
*/
|
||||
void clearSchedule(std::optional<int> group = std::nullopt);
|
||||
|
||||
/**
|
||||
* Progresses the script schedulers time and returns all scripts that has been
|
||||
* scheduled to run between \p newTime and the time provided in the last invocation
|
||||
* of this method.
|
||||
*
|
||||
* \param newTime A j2000 time value specifying the new time stamp that
|
||||
* the script scheduler should progress to.
|
||||
*
|
||||
* \returns vector with the scheduled scripts that should be run from begining to end.
|
||||
*/
|
||||
* Progresses the script schedulers time and returns all scripts that has been
|
||||
* scheduled to run between \p newTime and the time provided in the last invocation
|
||||
* of this method.
|
||||
*
|
||||
* \param newTime A j2000 time value specifying the new time stamp that the script
|
||||
* scheduler should progress to.
|
||||
* \return vector with the scheduled scripts that should be run from begining to end
|
||||
*/
|
||||
std::vector<std::string> progressTo(double newTime);
|
||||
|
||||
/**
|
||||
* Returns the the j2000 time value that the script scheduler is currently at
|
||||
* Returns the the j2000 time value that the script scheduler is currently at.
|
||||
*/
|
||||
double currentTime() const;
|
||||
|
||||
/**
|
||||
* Updates the current time to the given j2000 time value
|
||||
* Updates the current time to the given J2000 time value.
|
||||
*/
|
||||
void setCurrentTime(double time);
|
||||
|
||||
/**
|
||||
* Function that returns all scripts currently loaded in the script scheduler
|
||||
*
|
||||
* \param group An int specifying which group to return, if empty all scripts
|
||||
* will be returned
|
||||
*
|
||||
* \returns a vector of all scripts that has been loaded
|
||||
*/
|
||||
* Function that returns all scripts currently loaded in the script scheduler.
|
||||
*
|
||||
* \param group An int specifying which group to return, if empty all scripts
|
||||
* will be returned
|
||||
* \return a vector of all scripts that has been loaded
|
||||
*/
|
||||
std::vector<ScheduledScript> allScripts(
|
||||
std::optional<int> group = std::nullopt) const;
|
||||
|
||||
/**
|
||||
* Sets the mode for how each scheduled script's timestamp will be interpreted.
|
||||
* \param refType reference mode (for exact syntax, see definition of
|
||||
* openspace::interaction::KeyframeTimeRef) which is either relative to the
|
||||
* application start time, relative to the recorded session playback start time,
|
||||
* or according to the absolute simulation time in seconds from J2000 epoch.
|
||||
*/
|
||||
* Sets the mode for how each scheduled script's timestamp will be interpreted.
|
||||
* \param refType reference mode (for exact syntax, see definition of
|
||||
* interaction::KeyframeTimeRef) which is either relative to the application start
|
||||
* time, relative to the recorded session playback start time, or according to the
|
||||
* absolute simulation time in seconds from J2000 epoch.
|
||||
*/
|
||||
void setTimeReferenceMode(openspace::interaction::KeyframeTimeRef refType);
|
||||
|
||||
static LuaLibrary luaLibrary();
|
||||
|
||||
Reference in New Issue
Block a user