Taskolib  1.3.3
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
task Namespace Reference

Detailed Description

Namespace task contains all Taskolib functions and classes.

Namespaces

 literals
 

Classes

struct  CommChannel
 A struct combining a message queue and several atomic flags. More...
 
struct  Context
 A context stores information that influences the execution of steps and sequences, namely: More...
 
class  Error
 An exception class carrying an error message and, optionally, the index of the step in which the error occurred. More...
 
class  Executor
 An executor runs a copy of a given Sequence (or just a single step within it) in a separate thread, receives messages from it, and updates the local instance of the Sequence accordingly. More...
 
class  LockedQueue
 A thread-safe locking message queue. More...
 
class  Message
 A message carrying some text, a timestamp, and a type, to be transported with a message queue between threads. More...
 
class  Sequence
 A sequence of steps that can be modified and executed. More...
 
class  SequenceManager
 A class for listing, loading, storing, and renaming sequences in a given file system directory. More...
 
class  SequenceName
 The machine-readable name of a Sequence. More...
 
class  Step
 A step is the main building block of a sequence. More...
 
class  Tag
 A tag used for categorizing sequences. More...
 
class  Timeout
 A type for storing a timeout duration. More...
 
class  TimeoutTrigger
 Evaluates when the clock is elapsed. More...
 
class  UniqueId
 An unsigned 64-bit integer for use as a unique ID. More...
 
class  VariableName
 A variable name is a string with limited functionality and some limitations on the allowed characters. More...
 

Typedefs

using LuaInteger = LUA_INTEGER
 The integer type used by the Lua interpreter. More...
 
using LuaFloat = LUA_NUMBER
 The floating point type used by the Lua interpreter. More...
 
using LuaString = std::string
 The string type used by the Lua interpreter. More...
 
using LuaBool = bool
 The boolean type used by the Lua interpreter. More...
 
using VarInteger = long long
 Storage type for integral numbers. More...
 
using VarFloat = double
 Storage type for floatingpoint number. More...
 
using VarString = std::string
 Storage type for strings. More...
 
using VarBool = bool
 Storage type for booleans. More...
 
using VariableValue = std::variant< VarInteger, VarFloat, VarString, VarBool >
 A VariableValue is a variant over all Variable types. More...
 
using VariableTable = std::unordered_map< VariableName, VariableValue >
 Associative table that holds Lua variable names and their value. More...
 
using MessageCallback = std::function< void(const Message &)>
 A message callback function receives a Message object as a parameter. More...
 
using VariableNames = std::set< VariableName >
 
using ExecutionSteps = std::set< Step::Type >
 Alias for a step type collection that executes a script. More...
 
using StepIndex = std::uint16_t
 A type for storing the index of a Step in a Sequence. More...
 
using OptionalStepIndex = gul14::optional< StepIndex >
 An optional step index (gul14::optional<StepIndex>). More...
 
using Clock = std::chrono::system_clock
 
using TimePoint = std::chrono::time_point< Clock >
 

Enumerations

enum class  ErrorCause { terminated_by_script , aborted , uncaught_error }
 An enum detailing the possible causes of the termination of a sequence. More...
 

Functions

void default_message_callback (const Message &msg)
 Default callback function for messages. More...
 
gul14::expected< sol::object, std::string > execute_lua_script (sol::state &lua, sol::string_view script)
 Execute a Lua script safely, intercepting all possible exceptions that may occur during its execution. More...
 
gul14::expected< sol::load_result, std::string > load_lua_script (sol::state &lua, sol::string_view script)
 Load a Lua script into the given Lua state and check its syntax without running it. More...
 
constexpr unsigned long hash_djb2a (gul14::string_view sv)
 Adapt switch statement with stringify items: https://learnmoderncpp.com/2020/06/01/strings-as-switch-case-labels/ Version 1.4: 2022/01/15, MIT license, (c) 2020-22 Richard Spencer. More...
 
constexpr unsigned long operator""_sh (const char *str, std::size_t len)
 Adapt switch statement with stringify items: https://learnmoderncpp.com/2020/06/01/strings-as-switch-case-labels/ Version 1.4: 2022/01/15, MIT license, (c) 2020-22 Richard Spencer. More...
 
std::string to_string (Step::Type type)
 Return a lower-case name for a step type ("action", "if", "end"). More...
 
bool executes_script (Step::Type step_type)
 Determine if a script is executed. More...
 
