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 359 of file Shuttle.cpp.

361{}

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 384 of file Shuttle.cpp.

386{}

◆ 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 379 of file Shuttle.cpp.

381{}

◆ 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 374 of file Shuttle.cpp.

376{}

◆ 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 369 of file Shuttle.cpp.

371{}

◆ 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 364 of file Shuttle.cpp.

366{}

◆ 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 389 of file Shuttle.cpp.

391{}

◆ 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 394 of file Shuttle.cpp.

396{}

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 322 of file Shuttle.cpp.

324{
325 pOptionalFlag = nullptr;
326 return *this;
327}
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 337 of file Shuttle.cpp.

339{
340 return Optional( var );
341}
virtual SettingsVisitorBase & Optional(Ref< bool > var)
Definition: Shuttle.cpp:322

◆ OptionalY()

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

Definition at line 330 of file Shuttle.cpp.

332{
333 return Optional( var );
334}

◆ ShouldSet()

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

Definition at line 348 of file Shuttle.cpp.

349{
350 if( !pOptionalFlag )
351 return true;
352 bool result = *pOptionalFlag;
353 pOptionalFlag = NULL;
354 return result;
355}

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: