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/platform/threading/Mutex.h"
15
16// auto generated forward declare list
17// clang-format off
20// clang-format on
21
23public:
24 // ContentLog inner types declare
25 // clang-format off
28 class ScopeHandler;
29 class ContentLogScope;
30 // clang-format on
31
32 // ContentLog inner types define
34 public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ContentLogEndPoint>> mContentLogEndPoint;
38 // NOLINTEND
39 };
40
42 public:
43 // ThreadSpecificData inner types declare
44 // clang-format off
45 struct ScopeData;
46 // clang-format on
47
48 // ThreadSpecificData inner types define
49 struct ScopeData {
50 public:
51 // member variables
52 // NOLINTBEGIN
53 ::ll::TypedStorage<8, 8, ::Bedrock::StaticOptimizedString> mMessage;
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
102
104 // NOLINTEND
105
106 public:
107 // constructor thunks
108 // NOLINTBEGIN
110 // NOLINTEND
111
112 public:
113 // destructor thunk
114 // NOLINTBEGIN
115 MCNAPI void $dtor();
116 // NOLINTEND
117 };
118
120
121public:
122 // member variables
123 // NOLINTBEGIN
124 ::ll::TypedStorage<1, 1, bool> mEnabled;
125 ::ll::TypedStorage<8, 16, ::std::map<::Bedrock::typeid_t<::ContentLog>, ::ContentLog::ContentLogEndPointData>>
126 mEndPoints;
127 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mEndpointMutex;
128 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ContentLog::ScopeHandler>> mScopeHandler;
129 ::ll::TypedStorage<
130 8,
131 64,
132 ::std::unordered_map<::LogLevel, ::std::unordered_map<::LogArea, ::std::unordered_set<uint64>>>>
133 mOnceOnlyMessages;
134 // NOLINTEND
135
136public:
137 // virtual functions
138 // NOLINTBEGIN
139 virtual ~ContentLog() /*override*/;
140 // NOLINTEND
141
142public:
143 // member functions
144 // NOLINTBEGIN
145 MCAPI ContentLog();
146
147 MCAPI void _writeToLog(bool logOnlyOnce, ::LogArea area, ::LogLevel level, char*& args);
148
149#ifdef LL_PLAT_C
150 MCAPI void flush();
151#endif
152
153 MCAPI void log(bool logOnlyOnce, ::LogLevel level, ::LogArea area, ...);
154
155 MCAPI void registerEndPoint(::Bedrock::typeid_t<::ContentLog> id, ::gsl::not_null<::ContentLogEndPoint*> endPoint);
156
157 MCAPI void unregisterEndPoint(::gsl::not_null<::ContentLogEndPoint*> endPoint);
158
159 MCAPI void updateEnabledStatus();
160 // NOLINTEND
161
162public:
163 // constructor thunks
164 // NOLINTBEGIN
165 MCAPI void* $ctor();
166 // NOLINTEND
167
168public:
169 // destructor thunk
170 // NOLINTBEGIN
171 MCFOLD void $dtor();
172 // NOLINTEND
173
174public:
175 // vftables
176 // NOLINTBEGIN
177 MCNAPI static void** $vftable();
178 // NOLINTEND
179};
Definition EnableNonOwnerReferences.h:7
Definition StaticOptimizedString.h:10
Definition InstancedThreadLocal.h:8
Definition typeid_t.h:36
Definition ContentLogEndPoint.h:17
Definition ContentLog.h:33
Definition ContentLog.h:86
MCAPI ContentLogScope(::Bedrock::StaticOptimizedString scope)
MCAPI void * $ctor(::Bedrock::StaticOptimizedString scope)
Definition ContentLog.h:66
MCAPI::std::string getScope()
Definition ContentLog.h:41
static MCAPI void ** $vftable()
Definition ContextMessageLogger.h:10
Definition DisableServiceLocatorOverride.h:5