bool requires_bool_return_value (Step::Type step_type) noexcept
 Determine if a certain step type requires a boolean return value from the script. More...
 
std::string to_string (task::TimePoint t)
 
std::time_t timegm (const std::tm &t)
 
std::ostream & operator<< (std::ostream &stream, const Timeout &timeout)
 
std::istream & operator>> (std::istream &stream, Step &step)
 Deserialize parameters of Step from the input stream. More...
 
Step load_step (const std::filesystem::path &lua_file)
 Read a Step from a file and return it. More...
 
void load_sequence_parameters (const std::filesystem::path &folder, Sequence &sequence)
 Load sequence parameters like the step setup script and the sequence timeout. More...
 
std::vector< Tagparse_tags (gul14::string_view str)
 Parse a whitespace-separated string into a list of tags. More...
 
bool parse_bool (gul14::string_view str)
 Parse a bool expression from a string. More...
 
Timeout parse_timeout (gul14::string_view str)
 Parse a string into a Timeout value. More...
 
std::string beautify_message (gul14::string_view msg)
 
void check_for_control_characters (gul14::string_view str)
 Throw an exception if the string contains control characters. More...
 
std::pair< std::string, ErrorCauseremove_abort_markers (gul14::string_view error_message)
 Remove abort markers from the given error message, beautify it, and determine the cause of the error. More...
 
void abort_script_with_error (lua_State *lua_state, const std::string &msg)
 
void check_immediate_termination_request (lua_State *lua_state)
 
void check_script_timeout (lua_State *lua_state)
 
CommChannelget_comm_channel_ptr_from_registry (lua_State *lua_state)
 Retrieve a pointer to the used CommChannel from the Lua registry. More...
 
const Contextget_context_from_registry (lua_State *lua_state)
 Retrieve a reference to the used Context from the Lua registry. More...
 
OptionalStepIndex get_step_idx_from_registry (lua_State *lua_state)
 Get the index of the currently executed Step from the Lua registry. More...
 
LuaInteger get_ms_since_epoch (TimePoint t0, std::chrono::milliseconds dt)
 
void hook_check_timeout_and_termination_request (lua_State *lua_state, lua_Debug *)
 
void hook_abort_with_error (lua_State *lua_state, lua_Debug *)
 
void install_custom_commands (sol::state &lua)
 Install implementations for some custom functions in the given Lua state. More...
 
void install_timeout_and_termination_request_hook (sol::state &lua, TimePoint now, std::chrono::milliseconds timeout, OptionalStepIndex step_idx, const Context &context, CommChannel *comm_channel, TimeoutTrigger *sequence_timeout)
 
void open_safe_library_subset (sol::state &lua)
 
void print_fct (sol::this_state sol, sol::variadic_args va)
 
void sleep_fct (double seconds, sol::this_state sol)
 
void send_message (Message::Type type, gul14::string_view text, TimePoint timestamp, OptionalStepIndex index, const Context &context, CommChannel *comm_channel=nullptr)
 Call the message callback and enqueue the message in the given communication channel, if any. More...
 
std::string make_sequence_filename (SequenceName sequence_name, UniqueId unique_id)
 Return a filename for the given combination of machine-friendly sequence name and unique ID. More...
 
std::ostream & operator<< (std::ostream &stream, const Step &step)
 Serialize parameters of Step to the output stream. More...
 
void store_step (const std::filesystem::path &lua_file, const Step &step)
 Store a Step in a file. More...
 
std::ostream & operator<< (std::ostream &stream, const Sequence &sequence)
 Serialize parameters of Sequence to the output stream. More...
 
std::ostream & operator<< (std::ostream &stream, const Tag &tag)
 
std::string to_string (UniqueId uid)
 

Variables

const ExecutionSteps execution_steps
 Step types that execute a script. More...
 
const gul14::string_view abort_marker { u8"\U0001F6D1ABORT\U0001F6D1" }
 A marker string (the word "ABORT" surrounded by Unicode stop signs) whose presence anywhere in an error message signals that the execution of a script should be stopped. More...
 
const char sequence_lua_filename [] = "sequence.lua"
 Define the Lua sequence filename for storing and loading Lua script. More...
 

Typedef Documentation

◆ Clock

using task::Clock = typedef std::chrono::system_clock

◆ ExecutionSteps

using task::ExecutionSteps = typedef std::set<Step::Type>

Alias for a step type collection that executes a script.

◆ LuaBool

using task::LuaBool = typedef bool

The boolean type used by the Lua interpreter.

◆ LuaFloat

using task::LuaFloat = typedef LUA_NUMBER

The floating point type used by the Lua interpreter.

◆ LuaInteger

using task::LuaInteger = typedef LUA_INTEGER

The integer type used by the Lua interpreter.

◆ LuaString

using task::LuaString = typedef std::string

The string type used by the Lua interpreter.

◆ MessageCallback

using task::MessageCallback = typedef std::function<void(const Message&)>

A message callback function receives a Message object as a parameter.

It is called on the main thread whenever a message is being processed.

◆ OptionalStepIndex

using task::OptionalStepIndex = typedef gul14::optional<StepIndex>

An optional step index (gul14::optional<StepIndex>).

◆ StepIndex

using task::StepIndex = typedef std::uint16_t

A type for storing the index of a Step in a Sequence.

◆ TimePoint

using task::TimePoint = typedef std::chrono::time_point<Clock>

◆ VarBool

using task::VarBool = typedef bool

Storage type for booleans.

◆ VarFloat

using task::VarFloat = typedef double

Storage type for floatingpoint number.

◆ VariableNames

using task::VariableNames = typedef std::set<VariableName>

◆ VariableTable

using task::VariableTable = typedef std::unordered_map<VariableName, VariableValue>

Associative table that holds Lua variable names and their value.

The keys are of type VariableName and the values VariableValue.

◆ VariableValue

using task::VariableValue = typedef std::variant< VarInteger, VarFloat, VarString, VarBool>

A VariableValue is a variant over all Variable types.

Variable names are associated with these values via a map in the Context class.

Be careful when assigning a string to a VariableValue: Do not use a char* to pass the string, it might be converted to bool instead of the expected std::string. The conversion depends on the used compiler (version).

◆ VarInteger

using task::VarInteger = typedef long long

Storage type for integral numbers.

◆ VarString

using task::VarString = typedef std::string

Storage type for strings.

Enumeration Type Documentation

◆ ErrorCause

enum task::ErrorCause
strong

An enum detailing the possible causes of the termination of a sequence.

Enumerator
terminated_by_script 
aborted 
uncaught_error 

Function Documentation

◆ abort_script_with_error()

void task::abort_script_with_error ( lua_State *  lua_state,
const std::string &  msg 
)

◆ beautify_message()

std::string task::beautify_message ( gul14::string_view  msg)

Referenced by remove_abort_markers().

◆ check_for_control_characters()

void task::check_for_control_characters ( gul14::string_view  str)

Throw an exception if the string contains control characters.

Exceptions
Erroris thrown if the string contains any control characters.

Referenced by task::Sequence::set_label(), and task::Sequence::set_maintainers().

◆ check_immediate_termination_request()

void task::check_immediate_termination_request ( lua_State *  lua_state)

◆ check_script_timeout()

void task::check_script_timeout ( lua_State *  lua_state)

◆ default_message_callback()

void task::default_message_callback ( const Message msg)

Default callback function for messages.

It sends "output" messages to stdout. All other message types are ignored.

References task::Message::get_text(), task::Message::get_type(), and task::Message::output.

◆ execute_lua_script()

gul14::expected< sol::object, std::string > task::execute_lua_script ( sol::state &  lua,
sol::string_view  script 
)

Execute a Lua script safely, intercepting all possible exceptions that may occur during its execution.

This function returns a gul14::expected object: If the Lua script finishes without error, it contains a sol::object representing the return value of the script. If a Lua error or C++ exception occurs, the returned object contains a string with an error message. The error message is pre-processed to a certain degree: Unhelpful parts like the chunk name of the script ([string "..."]:) are removed, and a few known special messages are replaced by more readable explanations.

Referenced by task::Step::execute_impl().

◆ executes_script()

bool task::executes_script ( Step::Type  step_type)

Determine if a script is executed.

Parameters
step_typestep type to check
Returns
true for executing a script otherwise false.

References execution_steps.

Referenced by task::Step::execute_impl().

◆ get_comm_channel_ptr_from_registry()

CommChannel * task::get_comm_channel_ptr_from_registry ( lua_State *  lua_state)

Retrieve a pointer to the used CommChannel from the Lua registry.

The pointer can be null to indicate that no CommChannel is used.

Exceptions
Erroris thrown if the appropriate registry key is not found.

Referenced by check_immediate_termination_request(), and print_fct().

◆ get_context_from_registry()

const Context & task::get_context_from_registry ( lua_State *  lua_state)

