LeviLamina
Loading...
Searching...
No Matches
WorldClock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/container/EnumSet.h"
7#include "mc/deps/core/string/HashedString.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/deps/core/utility/UniqueOwnerPointer.h"
10#include "mc/deps/core/utility/pub_sub/Publisher.h"
11#include "mc/platform/brstd/flat_map.h"
12
13// auto generated forward declare list
14// clang-format off
15class PacketSender;
16class TimeMarker;
17struct WorldClockData;
18namespace Bedrock::PubSub::ThreadModel { struct MultiThreaded; }
19namespace cereal { struct ReflectionCtx; }
20// clang-format on
21
22class WorldClock {
23public:
24 // WorldClock inner types define
25 enum class DirtyFlags : uchar {
26 SyncState = 0,
27 AddTimeMarker = 1,
28 RemoveTimeMarker = 2,
29 Count = 3,
30 };
31
32 using OnPauseSignature = void(::std::string const&);
33
34 using OnRestartSignature = void(::std::string const&, int&);
35
36 using OnResumeSignature = void(::std::string const&);
37
38 using OnTimeMarkerSignature = void(::std::string const&, ::Bedrock::NonOwnerPointer<::TimeMarker const> const);
39
40 using OnTimeModifiedSignature = void(::std::string const&, int);
41
42public:
43 // member variables
44 // NOLINTBEGIN
45 ::ll::TypedStorage<8, 48, ::HashedString> mName;
46 ::ll::TypedStorage<4, 4, int> mTime;
47 ::ll::TypedStorage<1, 1, bool> mIsPaused;
48 ::ll::TypedStorage<
49 8,
50 48,
52 uint64,
54 ::std::less<uint64>,
55 ::std::vector<uint64>,
56 ::std::vector<::Bedrock::UniqueOwnerPointer<::TimeMarker>>>>
57 mTimeMarkers;
58 ::ll::TypedStorage<8, 24, ::std::vector<uint64>> mTimeMarkersToAdd;
59 ::ll::TypedStorage<8, 24, ::std::vector<uint64>> mTimeMarkersToRemove;
60 ::ll::TypedStorage<1, 1, ::Bedrock::EnumSet<::WorldClock::DirtyFlags, 3>> mDirtyFlags;
61 ::ll::TypedStorage<
62 8,
63 128,
65 mOnPause;
66 ::ll::TypedStorage<
67 8,
68 128,
70 mOnResume;
71 ::ll::TypedStorage<
72 8,
73 128,
74 ::Bedrock::PubSub::
75 Publisher<void(::std::string const&, int&), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
76 mOnRestart;
77 ::ll::TypedStorage<
78 8,
79 128,
81 void(::std::string const&, ::Bedrock::NonOwnerPointer<::TimeMarker const>),
83 0>>
84 mOnTimeMarker;
85 ::ll::TypedStorage<
86 8,
87 128,
89 mOnTimeModified;
90 ::ll::TypedStorage<1, 1, bool> mTimeMarkerEventsRanThisTick;
91 // NOLINTEND
92
93public:
94 // member functions
95 // NOLINTBEGIN
96 MCAPI WorldClock();
97
98#ifdef LL_PLAT_C
99 MCAPI explicit WorldClock(::WorldClockData const& data);
100#endif
101
102 MCAPI WorldClock(::WorldClock const& rhs);
103
104 MCAPI void _sendAddTimeMarker(::PacketSender& packetSender) const;
105
106 MCAPI void _sendRemoveTimeMarker(::PacketSender& packetSender) const;
107
108 MCAPI void _sendSyncWorldClockState(::PacketSender& packetSender) const;
109
110 MCAPI ::WorldClock& operator=(::WorldClock const& rhs);
111
112#ifdef LL_PLAT_C
113 MCAPI void tick();
114#endif
115
116 MCAPI ~WorldClock();
117 // NOLINTEND
118
119public:
120 // static functions
121 // NOLINTBEGIN
122 MCAPI static void bindType(::cereal::ReflectionCtx& ctx);
123 // NOLINTEND
124
125public:
126 // constructor thunks
127 // NOLINTBEGIN
128 MCAPI void* $ctor();
129
130#ifdef LL_PLAT_C
131 MCAPI void* $ctor(::WorldClockData const& data);
132#endif
133
134 MCAPI void* $ctor(::WorldClock const& rhs);
135 // NOLINTEND
136
137public:
138 // destructor thunk
139 // NOLINTBEGIN
140 MCAPI void $dtor();
141 // NOLINTEND
142};
Definition NonOwnerPointer.h:9
Definition Publisher.h:25
Definition UniqueOwnerPointer.h:11
Definition PacketSender.h:17
Definition TimeMarker.h:13
Definition flat_map.h:15
Definition WorldClockData.h:12
Definition ReflectionCtx.h:11
Definition ctx.h:5