Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
signal_proxy.hpp
1
#pragma once
2
3
#include "toast/reflect/reflect.hpp"
4
#include "
toast/scripting/node_proxy.hpp
"
5
6
#include <string_view>
7
8
struct
lua_State;
9
10
namespace
scripting {
11
class
SignalProxy {
12
public
:
13
SignalProxy(
toast::Box<toast::Node>
source,
const
toast::SignalInfo
& info) : m_source(std::move(source)), m_info(&info) { }
14
15
[[nodiscard]]
16
auto
connect(
NodeProxy
target, std::string_view function, signals::ConnectionSource source,
bool
forwards_args =
true
) -> bool;
17
18
[[nodiscard]]
19
auto
disconnect(
NodeProxy
target, signals::ConnectionSource source, std::string_view function) -> bool;
20
21
[[nodiscard]]
22
auto
connectSelf(std::string_view function, signals::ConnectionSource source,
bool
forwards_args =
true
) -> bool;
23
24
[[nodiscard]]
25
auto
disconnectSelf(signals::ConnectionSource source, std::string_view function) -> bool;
26
27
void
clear(signals::ConnectionSource source);
28
29
[[nodiscard]]
30
auto
fire(lua_State* state) -> bool;
31
32
private
:
33
toast::Box<toast::Node>
m_source;
34
const
toast::SignalInfo
* m_info;
35
};
36
}
scripting::NodeProxy
Definition
node_proxy.hpp:55
toast::Box
Intrusive reference-counted handle to a Node.
Definition
box.hpp:35
node_proxy.hpp
Lua-side proxy for a toast::Node.
toast::SignalInfo
Definition
reflect.hpp:52
engine
src
toast
scripting
signal_proxy.hpp
Generated by
1.17.0