Retrieve a reference to the used Context from the Lua registry.

Exceptions
Erroris thrown if the appropriate registry key is not found or if it contains a null pointer.

Referenced by print_fct().

◆ get_ms_since_epoch()

LuaInteger task::get_ms_since_epoch ( TimePoint  t0,
std::chrono::milliseconds  dt 
)

◆ get_step_idx_from_registry()

OptionalStepIndex task::get_step_idx_from_registry ( lua_State *  lua_state)

Get the index of the currently executed Step from the Lua registry.

This function has three different outcomes:

  • If the appropriate registry key is not found, an exception is thrown.
  • If a negative step index is found in the registry, this indicates that no step index information is available. nullopt is returned.
  • Otherwise, the step index is returned.
Exceptions
Erroris thrown if the appropriate registry key is not found.

Referenced by print_fct().

◆ hash_djb2a()

constexpr unsigned long task::hash_djb2a ( gul14::string_view  sv)
inlineconstexpr

Adapt switch statement with stringify items: https://learnmoderncpp.com/2020/06/01/strings-as-switch-case-labels/ Version 1.4: 2022/01/15, MIT license, (c) 2020-22 Richard Spencer.

Referenced by operator""_sh(), and operator>>().

◆ hook_abort_with_error()

void task::hook_abort_with_error ( lua_State *  lua_state,
lua_Debug *   
)

Referenced by abort_script_with_error().

◆ hook_check_timeout_and_termination_request()

void task::hook_check_timeout_and_termination_request ( lua_State *  lua_state,
lua_Debug *   
)

◆ install_custom_commands()

void task::install_custom_commands ( sol::state &  lua)

Install implementations for some custom functions in the given Lua state.

print() -- print a string on the (virtual) console; this function calls the
print_function callback from the given context
sleep() -- wait for a given number of seconds

References abort_script_with_error(), print_fct(), and sleep_fct().

Referenced by task::Step::execute_impl().

◆ install_timeout_and_termination_request_hook()

void task::install_timeout_and_termination_request_hook ( sol::state &  lua,
TimePoint  now,
std::chrono::milliseconds  timeout,
OptionalStepIndex  step_idx,
const Context context,
CommChannel comm_channel,
TimeoutTrigger sequence_timeout 
)

◆ load_lua_script()

gul14::expected< sol::load_result, std::string > task::load_lua_script ( sol::state &  lua,
sol::string_view  script 
)

Load a Lua script into the given Lua state and check its syntax without running it.

This function returns a gul14::expected object: If the syntax of the Lua script is OK, it contains a sol::load_result proxy object that can be called to run the script or cast to a sol::function/sol::protected_function. If the syntax check fails, a string with an error message is returned instead. This error message is pre-processed to a certain degree: Unhelpful parts like the chunk name of the script ([string "..."]:) are removed, and a few known special messages are replaced by more readable explanations.

◆ load_sequence_parameters()

void task::load_sequence_parameters ( const std::filesystem::path &  folder,
Sequence sequence 
)

Load sequence parameters like the step setup script and the sequence timeout.

Parameters
folderof the Sequence.
sequenceto store the loaded step setup script.
See also
Sequence for step setup script.

References parse_bool(), parse_tags(), parse_timeout(), sequence_lua_filename, task::Sequence::set_autorun(), task::Sequence::set_disabled(), task::Sequence::set_label(), task::Sequence::set_maintainers(), task::Sequence::set_step_setup_script(), task::Sequence::set_tags(), and task::Sequence::set_timeout().

Referenced by task::SequenceManager::load_sequence().

◆ load_step()

Step task::load_step ( const std::filesystem::path &  lua_file)

Read a Step from a file and return it.

Parameters
lua_fileThe filename from which to read the step. The file must be a Lua script and should have the extension 'lua'.

It will throw an Error exception if an I/O error occurs on the external filename object or the file does not exist.

Lua comments in the header of the file are used to read metadata. To load a Step, it must have at least the following properties:

-- type: action \a or if \a or ...
-- label: < \a label \a description >

The following properties are optional:

-- use context variable names: [ \a variable1, ... ]
-- time of last modification: %Y-%m-%d %H:%M:%S
-- time of last execution: %Y-%m-%d %H:%M:%S
-- timeout: [infinity|< \a timeout \a in \a milliseconds >]

If one of the optional parameters is not set the following is provided as default:

  • context variable names is an empty list
  • time of last modification is set to a time stamp when loaded
  • time of last execution is set to January 1st 1970
  • timeout is set to 0s

