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 PendingUnsubscribe;
20 struct Slot;
21 struct PendingSubscribe;
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
32 public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<4, 4, uint> id;
36 // NOLINTEND
37 };
38
39 struct Slot {
40 public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::TypedStorage<4, 4, uint> id;
44 ::ll::TypedStorage<4, 4, uint> lastTick;
45 ::ll::TypedStorage<4, 4, ::ScriptModuleMinecraft::ScriptTickSignal::IntervalStatus> status;
46 ::ll::TypedStorage<4, 4, uint> initialInterval;
47 ::ll::TypedStorage<4, 4, uint> currentInterval;
48 ::ll::TypedStorage<8, 112, ::std::variant<::Scripting::Closure<void()>, ::std::function<void()>>> closure;
49 // NOLINTEND
50
51 public:
52 // prevent constructor by default
53 Slot& operator=(Slot const&);
54 Slot(Slot const&);
55 Slot();
56
57 public:
58 // member functions
59 // NOLINTBEGIN
61
62 MCAPI ~Slot();
63 // NOLINTEND
64
65 public:
66 // constructor thunks
67 // NOLINTBEGIN
69 // NOLINTEND
70
71 public:
72 // destructor thunk
73 // NOLINTBEGIN
74 MCFOLD void $dtor();
75 // NOLINTEND
76 };
77
79 public:
80 // member variables
81 // NOLINTBEGIN
82 ::ll::TypedStorage<8, 136, ::ScriptModuleMinecraft::ScriptTickSignal::Slot> slot;
83 // NOLINTEND
84
85 public:
86 // member functions
87 // NOLINTBEGIN
88 MCAPI ~PendingSubscribe();
89 // NOLINTEND
90
91 public:
92 // destructor thunk
93 // NOLINTBEGIN
94 MCFOLD void $dtor();
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:39