25 #ifndef TASKOLIB_CONTEXT_H_
26 #define TASKOLIB_CONTEXT_H_
30 #include <unordered_map>
33 #include "sol/sol.hpp"
Declaration of the CommChannel struct.
Declaration of the Message class.
Declaration of the StepIndex type.
Declaration of the VariableName class and of an associated specialization of std::hash.
A message carrying some text, a timestamp, and a type, to be transported with a message queue between...
Definition: Message.h:45
Declaration of the default_message_callback() function.
Namespace task contains all Taskolib functions and classes.
Definition: CommChannel.h:33
long long VarInteger
Storage type for integral numbers.
Definition: Context.h:55
std::string LuaString
The string type used by the Lua interpreter.
Definition: Context.h:49
bool VarBool
Storage type for booleans.
Definition: Context.h:58
LUA_INTEGER LuaInteger
The integer type used by the Lua interpreter.
Definition: Context.h:47
void default_message_callback(const Message &msg)
Default callback function for messages.
Definition: default_message_callback.cc:30
std::function< void(const Message &)> MessageCallback
A message callback function receives a Message object as a parameter.
Definition: Context.h:86
LUA_NUMBER LuaFloat
The floating point type used by the Lua interpreter.
Definition: Context.h:48
std::variant< VarInteger, VarFloat, VarString, VarBool > VariableValue
A VariableValue is a variant over all Variable types.
Definition: Context.h:73
double VarFloat
Storage type for floatingpoint number.
Definition: Context.h:56
bool LuaBool
The boolean type used by the Lua interpreter.
Definition: Context.h:50
std::string VarString
Storage type for strings.
Definition: Context.h:57
std::unordered_map< VariableName, VariableValue > VariableTable
Associative table that holds Lua variable names and their value.
Definition: Context.h:80
A context stores information that influences the execution of steps and sequences,...
Definition: Context.h:128
std::function< void(sol::state &)> step_setup_function
An initialization function that is called on a Lua state before a step is executed.
Definition: Context.h:137
MessageCallback message_callback_function
A callback (or "hook") function that is invoked whenever a message is processed during the execution ...
Definition: Context.h:143
std::string step_setup_script
Step setup script with common functions or constants like a small library.
Definition: Context.h:134
VariableTable variables
A map of variables (names and values) that can be im-/exported into steps.
Definition: Context.h:130