Audacity  2.2.0
Validator Class Referenceabstract

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>

Inheritance diagram for Validator:
BoolArrayValidator BoolValidator DefaultValidator DoubleValidator IntValidator OptionValidator RangeValidator

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
 

Detailed Description

A Validator is an object which checks whether a wxVariant satisfies a certain criterion. This is a base validator which allows anything.

Member Typedef Documentation

using Validator::Holder = std::unique_ptr<Validator>

This MUST be overridden, to avoid slicing!

Constructor & Destructor Documentation

Validator::Validator ( )
inline
virtual Validator::~Validator ( )
inlinevirtual

Member Function Documentation

virtual Holder Validator::GetClone ( ) const
pure virtual
const wxVariant& Validator::GetConverted ( )
inline
virtual wxString Validator::GetDescription ( ) const
inlinevirtual

Return a description (for error messages) should be of the form 'v must be $description'

Reimplemented in IntValidator, RangeValidator, DoubleValidator, BoolArrayValidator, BoolValidator, and OptionValidator.

Referenced by CommandType::Describe(), and CommandImplementation::SetParameter().

virtual bool Validator::Validate ( const wxVariant &  v)
inlinevirtual

Judge whether the passed value satisfies the Validator.

Reimplemented in IntValidator, RangeValidator, DoubleValidator, BoolArrayValidator, BoolValidator, and OptionValidator.

References SetConverted().

Referenced by CommandImplementation::SetParameter().

Member Data Documentation

wxVariant Validator::mConverted
private

Referenced by GetConverted(), and SetConverted().


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