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