Open Lighting Architecture
Latest Git
|
A reference validator holds a pointer to another schema.
Public Member Functions | |
ReferenceValidator (const SchemaDefinitions *definitions, const std::string &schema) | |
bool | IsValid () const |
Check if the value was valid according to this validator. | |
void | Visit (const JsonString &value) |
void | Visit (const JsonBool &value) |
void | Visit (const JsonNull &value) |
void | Visit (const JsonRawValue &value) |
void | Visit (const JsonObject &value) |
void | Visit (const JsonArray &value) |
void | Visit (const JsonUInt &value) |
void | Visit (const JsonUInt64 &value) |
void | Visit (const JsonInt &value) |
void | Visit (const JsonInt64 &value) |
void | Visit (const JsonDouble &value) |
JsonObject * | GetSchema () const |
Returns the Schema as a JsonObject. More... | |
void | SetSchema (const std::string &schema) |
Set the $schema property for this validator. | |
void | SetId (const std::string &id) |
Set the id property for this validator. | |
void | SetTitle (const std::string &title) |
Set the title property for this validator. | |
void | SetDescription (const std::string &title) |
Set the description property for this validator. | |
void | SetDefaultValue (const JsonValue *value) |
Set the default value for this validator. More... | |
const JsonValue * | GetDefaultValue () const |
Return the default value for this validator. More... | |
Additional Inherited Members | |
Public Types inherited from ola::web::ValidatorInterface | |
typedef std::vector< ValidatorInterface * > | ValidatorList |
a list of Validators. | |
ola::web::ReferenceValidator::ReferenceValidator | ( | const SchemaDefinitions * | definitions, |
const std::string & | schema | ||
) |
definitions | A SchemaDefinitions object with which to resolve references. |
schema | The $ref link to the other schema. |
|
virtual |
Return the default value for this validator.
The value is only valid until the next call to SetDefaultValue or for the lifetime of the validator.
Implements ola::web::ValidatorInterface.
|
virtual |
Returns the Schema as a JsonObject.
Implements ola::web::ValidatorInterface.
|
virtual |
Set the default value for this validator.
value | The JsonValue to use as the default. Ownership is transferred. |
Implements ola::web::ValidatorInterface.