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

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
ola::web::IntegerValidator Class Reference
JSON

## Detailed Description

The validator for Json integers.

Inheritance diagram for ola::web::IntegerValidator:

## Public Member Functions
void | AddConstraint (NumberConstraint *constraint)
| Add a constraint to this validator.
void | Visit (const JsonUInt &)
void | Visit (const JsonInt &)
void | Visit (const JsonUInt64 &)
void | Visit (const JsonInt64 &)
virtual void | Visit (const JsonDouble &)
Public Member Functions inherited from ola::web::BaseValidator
virtual bool | IsValid () const
| Check if the value was valid according to this validator.
virtual void | Visit (const JsonString &)
virtual void | Visit (const JsonBool &)
virtual void | Visit (const JsonNull &)
virtual void | Visit (const JsonRawValue &)
virtual void | Visit (const JsonObject &)
virtual void | Visit (const JsonArray &)
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
| IntegerValidator (JsonType type)
void | CheckValue (const JsonNumber &value)
Protected Member Functions inherited from ola::web::BaseValidator
| BaseValidator (JsonType type)
bool | CheckEnums (const JsonValue &value)

## Additional Inherited Members
Public Types inherited from ola::web::ValidatorInterface
typedef std::vector< ValidatorInterface * > | ValidatorList
| a list of 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

## Member Function Documentation

## ◆ AddConstraint()

void ola::web::IntegerValidator::AddConstraint | ( | NumberConstraint * | constraint | ) |

Add a constraint to this validator.

Parameters

  constraint | the constraint to add, ownership is transferred.

## ◆ Visit() [1/5]

void ola::web::IntegerValidator::Visit | ( | const JsonDouble & | value | ) |
| virtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [2/5]

void ola::web::IntegerValidator::Visit | ( | const JsonInt & | value | ) |
| virtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [3/5]

void ola::web::IntegerValidator::Visit | ( | const JsonInt64 & | value | ) |
| virtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [4/5]

void ola::web::IntegerValidator::Visit | ( | const JsonUInt & | value | ) |
| virtual

Reimplemented from ola::web::BaseValidator.

## ◆ Visit() [5/5]

void ola::web::IntegerValidator::Visit | ( | const JsonUInt64 & | value | ) |
| virtual

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