SSAGES
0.9.3
Software Suite for Advanced General Ensemble Simulations
|
Requirements on Integer values. More...
#include <IntegerRequirement.h>
Public Member Functions | |
IntegerRequirement () | |
Constructor. | |
virtual void | Reset () override |
Reset requirement. | |
virtual void | Parse (Value json, const std::string &path) override |
Parse JSON value to set up Requirement. More... | |
virtual void | Validate (const Value &json, const std::string &path) override |
Validate JSON value. 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. | |
Private Attributes | |
std::string | path_ |
Path for JSON path specification. | |
int | multipleOf_ |
Multiple of requirement. | |
int | min_ |
Lower bound for range requirement. | |
int | max_ |
Upper bound for range requirement. | |
bool | multSet_ |
If True multiple of is a requirement. | |
bool | minSet_ |
If True lower bound is an active requirement. | |
bool | maxSet_ |
If True upper bound is an active requirement. | |
bool | exclMin_ |
If True lower bound is exclusive. | |
bool | exclMax_ |
If True upper bound is exclusive. | |
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 ¬ice) |
Add message to list of notices. More... | |
Requirements on Integer values.
This class implements several types of integer requirements.
Definition at line 38 of file IntegerRequirement.h.
|
inlineoverridevirtual |
Parse JSON value to set up Requirement.
Implements Json::Requirement.
Definition at line 75 of file IntegerRequirement.h.
References exclMax_, exclMin_, max_, maxSet_, min_, minSet_, multipleOf_, multSet_, path_, and Reset().
|
inlineoverridevirtual |
Validate JSON value.
Validates that the given JSON value is of type Integer and meets the requirements generated by IntegerRequirement::Parse(). If the requirements are not met, an error is generated.
Implements Json::Requirement.
Definition at line 118 of file IntegerRequirement.h.
References exclMax_, exclMin_, max_, maxSet_, min_, minSet_, multipleOf_, multSet_, and Json::Requirement::PushError().