Here is one example of a stored Step step_001_while.lua :

-- type: while
-- label: Is increment lower then 10?
-- use context variable names: [incr]
-- time of last modification: 2022-06-13 16:30:32
-- time of last execution: 2022-06-13 16:55:21
-- timeout: 60000
return incr < 10

The label is explicitly escaped on storing and unescaped on loading.

Note
See ISO 8601 for the date and time format.
If time of last modification is not provided in the file, it is set to the time of loading the step.
The collection of context variable names can also be an empty list, ie. [] .
Returns
the deserialized Step object.

Referenced by task::SequenceManager::load_sequence().

◆ make_sequence_filename()

std::string task::make_sequence_filename ( SequenceName  sequence_name,
UniqueId  unique_id 
)

Return a filename for the given combination of machine-friendly sequence name and unique ID.

It is guaranteed that the filename does not contain filesystem-unsafe characters like / or .

References task::SequenceName::string(), and to_string().

Referenced by task::Sequence::get_folder(), and task::SequenceManager::rename_sequence().

◆ open_safe_library_subset()

void task::open_safe_library_subset ( sol::state &  lua)

◆ operator""_sh()

constexpr unsigned long task::operator""_sh ( const char *  str,
std::size_t  len 
)
inlineconstexpr

Adapt switch statement with stringify items: https://learnmoderncpp.com/2020/06/01/strings-as-switch-case-labels/ Version 1.4: 2022/01/15, MIT license, (c) 2020-22 Richard Spencer.

References hash_djb2a().

◆ operator<<() [1/4]

std::ostream & task::operator<< ( std::ostream &  stream,
const Sequence sequence 
)

Serialize parameters of Sequence to the output stream.

No checking of any stream failure is done and should be performed by the caller.

Parameters
streamto serialize the Step
sequenceto serialize
Returns
passed output stream

References task::Sequence::get_step_setup_script().

◆ operator<<() [2/4]

std::ostream & task::operator<< ( std::ostream &  stream,
const Step step 
)

Serialize parameters of Step to the output stream.

No checking of any stream failure is done and should be performed by the caller.

Parameters
streamto serialize the Step
stepto serialize
Returns
passed output stream

References task::Step::get_label(), task::Step::get_script(), task::Step::get_time_of_last_execution(), task::Step::get_time_of_last_modification(), task::Step::get_timeout(), task::Step::get_type(), task::Step::get_used_context_variable_names(), task::Step::is_disabled(), and to_string().

◆ operator<<() [3/4]

std::ostream& task::operator<< ( std::ostream &  stream,
const Tag tag 
)

◆ operator<<() [4/4]

std::ostream& task::operator<< ( std::ostream &  stream,
const Timeout timeout 
)
inline

◆ operator>>()

std::istream & task::operator>> ( std::istream &  stream,
Step step 
)

Deserialize parameters of Step from the input stream.

No checking of any stream failure is done and should be performed by the caller.

Parameters
streaminput stream
stepStep to be deserialized.
Returns
passed input stream

References hash_djb2a(), parse_timeout(), task::Step::set_script(), task::Step::set_time_of_last_modification(), and task::Step::set_timeout().

◆ parse_bool()

bool task::parse_bool ( gul14::string_view  str)

Parse a bool expression from a string.

Referenced by load_sequence_parameters().

◆ parse_tags()

std::vector< Tag > task::parse_tags ( gul14::string_view  str)

Parse a whitespace-separated string into a list of tags.

Exceptions
Erroris thrown if a tag with an invalid name is encountered.

Referenced by load_sequence_parameters().

◆ parse_timeout()

Timeout task::parse_timeout ( gul14::string_view  str)

Parse a string into a Timeout value.

The string may contain a positive, integral number of milliseconds or the string "infinite" in lower- or uppercase letters. It may be surrounded by whitespace.

Exceptions
Erroris thrown if the string does not represent a valid Timeout.

Referenced by load_sequence_parameters(), and operator>>().

◆ print_fct()

void task::print_fct ( sol::this_state  sol,
sol::variadic_args  va 
)

◆ remove_abort_markers()

std::pair< std::string, ErrorCause > task::remove_abort_markers ( gul14::string_view  error_message)

Remove abort markers from the given error message, beautify it, and determine the cause of the error.

If at least two abort markers are present, the message is truncated to the text between the first two of these markers. Otherwise, all markers are simply removed.

