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#include "mc/diagnostics/LogAreaID.h"
15#include "mc/platform/threading/Mutex.h"
16
17// auto generated forward declare list
18// clang-format off
21// clang-format on
22
24public:
25 // ContentLog inner types declare
26 // clang-format off
29 class ContentLogScope;
30 class ScopeHandler;
31 // clang-format on
32
33 // ContentLog inner types define
35 public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ContentLogEndPoint>> mContentLogEndPoint;
39 // NOLINTEND
40
41 public:
42 // member functions
43 // NOLINTBEGIN
45 // NOLINTEND
46
47 public:
48 // destructor thunk
49 // NOLINTBEGIN
50 MCNAPI void $dtor();
51 // NOLINTEND
52 };
53
55 public:
56 // ThreadSpecificData inner types declare
57 // clang-format off
58 struct ScopeData;
59 // clang-format on
60
61 // ThreadSpecificData inner types define
62 struct ScopeData {
63 public:
64 // member variables
65 // NOLINTBEGIN
66 ::ll::TypedStorage<8, 8, ::Bedrock::StaticOptimizedString> mMessage;
67 ::ll::TypedStorage<8, 8, ::gsl::not_null<::ContentLog::ContentLogScope const*>> mContentLogScope;
68 // NOLINTEND
69 };
70
71 public:
72 // member variables
73 // NOLINTBEGIN
74 ::ll::TypedStorage<8, 24, ::std::vector<::ContentLog::ThreadSpecificData::ScopeData>> mScope;
75 ::ll::TypedStorage<8, 24, ::std::vector<::ContextMessageLogger*>> mMessageLoggers;
76 // NOLINTEND
77
78 public:
79 // member functions
80 // NOLINTBEGIN
82 // NOLINTEND
83
84 public:
85 // destructor thunk
86 // NOLINTBEGIN
87 MCNAPI void $dtor();
88 // NOLINTEND
89 };
90
91 class ContentLogScope {
92 public:
93 // member variables
94 // NOLINTBEGIN
95 ::ll::TypedStorage<1, 1, bool> mPopScope;
96 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::ContentLog::ScopeHandler>> mScopeHandler;
97 // NOLINTEND
98
99 public:
100 // prevent constructor by default
101 ContentLogScope();
102
103 public:
104 // member functions
105 // NOLINTBEGIN
107
109 // NOLINTEND
110
111 public:
112 // constructor thunks
113 // NOLINTBEGIN
115 // NOLINTEND
116
117 public:
118 // destructor thunk
119 // NOLINTBEGIN
120 MCNAPI void $dtor();
121 // NOLINTEND
122 };
123
124 class ScopeHandler : public ::std::enable_shared_from_this<::ContentLog::ScopeHandler> {
125 public:
126 // member variables
127 // NOLINTBEGIN
128 ::ll::TypedStorage<
129 8,
130 168,
133 ::std::allocator<::ContentLog::ThreadSpecificData>>>
134 mThreadSpecificData;
135 // NOLINTEND
136
137 public:
138 // member functions
139 // NOLINTBEGIN
140 MCNAPI ::std::string getScope();
141
142 MCNAPI void pushScope(
144 ::gsl::not_null<::ContentLog::ContentLogScope*> contentLogScope
145 );
146 // NOLINTEND
147 };
148
150
151public:
152 // member variables
153 // NOLINTBEGIN
154 ::ll::TypedStorage<1, 1, bool> mEnabled;
155 ::ll::TypedStorage<8, 16, ::std::map<::Bedrock::typeid_t<::ContentLog>, ::ContentLog::ContentLogEndPointData>>
156 mEndPoints;
157 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mEndpointMutex;
158 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ContentLog::ScopeHandler>> mScopeHandler;
159 ::ll::TypedStorage<
160 8,
161 64,
162 ::std::unordered_map<::LogLevel, ::std::unordered_map<::LogArea, ::std::unordered_set<uint64>>>>
163 mOnceOnlyMessages;
164 // NOLINTEND
165
166public:
167 // virtual functions
168 // NOLINTBEGIN
169 virtual ~ContentLog() /*override*/;
170 // NOLINTEND
171
172public:
173 // member functions
174 // NOLINTBEGIN
175 MCAPI ContentLog();
176
177 MCAPI void _writeToLog(bool logOnlyOnce, ::LogArea area, ::LogLevel level, char*& args);
178
179#ifdef LL_PLAT_C
180 MCAPI void flush();
181#endif
182
183 MCAPI ::std::string getScope();
184
185 MCFOLD bool isEnabled() const;
186
187 MCAPI void log(bool, ::LogLevel, ::LogArea, ...);
188
189 MCAPI void registerEndPoint(::Bedrock::typeid_t<::ContentLog> id, ::gsl::not_null<::ContentLogEndPoint*> endPoint);
190
191 MCAPI void unregisterEndPoint(::gsl::not_null<::ContentLogEndPoint*> endPoint);
192
193 MCAPI void updateEnabledStatus();
194 // NOLINTEND
195
196public:
197 // static functions
198 // NOLINTBEGIN
199#ifdef LL_PLAT_S
200 MCAPI static ::LogAreaID const getBedrockLogAreaFromContentLogArea(::LogArea contentLogArea);
201#endif
202
203 MCAPI static char const* getLogAreaName(::LogArea area);
204
205#ifdef LL_PLAT_C
206 MCAPI static char const* getLogLevelName(::LogLevel level);
207#endif
208 // NOLINTEND
209
210public:
211 // constructor thunks
212 // NOLINTBEGIN
213 MCAPI void* $ctor();
214 // NOLINTEND
215
216public:
217 // destructor thunk
218 // NOLINTBEGIN
219 MCAPI void $dtor();
220 // NOLINTEND
221
222public:
223 // vftables
224 // NOLINTBEGIN
225 MCNAPI static void** $vftable();
226 // NOLINTEND
227};
Definition EnableNonOwnerReferences.h:7
Definition StaticOptimizedString.h:10
Definition InstancedThreadLocal.h:8
Definition typeid_t.h:25
Definition ContentLogEndPoint.h:17
Definition ContentLog.h:34
Definition ContentLog.h:91
MCAPI ContentLogScope(::Bedrock::StaticOptimizedString scope)
MCAPI void * $ctor(::Bedrock::StaticOptimizedString scope)
Definition ContentLog.h:124
MCAPI void pushScope(::Bedrock::StaticOptimizedString scope, ::gsl::not_null<::ContentLog::ContentLogScope * > contentLogScope)
MCAPI::std::string getScope()
Definition ContentLog.h:54
static MCAPI void ** $vftable()
Definition ContextMessageLogger.h:10
Definition DisableServiceLocatorOverride.h:5