![]() |
Audacity 3.2.0
|
A Validator is an object which checks whether a wxVariant satisfies a certain criterion. This is a base validator which allows anything. More...
#include <Validators.h>
Public Types | |
| using | Holder = std::unique_ptr< Validator > |
| This MUST be overridden, to avoid slicing! More... | |
Public Member Functions | |
| Validator () | |
| virtual | ~Validator () |
| void | SetConverted (const wxVariant &v) |
| const wxVariant & | GetConverted () |
| virtual bool | Validate (const wxVariant &v) |
| Judge whether the passed value satisfies the Validator. More... | |
| virtual wxString | GetDescription () const |
| virtual Holder | GetClone () const =0 |
Private Attributes | |
| wxVariant | mConverted |
A Validator is an object which checks whether a wxVariant satisfies a certain criterion. This is a base validator which allows anything.
Definition at line 53 of file Validators.h.
| using Validator::Holder = std::unique_ptr<Validator> |
This MUST be overridden, to avoid slicing!
Definition at line 85 of file Validators.h.
|
inline |
Definition at line 59 of file Validators.h.
|
inlinevirtual |
Definition at line 60 of file Validators.h.
|
pure virtual |
Implemented in DefaultValidator, OptionValidator, BoolValidator, BoolArrayValidator, DoubleValidator, RangeValidator, and IntValidator.
|
inline |
Definition at line 65 of file Validators.h.
References mConverted.
Referenced by CommandImplementation::SetParameter(), BoolValidator::Validate(), DoubleValidator::Validate(), and IntValidator::Validate().
|
inlinevirtual |
Return a description (for error messages) should be of the form 'v must be $description'
Reimplemented in OptionValidator, BoolValidator, BoolArrayValidator, DoubleValidator, RangeValidator, and IntValidator.
Definition at line 79 of file Validators.h.
References wxT().
Referenced by CommandImplementation::SetParameter().
|
inline |
Definition at line 61 of file Validators.h.
References mConverted.
Referenced by Validate(), OptionValidator::Validate(), BoolValidator::Validate(), BoolArrayValidator::Validate(), DoubleValidator::Validate(), RangeValidator::Validate(), and IntValidator::Validate().
|
inlinevirtual |
Judge whether the passed value satisfies the Validator.
Reimplemented in OptionValidator, BoolValidator, BoolArrayValidator, DoubleValidator, RangeValidator, and IntValidator.
Definition at line 71 of file Validators.h.
References SetConverted().
Referenced by CommandImplementation::SetParameter().
|
private |
Definition at line 56 of file Validators.h.
Referenced by GetConverted(), and SetConverted().