Open Lighting Architecture: ola::web::ConjunctionValidator Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ola::web::ConjunctionValidator Class Referenceabstract
JSON

## Detailed Description

The base class for validators that operate with a list of child validators (allOf, anyOf, oneOf).

Inheritance diagram for ola::web::ConjunctionValidator:

## Public Member Functions
| ConjunctionValidator (const std::string &keyword, ValidatorList *validators)
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)
Public Member Functions inherited from ola::web::BaseValidator
virtual bool | IsValid () const
| Check if the value was valid according to this validator.
virtual JsonObject * | GetSchema () const
| Returns the Schema as a JsonObject.
void | SetSchema (const std::string &schema)
| Set the schema.
void | SetId (const std::string &id)
| Set the id.
void | SetTitle (const std::string &title)
| Set the title.
void | SetDescription (const std::string &title)
| Set the description.
void | SetDefaultValue (const JsonValue *value)
| Set the default value for this validator.
const JsonValue * | GetDefaultValue () const
| Return the default value.
void | AddEnumValue (const JsonValue *value)
| Add a enum value to the list of allowed values.

## Protected Member Functions
void | ExtendSchema (JsonObject *schema) const
virtual void | Validate (const JsonValue &value)=0
Protected Member Functions inherited from ola::web::BaseValidator
| BaseValidator (JsonType type)
bool | CheckEnums (const JsonValue &value)

## Protected Attributes
std::string | m_keyword
ValidatorList | m_validators
Protected Attributes inherited from ola::web::BaseValidator
bool | m_is_valid
JsonType | m_type
std::string | m_schema
std::string | m_id
std::string | m_title
std::string | m_description
std::auto_ptr< const JsonValue > | m_default_value
std::vector< const JsonValue * > | m_enums

## Additional Inherited Members
Public Types inherited from ola::web::ValidatorInterface
typedef std::vector< ValidatorInterface * > | ValidatorList
| a list of Validators.

## Constructor & Destructor Documentation

## ◆ ConjunctionValidator()

ola::web::ConjunctionValidator::ConjunctionValidator | ( | const std::string & | keyword,
|  | ValidatorList * | validators )

Parameters

  keyword | the name of the conjunction.
  validators | the list of schemas to validate against. Ownership of the validators in the list is transferred.

## Member Function Documentation

## ◆ ExtendSchema()

void ola::web::ConjunctionValidator::ExtendSchema | ( | JsonObject * | schema | ) | const
| protectedvirtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [1/11]

void ola::web::ConjunctionValidator::Visit | ( | const JsonArray & | value | ) |
| inlinevirtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [2/11]

void ola::web::ConjunctionValidator::Visit | ( | const JsonBool & | value | ) |
| inlinevirtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [3/11]

void ola::web::ConjunctionValidator::Visit | ( | const JsonDouble & | value | ) |
| inlinevirtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [4/11]

void ola::web::ConjunctionValidator::Visit | ( | const JsonInt & | value | ) |
| inlinevirtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [5/11]

void ola::web::ConjunctionValidator::Visit | ( | const JsonInt64 & | value | ) |
| inlinevirtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [6/11]

void ola::web::ConjunctionValidator::Visit | ( | const JsonNull & | value | ) |
| inlinevirtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [7/11]

void ola::web::ConjunctionValidator::Visit | ( | const JsonObject & | value | ) |
| inlinevirtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [8/11]

void ola::web::ConjunctionValidator::Visit | ( | const JsonRawValue & | value | ) |
| inlinevirtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [9/11]

void ola::web::ConjunctionValidator::Visit | ( | const JsonString & | value | ) |
| inlinevirtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [10/11]

void ola::web::ConjunctionValidator::Visit | ( | const JsonUInt & | value | ) |
| inlinevirtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [11/11]

void ola::web::ConjunctionValidator::Visit | ( | const JsonUInt64 & | value | ) |
| inlinevirtual

Reimplemented from ola::web::BaseValidator.

The documentation for this class was generated from the following files:

- include/ola/web/JsonSchema.h
- common/web/JsonSchema.cpp