LeviLamina
Loading...
Searching...
No Matches
WorldClockRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/deps/core/utility/UniqueOwnerPointer.h"
8#include "mc/platform/brstd/flat_map.h"
9
10// auto generated forward declare list
11// clang-format off
12class HashedString;
13class LevelData;
15class PacketSender;
16class TimeMarker;
17class WorldClock;
18struct WorldClockData;
20namespace Bedrock::PubSub { class Subscription; }
21// clang-format on
22
24public:
25 // WorldClockRegistry inner types define
26 using RegistrationResult =
27 ::nonstd::expected<::Bedrock::NotNullNonOwnerPtr<::WorldClock>, ::WorldClockRegistrationError>;
28
29public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<
33 8,
34 48,
36 uint64,
38 ::std::less<uint64>,
39 ::std::vector<uint64>,
40 ::std::vector<::Bedrock::UniqueOwnerPointer<::WorldClock>>>>
41 mClocks;
42 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::LevelEventCoordinator>> mLevelEventCoordinator;
43 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::std::vector<::Bedrock::PubSub::Subscription>>>
44 mClockSubscriptions;
45 // NOLINTEND
46
47public:
48 // virtual functions
49 // NOLINTBEGIN
50 virtual ~WorldClockRegistry();
51
52 virtual void tick(::PacketSender& packetSender, ::LevelData const& levelData) = 0;
53 // NOLINTEND
54
55public:
56 // member functions
57 // NOLINTBEGIN
58 MCAPI ::nonstd::expected<::Bedrock::NotNullNonOwnerPtr<::WorldClock>, ::WorldClockRegistrationError>
59 _registerClock(::HashedString const& name, ::std::vector<::TimeMarker> const& timeMarkers, bool isVanilla);
60
61#ifdef LL_PLAT_C
62 MCAPI void _registerEventListeners(::Bedrock::NotNullNonOwnerPtr<::WorldClock> const clock);
63#endif
64
65 MCFOLD ::Bedrock::NonOwnerPointer<::WorldClock> const _tryGetClock(::HashedString const& name);
66
67 MCAPI int getTime(::HashedString const& clockName) const;
68
69 MCAPI void setTime(::HashedString const& clockName, int time);
70
71 MCAPI ::std::vector<::WorldClockData> toData() const;
72
73 MCFOLD ::Bedrock::NonOwnerPointer<::WorldClock const> const tryGetClock(::HashedString const& name) const;
74 // NOLINTEND
75
76public:
77 // destructor thunk
78 // NOLINTBEGIN
79 MCAPI void $dtor();
80 // NOLINTEND
81
82public:
83 // vftables
84 // NOLINTBEGIN
85 MCNAPI static void** $vftable();
86 // NOLINTEND
87};
Definition Subscription.h:10
Definition UniqueOwnerPointer.h:11
Definition HashedString.h:5
Definition LevelData.h:55
Definition LevelEventCoordinator.h:26
Definition PacketSender.h:17
Definition TimeMarker.h:13
Definition WorldClockRegistry.h:23
static MCAPI void ** $vftable()
Definition WorldClock.h:23
Definition flat_map.h:15
Definition WorldClockData.h:12
Definition WorldClockRegistrationError.h:9