37#ifndef H_OGF_GOM_LUA_INTERPRETER_H
38#define H_OGF_GOM_LUA_INTERPRETER_H
42#include <OGF/gom/types/callable.h>
80 const std::string& command,
bool save_in_history,
bool log
91 Any resolve(
const std::string&
id,
bool quiet=
true)
const override;
96 void bind(
const std::string&
id,
const Any& value)
override;
102 const std::string& expression,
bool quiet=
true
126 void list_names(std::vector<std::string>& names)
const override;
143 const std::string& context, std::vector<std::string>& keys
150 const std::string& args
155 lua_State* lua_state_;
A class that stores a variable of arbitrary type.
Abstract base class for the GOM interpreter.
The main class that interfaces the Python interpreter with Graphite.
void get_keys(const std::string &context, std::vector< std::string > &keys) override
Gets all possible keys in a certain context.
~LuaInterpreter() override
LuaInterpreter destructor.
bool execute(const std::string &command, bool save_in_history, bool log) override
Executes a single line of code in the interpreted language.
std::string name_value_pair_call(const std::string &args) const override
Transforms a list of name-value pairs arguments.
lua_State * lua_state()
Gets the LUA state.
void reset() override
Clears all variables, restarts from initial state.
LuaInterpreter()
LuaInterpreter constructor.
void bind(const std::string &id, const Any &value) override
Binds a value to a variable.
Any resolve(const std::string &id, bool quiet=true) const override
Finds a variable by id.
virtual void adjust_lua_state()
Adjusts LUA state to recover from errors.
bool execute_file(const std::string &file_name) override
Executes commands from a given file.
Any eval(const std::string &expression, bool quiet=true) const override
Evaluates a string with an expression.
void list_names(std::vector< std::string > &names) const override
Lists the variable names in this Scope.
static void display_error_message(const std::string &msg)
Displays a Lua error message.
The abstract base class for the GOM interpreter.
Global Graphite namespace.
Definitions common to all include files in the gom library.