LeviLamina
Loading...
Searching...
No Matches
ContentLog.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/debug/log/LogArea.h"
7#include "mc/deps/core/debug/log/LogLevel.h"
8#include "mc/deps/core/string/StaticOptimizedString.h"
9#include "mc/deps/core/threading/InstancedThreadLocal.h"
10#include "mc/deps/core/utility/DisableServiceLocatorOverride.h"
11#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
12#include "mc/deps/core/utility/NonOwnerPointer.h"
13#include "mc/deps/core/utility/typeid_t.h"
14
15// auto generated forward declare list
16// clang-format off
19// clang-format on
20
22public:
23 // ContentLog inner types declare
24 // clang-format off
27 class ScopeHandler;
28 class ContentLogScope;
29 // clang-format on
30
31 // ContentLog inner types define
33 public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ContentLogEndPoint>> mContentLogEndPoint;
37 // NOLINTEND
38 };
39
41 public:
42 // ThreadSpecificData inner types declare
43 // clang-format off
44 struct ScopeData;
45 // clang-format on
46
47 // ThreadSpecificData inner types define
48 struct ScopeData {
49 public:
50 // member variables
51 // NOLINTBEGIN
52 ::ll::TypedStorage<8, 24, ::std::optional<::std::string_view>> mMessageRef;
53 ::ll::TypedStorage<8, 8, ::Bedrock::StaticOptimizedString> mMessageStr;
54 ::ll::TypedStorage<8, 8, ::gsl::not_null<::ContentLog::ContentLogScope const*>> mContentLogScope;
55 // NOLINTEND
56 };
57
58 public:
59 // member variables
60 // NOLINTBEGIN
61 ::ll::TypedStorage<8, 24, ::std::vector<::ContentLog::ThreadSpecificData::ScopeData>> mScope;
62 ::ll::TypedStorage<8, 24, ::std::vector<::ContextMessageLogger*>> mMessageLoggers;
63 // NOLINTEND
64 };
65
66 class ScopeHandler : public ::std::enable_shared_from_this<::ContentLog::ScopeHandler> {
67 public:
68 // member variables
69 // NOLINTBEGIN
70 ::ll::TypedStorage<
71 8,
72 168,
75 ::std::allocator<::ContentLog::ThreadSpecificData>>>
76 mThreadSpecificData;
77 // NOLINTEND
78
79 public:
80 // member functions
81 // NOLINTBEGIN
82 MCNAPI ::std::string getScope();
83 // NOLINTEND
84 };
85
86 class ContentLogScope {
87 public:
88 // member variables
89 // NOLINTBEGIN
90 ::ll::TypedStorage<1, 1, bool> mPopScope;
91 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::ContentLog::ScopeHandler>> mScopeHandler;
92 // NOLINTEND
93
94 public:
95 // prevent constructor by default
96 ContentLogScope();
97
98 public:
99 // member functions
100 // NOLINTBEGIN
101 MCNAPI explicit ContentLogScope(::std::string_view scope);
102
103 MCNAPI ContentLogScope(::std::optional<::std::string_view> ref, ::Bedrock::StaticOptimizedString const& str);
104
106 // NOLINTEND
107
108 public:
109 // constructor thunks
110 // NOLINTBEGIN
111 MCNAPI void* $ctor(::std::string_view scope);
112
113 MCNAPI void* $ctor(::std::optional<::std::string_view> ref, ::Bedrock::StaticOptimizedString const& str);
114 // NOLINTEND
115
116 public:
117 // destructor thunk
118 // NOLINTBEGIN
119 MCNAPI void $dtor();
120 // NOLINTEND
121 };
122
124
125public:
126 // member variables
127 // NOLINTBEGIN
128 ::ll::TypedStorage<1, 1, bool> mEnabled;
129 ::ll::TypedStorage<8, 16, ::std::map<::Bedrock::typeid_t<::ContentLog>, ::ContentLog::ContentLogEndPointData>>
130 mEndPoints;
131 ::ll::TypedStorage<8, 80, ::std::mutex> mEndpointMutex;
132 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ContentLog::ScopeHandler>> mScopeHandler;
133 ::ll::TypedStorage<
134 8,
135 64,
136 ::std::unordered_map<::LogLevel, ::std::unordered_map<::LogArea, ::std::unordered_set<uint64>>>>
137 mOnceOnlyMessages;
138 // NOLINTEND
139
140public:
141 // virtual functions
142 // NOLINTBEGIN
143 virtual ~ContentLog() /*override*/ = default;
144 // NOLINTEND
145
146public:
147 // member functions
148 // NOLINTBEGIN
149 MCAPI ContentLog();
150
151 MCAPI void _writeToLog(bool logOnlyOnce, ::LogArea area, ::LogLevel level, char*& args);
152
153#ifdef LL_PLAT_C
154 MCAPI void flush();
155#endif
156
157 MCAPI void log(bool logOnlyOnce, ::LogLevel level, ::LogArea area, ...);
158
159 MCAPI void registerEndPoint(::Bedrock::typeid_t<::ContentLog> id, ::gsl::not_null<::ContentLogEndPoint*> endPoint);
160
161 MCAPI void unregisterEndPoint(::gsl::not_null<::ContentLogEndPoint*> endPoint);
162
163 MCAPI void updateEnabledStatus();
164 // NOLINTEND
165
166public:
167 // constructor thunks
168 // NOLINTBEGIN
169 MCAPI void* $ctor();
170 // NOLINTEND
171
172public:
173 // vftables
174 // NOLINTBEGIN
175 MCNAPI static void** $vftable();
176 // NOLINTEND
177};
Definition EnableNonOwnerReferences.h:7
Definition StaticOptimizedString.h:10
Definition InstancedThreadLocal.h:8
Definition typeid_t.h:36
Definition ContentLogEndPoint.h:17
Definition ContentLog.h:32
Definition ContentLog.h:86
MCAPI void * $ctor(::std::optional<::std::string_view > ref, ::Bedrock::StaticOptimizedString const &str)
MCAPI void * $ctor(::std::string_view scope)
MCAPI ContentLogScope(::std::string_view scope)
MCAPI ContentLogScope(::std::optional<::std::string_view > ref, ::Bedrock::StaticOptimizedString const &str)
Definition ContentLog.h:66
MCAPI::std::string getScope()
Definition ContentLog.h:40
static MCAPI void ** $vftable()
Definition ContextMessageLogger.h:10
Definition DisableServiceLocatorOverride.h:5