Toast Engine
Loading...
Searching...
No Matches
lua_value_codec.hpp File Reference

Converts exported Lua script variable values to/from the engine's text encoding. More...

#include <any>
#include <functional>
#include <string>
#include <string_view>
#include <toast/scripting/script_schema.hpp>
#include <toast/world/box.hpp>
Include dependency graph for lua_value_codec.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using scripting::NodeResolver = std::function<toast::Box<toast::Node>(std::string_view)>
 Resolves a node UID to a node reference.

Functions

auto scripting::stringifyLuaValue (const LuaVarDesc &desc, const std::any &value) -> std::string
 Encodes a Lua variable's current value as the engine's text encoding.
auto scripting::parseLuaValue (const LuaVarDesc &desc, std::string_view text, const NodeResolver &find_node) -> std::any
 Decodes the engine's text encoding back into a value.

Detailed Description

Converts exported Lua script variable values to/from the engine's text encoding.

Author
Xein
Date
14 Jul 2026