LeviLamina
Loading...
Searching...
No Matches
BasicSerializerContext.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/cereal/ContextArea.h"
7#include "mc/deps/cereal/ResultCode.h"
8#include "mc/deps/core/container/small_vector.h"
9#include "mc/deps/core/string/StaticOptimizedString.h"
10
11namespace cereal {
12
13class BasicSerializerContext {
14public:
15 // BasicSerializerContext inner types declare
16 // clang-format off
17 struct TokenHolder;
18 struct Context;
19 struct LogEntry;
20 // clang-format on
21
22 // BasicSerializerContext inner types define
23 enum class ContextType : int {
24 ArrayElem = 0,
25 Member = 1,
26 Root = 2,
27 };
28
29 struct TokenHolder {
30 public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<8, 16, ::std::variant<uint, ::Bedrock::StaticOptimizedString>> mToken;
34 // NOLINTEND
35
36 public:
37 // member functions
38 // NOLINTBEGIN
39 MCAPI explicit operator ::std::string_view() const;
40 // NOLINTEND
41 };
42
43 struct Context {
44 public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::TypedStorage<4, 4, ::cereal::BasicSerializerContext::ContextType> mType;
48 ::ll::TypedStorage<8, 16, ::cereal::BasicSerializerContext::TokenHolder> mToken;
49 ::ll::TypedStorage<4, 4, uint> mPrevIndex;
50 // NOLINTEND
51 };
52
53 struct LogEntry {
54 public:
55 // member variables
56 // NOLINTBEGIN
57 ::ll::TypedStorage<2, 2, ::cereal::ResultCode> mResultCode;
58 ::ll::TypedStorage<8, 16, ::cereal::BasicSerializerContext::TokenHolder> mMessage;
59 ::ll::TypedStorage<4, 4, uint> mContextIndex;
60 ::ll::TypedStorage<8, 8, ::Bedrock::small_vector<::cereal::BasicSerializerContext::Context, 1> const*> mStack;
61 ::ll::TypedStorage<4, 4, uint> mGeneration;
62 // NOLINTEND
63 };
64
65public:
66 // member variables
67 // NOLINTBEGIN
68 ::ll::TypedStorage<4, 4, uint> mCurrentIndex;
69 ::ll::TypedStorage<8, 48, ::Bedrock::small_vector<::cereal::BasicSerializerContext::Context, 1>> mStack;
70 ::ll::TypedStorage<8, 64, ::Bedrock::small_vector<::cereal::BasicSerializerContext::LogEntry, 1>> mLog;
71 ::ll::TypedStorage<2, 2, ::cereal::ResultCode> mErrorCodes;
72 ::ll::TypedStorage<1, 1, ::cereal::ContextArea> mContextArea;
73 // NOLINTEND
74
75public:
76 // prevent constructor by default
77 BasicSerializerContext();
78
79public:
80 // member functions
81 // NOLINTBEGIN
82 MCAPI explicit BasicSerializerContext(::cereal::ResultCode errorCodes);
83
84 MCAPI ::std::string _getContextString(uint index) const;
85
86 MCFOLD ::cereal::ContextArea contextArea() const;
87
88 MCAPI void contextArea(::cereal::ContextArea area);
89
90 MCAPI ::std::vector<::cereal::BasicSerializerContext::Context>
91 contextFor(::cereal::BasicSerializerContext::LogEntry const& entry) const;
92
93 MCAPI ::std::pair<::cereal::BasicSerializerContext::ContextType, ::std::string_view> currentContext() const;
94
95 MCAPI ::std::string currentContextString() const;
96
97 MCAPI ::cereal::ResultCode errorCodes() const;
98
99 MCAPI ::std::vector<::std::string> errors() const;
100
101 MCAPI ::gsl::span<::cereal::BasicSerializerContext::LogEntry const> logEntries() const;
102
103 MCAPI void treatAsError(::cereal::ResultCode res, bool isError);
104
105 MCAPI ~BasicSerializerContext();
106 // NOLINTEND
107
108public:
109 // constructor thunks
110 // NOLINTBEGIN
111 MCAPI void* $ctor(::cereal::ResultCode errorCodes);
112 // NOLINTEND
113
114public:
115 // destructor thunk
116 // NOLINTBEGIN
117 MCFOLD void $dtor();
118 // NOLINTEND
119};
120
121} // namespace cereal
Definition BasicSerializerContext.h:43
Definition BasicSerializerContext.h:53
Definition BasicSerializerContext.h:29