LeviLamina
Loading...
Searching...
No Matches
JsonPackUtils.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/json/ValueType.h"
7#include "mc/resources/PackParseErrorType.h"
8
9// auto generated forward declare list
10// clang-format off
11class PackReport;
12namespace Json { class Value; }
13// clang-format on
14
15namespace JsonPackUtils {
16// functions
17// NOLINTBEGIN
18MCNAPI bool readBoolAndReport(
19 ::Json::Value const& parent,
20 ::std::string const& element,
21 ::std::vector<::std::string>& errorPath,
22 ::PackReport& report,
23 bool optional,
24 bool defaultVal
25);
26
27MCNAPI ::std::pair<::Json::Value const, ::PackParseErrorType>
28readRequiredValue(::Json::Value const& value, ::std::string const& propertyName, ::Json::ValueType type);
29
30MCNAPI ::std::string readStringAndReport(
31 ::Json::Value const& parent,
32 ::std::string const& element,
33 ::std::vector<::std::string>& errorPath,
34 ::PackReport& report,
35 bool optional
36);
37
38MCNAPI ::std::vector<::std::string> readStringArrayAndReport(
39 ::Json::Value const& parent,
40 ::std::string const& element,
41 ::std::vector<::std::string>& errorPath,
42 ::PackReport& report,
43 bool optional
44);
45
46MCNAPI ::std::pair<::Json::Value const*, ::PackParseErrorType>
47readValue(::Json::Value const& value, ::std::string const& propertyName);
48
49MCNAPI ::std::pair<::Json::Value const, ::PackParseErrorType> readValueAndReportErrors(
50 ::Json::Value const& parent,
51 ::std::string const& element,
52 ::Json::ValueType type,
53 ::std::vector<::std::string>& errorPath,
54 ::PackReport& report,
55 bool optional
56);
57
58MCNAPI ::std::string stringizePath(::std::vector<::std::string> const& pathElements);
59// NOLINTEND
60
61} // namespace JsonPackUtils
Definition Value.h:16
Definition PackReport.h:16