SSAGES
0.9.3
Software Suite for Advanced General Ensemble Simulations
|
Requirements on input files. More...
#include <Requirement.h>
Public Member Functions | |
virtual void | Parse (Value json, const std::string &path)=0 |
Parse JSON value. More... | |
virtual void | Validate (const Value &json, const std::string &path)=0 |
Validate that JSON value meets requirements. More... | |
virtual void | Reset ()=0 |
Reset validator. | |
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. | |
Protected Member Functions | |
void | PushError (const std::string &error) |
Add error to list of error messages. More... | |
void | PushNotice (const std::string ¬ice) |
Add message to list of notices. More... | |
Private Attributes | |
std::vector< std::string > | errors_ |
List of error messages. | |
std::vector< std::string > | notices_ |
List of messages. | |
Requirements on input files.
Definition at line 39 of file Requirement.h.
|
inline |
Get list of error messages.
Definition at line 92 of file Requirement.h.
References errors_.
Referenced by SSAGES::ResourceHandler::Build(), SSAGES::Logger::Build(), SSAGES::ABF::Build(), SSAGES::ANN::Build(), SSAGES::BFS::Build(), SSAGES::CFF::Build(), SSAGES::ForwardFlux::Build(), SSAGES::Meta::Build(), SSAGES::StringMethod::Build(), SSAGES::Umbrella::Build(), SSAGES::AlphaRMSDCV::Build(), SSAGES::AngleCV::Build(), SSAGES::ANNCV::Build(), SSAGES::AntiBetaRMSDCV::Build(), SSAGES::BoxVolumeCV::Build(), SSAGES::GyrationTensorCV::Build(), SSAGES::PairwiseCV::Build(), SSAGES::ParallelBetaRMSDCV::Build(), SSAGES::ParticleCoordinateCV::Build(), SSAGES::ParticlePositionCV::Build(), SSAGES::ParticleSeparationCV::Build(), SSAGES::RMSDCV::Build(), SSAGES::RouseModeCV::Build(), SSAGES::TorsionalCV::Build(), SSAGES::GaussianPK::Build(), SSAGES::RationalSwitchPK::Build(), SSAGES::Chebyshev::Build(), SSAGES::Legendre::Build(), SSAGES::Fourier::Build(), SSAGES::Grid< T >::BuildGrid(), SSAGES::Method::BuildMethod(), Json::ArrayRequirement::Validate(), and Json::ObjectRequirement::Validate().
|
inline |
Get list of notices.
Definition at line 107 of file Requirement.h.
References notices_.
Referenced by Json::ArrayRequirement::Validate(), and Json::ObjectRequirement::Validate().
|
inline |
Check if errors have occured.
True
if the list of errors is not empty. Definition at line 86 of file Requirement.h.
References errors_.
Referenced by SSAGES::ResourceHandler::Build(), SSAGES::Logger::Build(), SSAGES::ABF::Build(), SSAGES::ANN::Build(), SSAGES::BFS::Build(), SSAGES::CFF::Build(), SSAGES::ForwardFlux::Build(), SSAGES::Meta::Build(), SSAGES::StringMethod::Build(), SSAGES::Umbrella::Build(), SSAGES::AlphaRMSDCV::Build(), SSAGES::AngleCV::Build(), SSAGES::ANNCV::Build(), SSAGES::AntiBetaRMSDCV::Build(), SSAGES::BoxVolumeCV::Build(), SSAGES::GyrationTensorCV::Build(), SSAGES::PairwiseCV::Build(), SSAGES::ParallelBetaRMSDCV::Build(), SSAGES::ParticleCoordinateCV::Build(), SSAGES::ParticlePositionCV::Build(), SSAGES::ParticleSeparationCV::Build(), SSAGES::RMSDCV::Build(), SSAGES::RouseModeCV::Build(), SSAGES::TorsionalCV::Build(), SSAGES::GaussianPK::Build(), SSAGES::RationalSwitchPK::Build(), SSAGES::Chebyshev::Build(), SSAGES::Legendre::Build(), SSAGES::Fourier::Build(), SSAGES::Grid< T >::BuildGrid(), SSAGES::Method::BuildMethod(), and Json::ObjectRequirement::Validate().
|
inlinevirtual |
Check if notices have been queued.
True
if list of notices is not empty. Definition at line 101 of file Requirement.h.
References notices_.
Referenced by Json::ObjectRequirement::Validate().
|
pure virtual |
Parse JSON value.
Implemented in Json::NullRequirement, Json::BooleanRequirement, Json::StringRequirement, Json::OneOfRequirement, Json::ObjectRequirement, Json::NumberRequirement, Json::NotRequirement, Json::IntegerRequirement, Json::ArrayRequirement, Json::AnyOfRequirement, Json::AllOfRequirement, Json::DependencyRequirement, and Json::EnumRequirement.
|
inlineprotected |
Add error to list of error messages.
error | Error message. |
This function adds an error message to the list of error messages. The list of error messages can be retrieved by Requirement::GetErrors()
Definition at line 53 of file Requirement.h.
References errors_.
Referenced by Json::BooleanRequirement::Validate(), Json::EnumRequirement::Validate(), Json::NullRequirement::Validate(), Json::AllOfRequirement::Validate(), Json::AnyOfRequirement::Validate(), Json::ArrayRequirement::Validate(), Json::DependencyRequirement::Validate(), Json::IntegerRequirement::Validate(), Json::NotRequirement::Validate(), Json::NumberRequirement::Validate(), Json::ObjectRequirement::Validate(), Json::OneOfRequirement::Validate(), and Json::StringRequirement::Validate().
|
inlineprotected |
Add message to list of notices.
notice | Message string. |
This function adds a new message to the list of messages. The list can be retrieved using Requirement::GetNotices().
Definition at line 62 of file Requirement.h.
References notices_.
Referenced by Json::AllOfRequirement::Validate(), Json::AnyOfRequirement::Validate(), Json::ArrayRequirement::Validate(), Json::ObjectRequirement::Validate(), and Json::OneOfRequirement::Validate().
|
pure virtual |
Validate that JSON value meets requirements.
Implemented in Json::StringRequirement, Json::OneOfRequirement, Json::ObjectRequirement, Json::NumberRequirement, Json::NotRequirement, Json::IntegerRequirement, Json::DependencyRequirement, Json::ArrayRequirement, Json::AnyOfRequirement, Json::AllOfRequirement, Json::NullRequirement, Json::EnumRequirement, and Json::BooleanRequirement.
Referenced by Json::ObjectRequirement::Validate().