10#ifndef __AUDACITY_SETTINGS_VISITOR__ 
   11#define __AUDACITY_SETTINGS_VISITOR__ 
   26   Member Structure::*
const mem{}; 
 
   27   const wxChar *
const key{}; 
 
   36template<
typename Structure, 
typename Member,
 
   37   typename Type, 
typename... Args>
 
   39   const wxChar *
key, 
const Type &def, Args...)
 
   42template<
typename Structure, 
typename Member,
 
   43   typename Char, 
size_t N, 
typename... Args>
 
   45   const wxChar *
key, 
const Char (&def)[N], Args...)
 
   48template<
typename Structure, 
typename Member>
 
   65template<
typename Structure, 
typename Member, 
typename... Args>
 
   82   template<
typename T> 
using Ref = std::conditional_t<Const, const T&, T&>;
 
   84   template<
typename T> 
using Arg = std::conditional_t<Const, T, T&>;
 
   98      bool vmin = 
false, 
bool vmax = 
false, 
bool vscl = 
false );
 
  100      int vmin = 0, 
int vmax = 100000, 
int vscl = 1 );
 
  102      int vmin = 0, 
int vmax = 100000, 
int vscl = 1 );
 
  104      float vmin, 
float vmax, 
float vscl = 1.0f );
 
  106      float vmin, 
float vmax, 
float vscl = 1.0f );
 
  108      double vmin, 
double vmax, 
double vscl = 1.0f );
 
  111      wxString vmin = {}, wxString vmax = {},
 
  112      wxString vscl = {} );
 
  113   virtual void DefineEnum( Arg<int> var, 
const wxChar * 
key, 
int vdefault,
 
EnumParameter(Member Structure::*const mem, Args...) -> EnumParameter< Structure, Member >
EffectParameter(Member Structure::*const mem, const wxChar *key, const Type &def, Args...) -> EffectParameter< Structure, Member, Type >
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the SettingsVis...
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
virtual void Define(Arg< bool > var, const wxChar *key, bool vdefault, bool vmin=false, bool vmax=false, bool vscl=false)
virtual SettingsVisitorBase & OptionalY(Ref< bool > var)
std::conditional_t< Const, T, T & > Arg
CommandParameters * mpEap
std::conditional_t< Const, const bool, bool > * pOptionalFlag
virtual ~SettingsVisitorBase()
virtual SettingsVisitorBase & Optional(Ref< bool > var)
virtual void DefineEnum(Arg< int > var, const wxChar *key, int vdefault, const EnumValueSymbol strings[], size_t nStrings)
std::conditional_t< Const, const T &, T & > Ref
virtual SettingsVisitorBase & OptionalN(Ref< bool > var)
Used in type conversions, this wrapper for ints, strings, doubles and enums provides conversions betw...
const wxChar *const key
Identifier in configuration file.
const Type scale
Scaling factor, for slider control.
Member Structure::*const mem
Member holding the parameter.
const Type def
Default value.
const Type min
Minimum value.
const Type max
Maximum value.
constexpr EnumParameter(Member Structure::*const mem, const wxChar *key, int def, int min, int max, int scale, const EnumValueSymbol *symbols_, size_t nSymbols_)
const EnumValueSymbol *const symbols