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