SSAGES
0.9.3
Software Suite for Advanced General Ensemble Simulations
|
Array of Requirements. More...
#include <ArrayRequirement.h>
Public Member Functions | |
ArrayRequirement () | |
Constructor. | |
virtual void | ClearErrors () override |
Clear list of error messages for all Requirements. | |
virtual void | ClearNotices () override |
Clear notices for all Requirements. | |
virtual void | Reset () override |
Reset array. | |
virtual void | Parse (Value json, const std::string &path) override |
Parse JSON value and fill array. 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 bool | HasNotices () |
Check if notices have been queued. More... | |
std::vector< std::string > | GetNotices () |
Get list of notices. More... | |
virtual | ~Requirement () |
Destructor. | |
Private Member Functions | |
template<class T > | |
bool | IsUnique (T X) |
Test if set is unique. More... | |
Private Attributes | |
RequireList | items_ |
List of Requirements. | |
std::unique_ptr< Requirement > | item_ |
Single Requirement. | |
bool | addItems_ |
True if items can be added. | |
bool | setMin_ |
True if minimum has been set. | |
bool | setMax_ |
True if maximum has been set. | |
bool | unique_ |
True if all Requirements are unique. | |
int | min_ |
Minimum value. | |
int | max_ |
Maximum value. | |
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... | |
Array of Requirements.
Definition at line 43 of file ArrayRequirement.h.
|
inlineprivate |
Test if set is unique.
T | Container class. |
X | Container containing Requirements. |
Definition at line 64 of file ArrayRequirement.h.
Referenced by Validate().
|
inlineoverridevirtual |
Parse JSON value and fill array.
This function parses the JSON input value and creates new Requirements for all values in the "items" branch.
Implements Json::Requirement.
Definition at line 125 of file ArrayRequirement.h.
References addItems_, item_, items_, Json::RequirementLoader::LoadRequirement(), max_, min_, Reset(), setMax_, setMin_, and unique_.
|
inlineoverridevirtual |
Validate json value.
Implements Json::Requirement.
Definition at line 171 of file ArrayRequirement.h.
References addItems_, Json::Requirement::GetErrors(), Json::Requirement::GetNotices(), IsUnique(), item_, items_, max_, min_, Json::Requirement::PushError(), Json::Requirement::PushNotice(), setMax_, setMin_, and unique_.