Toast Engine
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>
15#include <toast/world/box.hpp>
16
17namespace toast {
18class Node;
19}
20
21namespace scripting {
22
24using NodeResolver = std::function<toast::Box<toast::Node>(std::string_view)>;
25
27auto stringifyLuaValue(const LuaVarDesc& desc, const std::any& value) -> std::string;
28
30auto parseLuaValue(const LuaVarDesc& desc, std::string_view text, const NodeResolver& find_node) -> std::any;
31
32}
pseudo shared pointer for Nodes
Definition node.hpp:81
std::function< toast::Box< toast::Node >(std::string_view)> NodeResolver
Resolves a node UID to a node reference.
Definition lua_value_codec.hpp:24
Description of a script's exported variables for the inspector.
Definition script_schema.hpp:34