SSAGES  0.9.3
Software Suite for Advanced General Ensemble Simulations
BooleanRequirement.h
1 
26 #pragma once
27 
28 #include "Requirement.h"
29 
30 namespace Json
31 {
33 
37  {
38  public:
40  virtual void Reset() {}
41 
43  virtual void Parse(Value, const std::string&) {}
44 
46 
50  virtual void Validate(const Value& json, const std::string& path)
51  {
52  if(!json.isBool())
53  PushError(path + ": Must be a boolean");
54  }
55  };
56 }
Requires json value to be of type Bool.
virtual void Reset()
Reset Requirement.
virtual void Validate(const Value &json, const std::string &path)
Validate that JSON value is Bool.
virtual void Parse(Value, const std::string &)
Parse JSON string.
Requirements on input files.
Definition: Requirement.h:40
void PushError(const std::string &error)
Add error to list of error messages.
Definition: Requirement.h:53