Audacity 3.2.0
Public Types | Public Member Functions | Public Attributes | List of all members
SettingsVisitorBase< Const > Class Template Reference

Visitor of effect or command parameters. This is a base class with lots of virtual functions that do nothing by default. Unrelated to class Shuttle. More...

#include <Shuttle.h>

Inheritance diagram for SettingsVisitorBase< Const >:
[legend]
Collaboration diagram for SettingsVisitorBase< Const >:
[legend]

Public Types

template<typename T >
using Ref = std::conditional_t< Const, const T &, T & >
 
template<typename T >
using Arg = std::conditional_t< Const, T, T & >
 

Public Member Functions

 SettingsVisitorBase ()
 
virtual ~SettingsVisitorBase ()
 
bool ShouldSet ()
 
virtual SettingsVisitorBaseOptional (Ref< bool > var)
 
virtual SettingsVisitorBaseOptionalY (Ref< bool > var)
 
virtual SettingsVisitorBaseOptionalN (Ref< bool > var)
 
virtual void Define (Arg< bool > var, const wxChar *key, bool vdefault, bool vmin=false, bool vmax=false, bool vscl=false)
 
virtual void Define (Arg< size_t > var, const wxChar *key, int vdefault, int vmin=0, int vmax=100000, int vscl=1)
 
virtual void Define (Arg< int > var, const wxChar *key, int vdefault, int vmin=0, int vmax=100000, int vscl=1)
 
virtual void Define (Arg< float > var, const wxChar *key, float vdefault, float vmin, float vmax, float vscl=1.0f)
 
virtual void Define (Arg< double > var, const wxChar *key, float vdefault, float vmin, float vmax, float vscl=1.0f)
 
virtual void Define (Arg< double > var, const wxChar *key, double vdefault, double vmin, double vmax, double vscl=1.0f)
 
virtual void Define (Ref< wxString > var, const wxChar *key, wxString vdefault, wxString vmin={}, wxString vmax={}, wxString vscl={})
 
virtual void DefineEnum (Arg< int > var, const wxChar *key, int vdefault, const EnumValueSymbol strings[], size_t nStrings)
 

Public Attributes

wxString mParams
 
std::conditional_t< Const, const bool, bool > * pOptionalFlag {}
 
CommandParametersmpEap {}
 

Detailed Description

template<bool Const>
class SettingsVisitorBase< Const >

Visitor of effect or command parameters. This is a base class with lots of virtual functions that do nothing by default. Unrelated to class Shuttle.

Template Parameters
Constif true, then visited settings are not modifiable.

Definition at line 114 of file Shuttle.h.

Member Typedef Documentation

◆ Arg

template<bool Const>
template<typename T >
using SettingsVisitorBase< Const >::Arg = std::conditional_t<Const, T, T&>

Definition at line 120 of file Shuttle.h.

◆ Ref

template<bool Const>
template<typename T >
using SettingsVisitorBase< Const >::Ref = std::conditional_t<Const, const T&, T&>

Definition at line 118 of file Shuttle.h.

Constructor & Destructor Documentation

◆ SettingsVisitorBase()

template<bool Const>
SettingsVisitorBase< Const >::SettingsVisitorBase ( )
inline

Definition at line 126 of file Shuttle.h.

126{}

◆ ~SettingsVisitorBase()

template<bool Const>
SettingsVisitorBase< Const >::~SettingsVisitorBase ( )
virtualdefault

Member Function Documentation

◆ Define() [1/7]

template<bool Const>
void SettingsVisitorBase< Const >::Define ( Arg< bool >  var,
const wxChar *  key,
bool  vdefault,
bool  vmin = false,
bool  vmax = false,
bool  vscl = false 
)
virtual

Definition at line 355 of file Shuttle.cpp.

357{}

Referenced by CapturedParameters< EffectType, Parameters >::VisitOne(), EffectEqualization::VisitSettings(), and NyquistEffect::VisitSettings().

Here is the caller graph for this function:

◆ Define() [2/7]

template<bool Const>
void SettingsVisitorBase< Const >::Define ( Arg< double >  var,
const wxChar *  key,
double  vdefault,
double  vmin,
double  vmax,
double  vscl = 1.0f 
)
virtual

