Open Lighting Architecture
0.9.1
|
The interface Json Schema Validators.
Public Types | |
typedef std::vector < ValidatorInterface * > | ValidatorList |
a list of Validators. |
Public Member Functions | |
virtual bool | IsValid () const =0 |
Check if the value was valid according to this validator. | |
virtual JsonObject * | GetSchema () const =0 |
Returns the Schema as a JsonObject. | |
virtual void | SetSchema (const std::string &schema)=0 |
Set the $schema property for this validator. | |
virtual void | SetId (const std::string &id)=0 |
Set the id property for this validator. | |
virtual void | SetTitle (const std::string &title)=0 |
Set the title property for this validator. | |
virtual void | SetDescription (const std::string &title)=0 |
Set the description property for this validator. | |
virtual void | SetDefaultValue (const JsonValue *value)=0 |
Set the default value for this validator. | |
virtual const JsonValue * | GetDefaultValue () const =0 |
Return the default value for this validator. | |
Public Member Functions inherited from ola::web::JsonValueConstVisitorInterface | |
virtual void | Visit (const JsonString &value)=0 |
virtual void | Visit (const JsonBool &value)=0 |
virtual void | Visit (const JsonNull &value)=0 |
virtual void | Visit (const JsonRawValue &value)=0 |
virtual void | Visit (const JsonObject &value)=0 |
virtual void | Visit (const JsonArray &value)=0 |
virtual void | Visit (const JsonUInt &value)=0 |
virtual void | Visit (const JsonUInt64 &value)=0 |
virtual void | Visit (const JsonInt &value)=0 |
virtual void | Visit (const JsonInt64 &value)=0 |
virtual void | Visit (const JsonDouble &value)=0 |
|
pure 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.
Implemented in ola::web::ReferenceValidator, and ola::web::BaseValidator.
|
pure virtual |
Returns the Schema as a JsonObject.
Implemented in ola::web::ReferenceValidator, and ola::web::BaseValidator.
|
pure virtual |
Set the default value for this validator.
value | The JsonValue to use as the default. Ownership is transferred. |
Implemented in ola::web::ReferenceValidator, and ola::web::BaseValidator.