Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
lua_value_codec.hpp
Go to the documentation of this file.
1
7
8
#pragma once
9
10
#include <any>
11
#include <functional>
12
#include <string>
13
#include <string_view>
14
#include <
toast/scripting/script_schema.hpp
>
15
#include <
toast/world/box.hpp
>
16
17
namespace
toast {
18
class
Node
;
19
}
20
21
namespace
scripting {
22
24
using
NodeResolver
= std::function<toast::Box<toast::Node>(std::string_view)>;
25
27
auto
stringifyLuaValue(
const
LuaVarDesc
& desc,
const
std::any& value) -> std::string;
28
30
auto
parseLuaValue(
const
LuaVarDesc
& desc, std::string_view text,
const
NodeResolver
& find_node) -> std::any;
31
32
}
box.hpp
pseudo shared pointer for Nodes
toast::Node
Definition
node.hpp:81
scripting::NodeResolver
std::function< toast::Box< toast::Node >(std::string_view)> NodeResolver
Resolves a node UID to a node reference.
Definition
lua_value_codec.hpp:24
script_schema.hpp
Description of a script's exported variables for the inspector.
scripting::LuaVarDesc
Definition
script_schema.hpp:34
engine
src
toast
scripting
lua_value_codec.hpp
Generated by
1.17.0