LeviLamina
Loading...
Searching...
No Matches
ScriptTickSignal.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/scripting/script_engine/Closure.h"
7
8// auto generated forward declare list
9// clang-format off
11// clang-format on
12
13namespace ScriptModuleMinecraft {
14
16public:
17 // ScriptTickSignal inner types declare
18 // clang-format off
19 struct PendingSubscribe;
20 struct PendingUnsubscribe;
21 struct Slot;
22 // clang-format on
23
24 // ScriptTickSignal inner types define
25 enum class IntervalStatus : uint {
26 Once = 0,
27 Repeat = 1,
28 Expired = 2,
29 };
30
31 struct Slot {
32 public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<4, 4, uint> id;
36 ::ll::TypedStorage<4, 4, uint> lastTick;
37 ::ll::TypedStorage<4, 4, ::ScriptModuleMinecraft::ScriptTickSignal::IntervalStatus> status;
38 ::ll::TypedStorage<4, 4, uint> initialInterval;
39 ::ll::TypedStorage<4, 4, uint> currentInterval;
40 ::ll::TypedStorage<8, 256, ::std::variant<::Scripting::Closure<void()>, ::std::function<void()>>> closure;
41 // NOLINTEND
42
43 public:
44 // prevent constructor by default
45 Slot& operator=(Slot const&);
46 Slot(Slot const&);
47 Slot();
48
49 public:
50 // member functions
51 // NOLINTBEGIN
53
54 MCAPI ~Slot();
55 // NOLINTEND
56
57 public:
58 // constructor thunks
59 // NOLINTBEGIN
61 // NOLINTEND
62
63 public:
64 // destructor thunk
65 // NOLINTBEGIN
66 MCFOLD void $dtor();
67 // NOLINTEND
68 };
69
71 public:
72 // member variables
73 // NOLINTBEGIN
74 ::ll::TypedStorage<8, 280, ::ScriptModuleMinecraft::ScriptTickSignal::Slot> slot;
75 // NOLINTEND
76
77 public:
78 // member functions
79 // NOLINTBEGIN
80 MCAPI ~PendingSubscribe();
81 // NOLINTEND
82
83 public:
84 // destructor thunk
85 // NOLINTBEGIN
86 MCFOLD void $dtor();
87 // NOLINTEND
88 };
89
91 public:
92 // member variables
93 // NOLINTBEGIN
94 ::ll::TypedStorage<4, 4, uint> id;
95 // NOLINTEND
96 };
97
98public:
99 // member variables
100 // NOLINTBEGIN
101 ::ll::TypedStorage<4, 4, uint> mNextId;
102 ::ll::TypedStorage<1, 1, bool> mDispatching;
103 ::ll::TypedStorage<8, 24, ::std::vector<::ScriptModuleMinecraft::ScriptTickSignal::Slot>> mActive;
104 ::ll::TypedStorage<
105 8,
106 24,
107 ::std::vector<::std::variant<
110 mPending;
111 // NOLINTEND
112
113public:
114 // member functions
115 // NOLINTBEGIN
116 MCAPI void _processActive(
117 ::std::vector<::ScriptModuleMinecraft::ScriptTickSignal::Slot>& slots,
118 uint currentTick,
119 ::ScriptDeferredFlushTracker& deferredTracker
120 );
121
122 MCAPI void _processPending(
123 ::std::vector<::std::variant<
126 ::std::vector<::ScriptModuleMinecraft::ScriptTickSignal::Slot>& activeList
127 );
128
129 MCAPI uint scheduleInterval(::Scripting::Closure<void()>&& closure, uint interval, uint currentTick);
130
131 MCAPI uint scheduleTimeout(::Scripting::Closure<void()>&& closure, uint delay, uint currentTick);
132
133 MCAPI uint scheduleTimeout(::std::function<void()> function, uint delay, uint currentTick);
134
135 MCAPI uint scheduleTimeoutSafe(::Scripting::Closure<void()>&& closure, uint currentTick);
136 // NOLINTEND
137};
138
139} // namespace ScriptModuleMinecraft
Definition ScriptDeferredFlushTracker.h:13
Definition ScriptTickSignal.h:15
Definition Closure.h:8
Definition ScriptTickSignal.h:31