The cause of the error is determined as follows:

  • If no marker was present, the message describes a "normal" error and ErrorCause::uncaught_error is returned.
  • If the message contains one or more abort markers, it describes an abort request for the sequence. There are two different types of abort requests:
    • If there is an error message, this is considered an abort request (either by the user or by timeouts) and ErrorCause::aborted is returned.
    • If the error message is empty, this is considered an explicit termination request by the running script. The error message is set to a corresponding explanation ("Script called terminate_sequence()") and ErrorCause::terminated_by_script is returned.

If the message contains a Lua stack trace, the function highlights its start by including a UTF-8 bullet point symbol to visually separate the main message text from the stack trace.

Returns
a pair consisting of the (possibly) modified error message and of an ErrorCause.

References abort_marker, aborted, beautify_message(), terminated_by_script, and uncaught_error.

Referenced by task::Step::execute(), and task::Sequence::handle_execution().

◆ requires_bool_return_value()

bool task::requires_bool_return_value ( Step::Type  step_type)
noexcept

Determine if a certain step type requires a boolean return value from the script.

Referenced by task::Step::execute(), and task::Step::execute_impl().

◆ send_message()

void task::send_message ( Message::Type  type,
gul14::string_view  text,
TimePoint  timestamp,
OptionalStepIndex  index,
const Context context,
CommChannel comm_channel = nullptr 
)

Call the message callback and enqueue the message in the given communication channel, if any.

Parameters
typeMessage type (see Message::Type)
textMessage text
timestampTimestamp of the message
indexAn optional index (of a Step in its parent Sequence)
contextContext with a message callback function
comm_channelPointer to the communication channel. If this is null, the function does not attempt to push the message into any message queue.

References task::Context::message_callback_function, and task::CommChannel::queue_.

Referenced by task::Step::execute(), task::Sequence::handle_execution(), and print_fct().

◆ sleep_fct()

void task::sleep_fct ( double  seconds,
sol::this_state  sol 
)

◆ store_step()

void task::store_step ( const std::filesystem::path &  lua_file,
const Step step 
)

Store a Step in a file.

This function saves the script of this step in a Lua file. Metadata like the step type or the label are stored as comments in the header of the file:

-- type: {action, if, elseif, else, while, try, catch, end}
-- label: < \a label \a description >
-- use context variable names: [ \a variable1, ... ]
-- time of last modification: %Y-%m-%d %H:%M:%S
-- time of last execution: %Y-%m-%d %H:%M:%S
-- timeout: [infinity|< \a time \a in \a milliseconds >]
< \a Lua \a script >

The Lua script can be omitted for type try, catch, and end as it has no meaning for execution. See Step::execution for more information. The list of context variable names can also be empty.

Here is one example of a stored Step step_001_action.lua:

-- type: action
-- label: Increment a
-- use context variable names: [a]
-- time of last modification: 2022-06-13 16:30:32
-- time of last execution: 2022-06-13 16:55:21
-- timeout: infinity
a = a + 1

The label is explicitly escaped on storing and unescaped on loading.

Parameters
lua_filefilename under which the step should be stored
stepthe Step object that should be serialized

Referenced by task::SequenceManager::write_sequence_to_disk().

◆ timegm()

std::time_t task::timegm ( const std::tm &  t)

◆ to_string() [1/3]

std::string task::to_string ( Step::Type  type)

◆ to_string() [2/3]

std::string task::to_string ( task::TimePoint  t)

◆ to_string() [3/3]

std::string task::to_string ( UniqueId  uid)

Variable Documentation

◆ abort_marker

const gul14::string_view task::abort_marker { u8"\U0001F6D1ABORT\U0001F6D1" }

A marker string (the word "ABORT" surrounded by Unicode stop signs) whose presence anywhere in an error message signals that the execution of a script should be stopped.

Referenced by abort_script_with_error(), task::Sequence::execute_range(), task::Sequence::execute_try_block(), and remove_abort_markers().

◆ execution_steps

const ExecutionSteps task::execution_steps
Initial value:
{
Step::type_action,
Step::type_if,
Step::type_elseif,
Step::type_while
}

Step types that execute a script.

Referenced by executes_script().

◆ sequence_lua_filename

const char task::sequence_lua_filename[] = "sequence.lua"

Define the Lua sequence filename for storing and loading Lua script.

Referenced by load_sequence_parameters(), and task::SequenceManager::write_sequence_to_disk().