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, 24, ::std::optional<::std::string_view>> mMessageRef;
54 ::ll::TypedStorage<8, 8, ::Bedrock::StaticOptimizedString> mMessageStr;
55 ::ll::TypedStorage<8, 8, ::gsl::not_null<::ContentLog::ContentLogScope const*>> mContentLogScope;
56 // NOLINTEND
57 };
58
59 public:
60 // member variables
61 // NOLINTBEGIN
62 ::ll::TypedStorage<8, 24, ::std::vector<::ContentLog::ThreadSpecificData::ScopeData>> mScope;
63 ::ll::TypedStorage<8, 24, ::std::vector<::ContextMessageLogger*>> mMessageLoggers;
64 // NOLINTEND
65 };
66
67 class ScopeHandler : public ::std::enable_shared_from_this<::ContentLog::ScopeHandler> {
68 public:
69 // member variables
70 // NOLINTBEGIN
71 ::ll::TypedStorage<
72 8,
73 168,
76 ::std::allocator<::ContentLog::ThreadSpecificData>>>
77 mThreadSpecificData;
78 // NOLINTEND
79
80 public:
81 // member functions
82 // NOLINTBEGIN
83 MCNAPI ::std::string getScope();
84 // NOLINTEND
85 };
86
87 class ContentLogScope {
88 public:
89 // member variables
90 // NOLINTBEGIN
91 ::ll::TypedStorage<1, 1, bool> mPopScope;
92 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::ContentLog::ScopeHandler>> mScopeHandler;
93 // NOLINTEND
94
95 public:
96 // prevent constructor by default
97 ContentLogScope();
98
99 public:
100 // member functions
101 // NOLINTBEGIN
102 MCNAPI explicit ContentLogScope(::std::string_view scope);
103
104 MCNAPI ContentLogScope(::std::optional<::std::string_view> ref, ::Bedrock::StaticOptimizedString const& str);
105
107 // NOLINTEND
108
109 public:
110 // constructor thunks
111 // NOLINTBEGIN
112 MCNAPI void* $ctor(::std::string_view scope);
113
114 MCNAPI void* $ctor(::std::optional<::std::string_view> ref, ::Bedrock::StaticOptimizedString const& str);
115 // NOLINTEND
116
117 public:
118 // destructor thunk
119 // NOLINTBEGIN
120 MCNAPI void $dtor();
121 // NOLINTEND
122 };
123
125
126public:
127 // member variables
128 // NOLINTBEGIN
129 ::ll::TypedStorage<1, 1, bool> mEnabled;
130 ::ll::TypedStorage<8, 16, ::std::map<::Bedrock::typeid_t<::ContentLog>, ::ContentLog::ContentLogEndPointData>>
131 mEndPoints;
132 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mEndpointMutex;
133 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ContentLog::ScopeHandler>> mScopeHandler;
134 ::ll::TypedStorage<
135 8,
136 64,
137 ::std::unordered_map<::LogLevel, ::std::unordered_map<::LogArea, ::std::unordered_set<uint64>>>>
138 mOnceOnlyMessages;
139 // NOLINTEND
140
141public:
142 // virtual functions
143 // NOLINTBEGIN
144 virtual ~ContentLog() /*override*/ = default;
145 // NOLINTEND
146
147public:
148 // member functions
149 // NOLINTBEGIN
150 MCAPI ContentLog();
151
152 MCAPI void _writeToLog(bool logOnlyOnce, ::LogArea area, ::LogLevel level, char*& args);
153
154#ifdef LL_PLAT_C
155 MCAPI void flush();
156#endif
157
158 MCAPI void log(bool logOnlyOnce, ::LogLevel level, ::LogArea area, ...);
159
160 MCAPI void registerEndPoint(::Bedrock::typeid_t<::ContentLog> id, ::gsl::not_null<::ContentLogEndPoint*> endPoint);
161
162 MCAPI void unregisterEndPoint(::gsl::not_null<::ContentLogEndPoint*> endPoint);
163
164 MCAPI void updateEnabledStatus();
165 // NOLINTEND
166
167public:
168 // constructor thunks
169 // NOLINTBEGIN
170 MCAPI void* $ctor();
171 // NOLINTEND
172
173public:
174 // vftables
175 // NOLINTBEGIN
176 MCNAPI static void** $vftable();
177 // NOLINTEND
178};
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:87
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:67
MCAPI::std::string getScope()
Definition ContentLog.h:41
static MCAPI void ** $vftable()
Definition ContextMessageLogger.h:10
Definition DisableServiceLocatorOverride.h:5