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, 120, ::std::variant<::Scripting::Closure<void()>, ::std::function<void()>>> closure;
49 // NOLINTEND
50
51 public:
52 // member functions
53 // NOLINTBEGIN
54 MCAPI ~Slot();
55 // NOLINTEND
56
57 public:
58 // destructor thunk
59 // NOLINTBEGIN
60 MCFOLD void $dtor();
61 // NOLINTEND
62 };
63
65 public:
66 // member variables
67 // NOLINTBEGIN
68 ::ll::TypedStorage<8, 144, ::ScriptModuleMinecraft::ScriptTickSignal::Slot> slot;
69 // NOLINTEND
70
71 public:
72 // member functions
73 // NOLINTBEGIN
74 MCAPI ~PendingSubscribe();
75 // NOLINTEND
76
77 public:
78 // destructor thunk
79 // NOLINTBEGIN
80 MCFOLD void $dtor();
81 // NOLINTEND
82 };
83
84public:
85 // member variables
86 // NOLINTBEGIN
87 ::ll::TypedStorage<4, 4, uint> mNextId;
88 ::ll::TypedStorage<1, 1, bool> mDispatching;
89 ::ll::TypedStorage<8, 24, ::std::vector<::ScriptModuleMinecraft::ScriptTickSignal::Slot>> mActive;
90 ::ll::TypedStorage<
91 8,
92 24,
93 ::std::vector<::std::variant<
96 mPending;
97 // NOLINTEND
98
99public:
100 // member functions
101 // NOLINTBEGIN
102 MCAPI void _processActive(
103 ::std::vector<::ScriptModuleMinecraft::ScriptTickSignal::Slot>& slots,
104 uint currentTick,
105 ::ScriptDeferredFlushTracker& deferredTracker
106 );
107
108 MCAPI void _processPending(
109 ::std::vector<::std::variant<
112 ::std::vector<::ScriptModuleMinecraft::ScriptTickSignal::Slot>& activeList
113 );
114
115 MCAPI void _removeAllExpired(::std::vector<::ScriptModuleMinecraft::ScriptTickSignal::Slot>& activeList);
116
117 MCAPI void _removeById(uint id, ::std::vector<::ScriptModuleMinecraft::ScriptTickSignal::Slot>& activeList);
118
119 MCAPI uint scheduleInterval(::Scripting::Closure<void()>&& closure, uint interval, uint currentTick);
120
121 MCAPI uint scheduleTimeout(::Scripting::Closure<void()>&& closure, uint delay, uint currentTick);
122
123 MCAPI uint scheduleTimeout(::std::function<void()> function, uint delay, uint currentTick);
124
125 MCAPI uint scheduleTimeoutSafe(::Scripting::Closure<void()>&& closure, uint currentTick);
126
127 MCAPI void unschedule(uint id);
128 // NOLINTEND
129};
130
131} // namespace ScriptModuleMinecraft
Definition ScriptDeferredFlushTracker.h:13
Definition ScriptTickSignal.h:15
Definition Closure.h:8
Definition ScriptTickSignal.h:39