26 #include "RequirementLoader.h"
27 #include "StringRequirement.h"
28 #include "IntegerRequirement.h"
29 #include "NumberRequirement.h"
30 #include "ObjectRequirement.h"
31 #include "ArrayRequirement.h"
32 #include "BooleanRequirement.h"
33 #include "NullRequirement.h"
34 #include "EnumRequirement.h"
35 #include "AllOfRequirement.h"
36 #include "AnyOfRequirement.h"
37 #include "OneOfRequirement.h"
38 #include "NotRequirement.h"
44 std::unique_ptr<Requirement> item =
nullptr;
46 if(json[
"type"].asString() ==
"string")
48 else if(json[
"type"].asString() ==
"integer")
50 else if(json[
"type"].asString() ==
"number")
52 else if(json[
"type"].asString() ==
"object")
54 else if(json[
"type"].asString() ==
"array")
56 else if(json[
"type"].asString() ==
"boolean")
58 else if(json[
"type"].asString() ==
"null")
60 else if(json[
"allOf"].isArray())
62 else if(json[
"anyOf"].isArray())
64 else if(json[
"oneOf"].isArray())
66 else if(json[
"enum"].isArray())
68 else if(json[
"not"].isObject())
71 else if(json.isObject())
79 std::unique_ptr<Requirement> item =
nullptr;
80 if(json.isObject() && json.isMember(
"allOf") && json[
"allOf"].isArray())
82 else if(json.isObject() && json.isMember(
"anyOf") && json[
"anyOf"].isArray())
84 else if(json.isObject() && json.isMember(
"oneOf") && json[
"oneOf"].isArray())
92 std::unique_ptr<Requirement> item =
nullptr;
Requires that all of a list of Requirements hold.
Requires that at least one of a list of Requirements hold.
Requires json value to be of type Bool.
Requires entry to be member of an enum.
Requirements on Integer values.
Requires a given Requirement to fail.
Requires value to be of type Null.
Requirements on a numeric value.
Requirements on an object.
Requires exactly one of a list of Requirements to hold.
std::unique_ptr< Requirement > LoadExtended(const Value &json)
Extended Requirement loader.
std::unique_ptr< Requirement > LoadRequirement(const Value &json)
Load specific requirement.