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 <SettingsVisitor.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 78 of file SettingsVisitor.h.

Member Typedef Documentation

◆ Arg

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

Definition at line 84 of file SettingsVisitor.h.

◆ Ref

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

Definition at line 82 of file SettingsVisitor.h.

Constructor & Destructor Documentation

◆ SettingsVisitorBase()

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

Definition at line 90 of file SettingsVisitor.h.

90{}

◆ ~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 65 of file SettingsVisitor.cpp.

67{}

Referenced by CapturedParameters< EffectType, Parameters >::VisitOne(), EqualizationBase::VisitSettings(), and NyquistBase::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 90 of file SettingsVisitor.cpp.

92{}

◆ 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 85 of file SettingsVisitor.cpp.

87{}

◆ 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 80 of file SettingsVisitor.cpp.

82{}

◆ 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 75 of file SettingsVisitor.cpp.

77{}

◆ 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 70 of file SettingsVisitor.cpp.

72{}

◆ 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 95 of file SettingsVisitor.cpp.

97{}

◆ 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 100 of file SettingsVisitor.cpp.

102{}

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

Here is the caller graph for this function:

◆ Optional()

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

Definition at line 28 of file SettingsVisitor.cpp.

30{
31 pOptionalFlag = nullptr;
32 return *this;
33}
std::conditional_t< Const, const bool, bool > * pOptionalFlag

◆ OptionalN()

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

Definition at line 43 of file SettingsVisitor.cpp.

45{
46 return Optional( var );
47}
virtual SettingsVisitorBase & Optional(Ref< bool > var)

◆ OptionalY()

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

Definition at line 36 of file SettingsVisitor.cpp.

38{
39 return Optional( var );
40}

◆ ShouldSet()

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

Definition at line 54 of file SettingsVisitor.cpp.

55{
56 if( !pOptionalFlag )
57 return true;
58 bool result = *pOptionalFlag;
59 pOptionalFlag = NULL;
60 return result;
61}

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 86 of file SettingsVisitor.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: