LeviLamina
Loading...
Searching...
No Matches
Reader.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/json/Features.h"
7
8// auto generated forward declare list
9// clang-format off
10namespace Json { class Value; }
11// clang-format on
12
13namespace Json {
14
15class Reader {
16public:
17 // Reader inner types declare
18 // clang-format off
19 class ErrorInfo;
20 class Token;
21 // clang-format on
22
23 // Reader inner types define
24 using Char = char;
25
26 using Location = char const*;
27
28 enum class TokenType : int {
29 TokenEndOfStream = 0,
30 TokenObjectBegin = 1,
31 TokenObjectEnd = 2,
32 TokenArrayBegin = 3,
33 TokenArrayEnd = 4,
34 TokenString = 5,
35 TokenNumber = 6,
36 TokenTrue = 7,
37 TokenFalse = 8,
38 TokenNull = 9,
39 TokenArraySeparator = 10,
40 TokenMemberSeparator = 11,
41 TokenComment = 12,
42 TokenError = 13,
43 };
44
45 class Token {
46 public:
47 // member variables
48 // NOLINTBEGIN
49 ::ll::TypedStorage<4, 4, ::Json::Reader::TokenType> type_;
50 ::ll::TypedStorage<8, 8, char const*> start_;
51 ::ll::TypedStorage<8, 8, char const*> end_;
52 ::ll::TypedStorage<1, 1, bool> stringHasEscape_;
53 // NOLINTEND
54 };
55
56 class ErrorInfo {
57 public:
58 // member variables
59 // NOLINTBEGIN
60 ::ll::TypedStorage<8, 32, ::Json::Reader::Token> token_;
61 ::ll::TypedStorage<8, 32, ::std::string> message_;
62 ::ll::TypedStorage<8, 8, char const*> extra_;
63 // NOLINTEND
64
65 public:
66 // member functions
67 // NOLINTBEGIN
68 MCNAPI ~ErrorInfo();
69 // NOLINTEND
70
71 public:
72 // destructor thunk
73 // NOLINTBEGIN
74 MCNAPI void $dtor();
75 // NOLINTEND
76 };
77
78 using Errors = ::std::deque<::Json::Reader::ErrorInfo>;
79
80 using Nodes = ::std::stack<::Json::Value*, ::std::deque<::Json::Value*>>;
81
82public:
83 // member variables
84 // NOLINTBEGIN
85 ::ll::TypedStorage<8, 40, ::std::stack<::Json::Value*, ::std::deque<::Json::Value*>>> nodes_;
86 ::ll::TypedStorage<8, 40, ::std::deque<::Json::Reader::ErrorInfo>> errors_;
87 ::ll::TypedStorage<8, 32, ::std::string> document_;
88 ::ll::TypedStorage<8, 8, char const*> begin_;
89 ::ll::TypedStorage<8, 8, char const*> end_;
90 ::ll::TypedStorage<8, 8, char const*> current_;
91 ::ll::TypedStorage<8, 8, char const*> lastValueEnd_;
92 ::ll::TypedStorage<8, 8, ::Json::Value*> lastValue_;
93 ::ll::TypedStorage<8, 32, ::std::string> commentsBefore_;
94 ::ll::TypedStorage<1, 2, ::Json::Features> features_;
95 ::ll::TypedStorage<1, 1, bool> collectComments_;
96 // NOLINTEND
97
98public:
99 // member functions
100 // NOLINTBEGIN
101 MCAPI Reader();
102
103 MCAPI explicit Reader(::Json::Features const& features);
104
105 MCAPI bool addError(::std::string const& message, ::Json::Reader::Token& token, char const* extra);
106
107 MCAPI ::Json::Value decodeDouble(::Json::Reader::Token& token, bool& successful);
108
109 MCAPI ::Json::Value decodeNumber(::Json::Reader::Token& token, bool& successful);
110
111 MCAPI bool decodeString(::Json::Reader::Token& token, char* decoded);
112
113 MCAPI bool
114 decodeUnicodeCodePoint(::Json::Reader::Token& token, char const*& current, char const* end, uint& unicode);
115
116 MCAPI bool
117 decodeUnicodeEscapeSequence(::Json::Reader::Token& token, char const*& current, char const* end, uint& unicode);
118
119 MCAPI ::std::string getFormattedErrorMessages() const;
120
121 MCAPI ::std::string getLocationLineAndColumn(char const* location) const;
122
123 MCAPI bool parse(::std::string const& document, ::Json::Value& root, bool collectComments);
124
125 MCAPI bool parse(::std::istream& sin, ::Json::Value& root, bool collectComments);
126
127 MCAPI bool parse(char const* beginDoc, char const* endDoc, ::Json::Value& root, bool);
128
129 MCAPI ::Json::Value readArray(::Json::Reader::Token&, bool& ok);
130
131 MCAPI ::Json::Value readObject(::Json::Reader::Token&, bool& successful);
132
133 MCAPI bool readToken(::Json::Reader::Token& token);
134
135 MCAPI ::Json::Value readValue(bool& successful);
136
137 MCAPI bool recoverFromError(::Json::Reader::TokenType skipUntilToken);
138
139 MCAPI ~Reader();
140 // NOLINTEND
141
142public:
143 // constructor thunks
144 // NOLINTBEGIN
145 MCAPI void* $ctor();
146
147 MCAPI void* $ctor(::Json::Features const& features);
148 // NOLINTEND
149
150public:
151 // destructor thunk
152 // NOLINTBEGIN
153 MCAPI void $dtor();
154 // NOLINTEND
155};
156
157} // namespace Json
Definition Features.h:7
Definition Reader.h:56
Definition Reader.h:45
Definition Reader.h:15
Definition Value.h:16