Definition at line 380 of file Shuttle.cpp.

382{}

◆ Define() [3/7]

template<bool Const>
void SettingsVisitorBase< Const >::Define ( Arg< double >  var,
const wxChar *  key,
float  vdefault,
float  vmin,
float  vmax,
float  vscl = 1.0f 
)
virtual

Definition at line 375 of file Shuttle.cpp.

377{}

◆ Define() [4/7]

template<bool Const>
void SettingsVisitorBase< Const >::Define ( Arg< float >  var,
const wxChar *  key,
float  vdefault,
float  vmin,
float  vmax,
float  vscl = 1.0f 
)
virtual

Definition at line 370 of file Shuttle.cpp.

372{}

◆ Define() [5/7]

template<bool Const>
void SettingsVisitorBase< Const >::Define ( Arg< int >  var,
const wxChar *  key,
int  vdefault,
int  vmin = 0,
int  vmax = 100000,
int  vscl = 1 
)
virtual

Definition at line 365 of file Shuttle.cpp.

367{}

◆ Define() [6/7]

template<bool Const>
void SettingsVisitorBase< Const >::Define ( Arg< size_t >  var,
const wxChar *  key,
int  vdefault,
int  vmin = 0,
int  vmax = 100000,
int  vscl = 1 
)
virtual

Definition at line 360 of file Shuttle.cpp.

362{}

◆ Define() [7/7]

template<bool Const>
void SettingsVisitorBase< Const >::Define ( Ref< wxString >  var,
const wxChar *  key,
wxString  vdefault,
wxString  vmin = {},
wxString  vmax = {},
wxString  vscl = {} 
)
virtual

Definition at line 385 of file Shuttle.cpp.

387{}

◆ DefineEnum()

template<bool Const>
void SettingsVisitorBase< Const >::DefineEnum ( Arg< int >  var,
const wxChar *  key,
int  vdefault,
const EnumValueSymbol  strings[],
size_t  nStrings 
)
virtual

Definition at line 390 of file Shuttle.cpp.

392{}

Referenced by CapturedParameters< EffectType, Parameters >::VisitOne(), and NyquistEffect::VisitSettings().

Here is the caller graph for this function:

◆ Optional()

template<bool Const>
auto SettingsVisitorBase< Const >::Optional ( Ref< bool >  var)
virtual

Definition at line 318 of file Shuttle.cpp.

320{
321 pOptionalFlag = nullptr;
322 return *this;
323}
std::conditional_t< Const, const bool, bool > * pOptionalFlag
Definition: Shuttle.h:123

◆ OptionalN()

template<bool Const>
auto SettingsVisitorBase< Const >::OptionalN ( Ref< bool >  var)
virtual

Definition at line 333 of file Shuttle.cpp.

335{
336 return Optional( var );
337}
virtual SettingsVisitorBase & Optional(Ref< bool > var)
Definition: Shuttle.cpp:318

◆ OptionalY()

template<bool Const>
auto SettingsVisitorBase< Const >::OptionalY ( Ref< bool >  var)
virtual

Definition at line 326 of file Shuttle.cpp.

328{
329 return Optional( var );
330}

◆ ShouldSet()

template<bool Const>
bool SettingsVisitorBase< Const >::ShouldSet

Definition at line 344 of file Shuttle.cpp.

345{
346 if( !pOptionalFlag )
347 return true;
348 bool result = *pOptionalFlag;
349 pOptionalFlag = NULL;
350 return result;
351}

Referenced by ShuttleGetAutomation::Define(), and ShuttleGetAutomation::DefineEnum().

Here is the caller graph for this function:

Member Data Documentation

◆ mParams

template<bool Const>
wxString SettingsVisitorBase< Const >::mParams

Definition at line 122 of file Shuttle.h.

◆ mpEap

template<bool Const>
CommandParameters* SettingsVisitorBase< Const >::mpEap {}

◆ pOptionalFlag

template<bool Const>
std::conditional_t<Const, const bool, bool>* SettingsVisitorBase< Const >::pOptionalFlag {}

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