SSAGES  0.9.3
Software Suite for Advanced General Ensemble Simulations
Public Member Functions | List of all members
Json::BooleanRequirement Class Reference

Requires json value to be of type Bool. More...

#include <BooleanRequirement.h>

Inheritance diagram for Json::BooleanRequirement:
Inheritance graph
[legend]

Public Member Functions

virtual void Reset ()
 Reset Requirement.
 
virtual void Parse (Value, const std::string &)
 Parse JSON string.
 
virtual void Validate (const Value &json, const std::string &path)
 Validate that JSON value is Bool. More...
 
- Public Member Functions inherited from Json::Requirement
bool HasErrors ()
 Check if errors have occured. More...
 
std::vector< std::string > GetErrors ()
 Get list of error messages. More...
 
virtual void ClearErrors ()
 Clear list of error messages.
 
virtual bool HasNotices ()
 Check if notices have been queued. More...
 
std::vector< std::string > GetNotices ()
 Get list of notices. More...
 
virtual void ClearNotices ()
 Clear list of notice messages.
 
virtual ~Requirement ()
 Destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from Json::Requirement
void PushError (const std::string &error)
 Add error to list of error messages. More...
 
void PushNotice (const std::string &notice)
 Add message to list of notices. More...
 

Detailed Description

Requires json value to be of type Bool.

Definition at line 36 of file BooleanRequirement.h.

Member Function Documentation

◆ Validate()

virtual void Json::BooleanRequirement::Validate ( const Value &  json,
const std::string &  path 
)
inlinevirtual

Validate that JSON value is Bool.

Parameters
jsonJSON value to validate.
pathPath for JSON path specification.

Implements Json::Requirement.

Definition at line 50 of file BooleanRequirement.h.

51  {
52  if(!json.isBool())
53  PushError(path + ": Must be a boolean");
54  }
void PushError(const std::string &error)
Add error to list of error messages.
Definition: Requirement.h:53

References Json::Requirement::PushError().

Here is the call graph for this function:

The documentation for this class was generated from the following file: