Audacity  3.0.3
Public Member Functions | Public Attributes | List of all members
ShuttleParams Class Reference

Shuttle that deals with 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 ShuttleParams:
[legend]
Collaboration diagram for ShuttleParams:
[legend]

Public Member Functions

 ShuttleParams ()
 
virtual ~ShuttleParams ()
 
bool ShouldSet ()
 
virtual ShuttleParamsOptional (bool &WXUNUSED(var))
 
virtual ShuttleParamsOptionalY (bool &var)
 
virtual ShuttleParamsOptionalN (bool &var)
 
virtual void Define (bool &var, const wxChar *key, const bool vdefault, const bool vmin=false, const bool vmax=false, const bool vscl=false)
 
virtual void Define (size_t &var, const wxChar *key, const int vdefault, const int vmin=0, const int vmax=100000, const int vscl=1)
 
virtual void Define (int &var, const wxChar *key, const int vdefault, const int vmin=0, const int vmax=100000, const int vscl=1)
 
virtual void Define (float &var, const wxChar *key, const float vdefault, const float vmin, const float vmax, const float vscl=1.0f)
 
virtual void Define (double &var, const wxChar *key, const float vdefault, const float vmin, const float vmax, const float vscl=1.0f)
 
virtual void Define (double &var, const wxChar *key, const double vdefault, const double vmin, const double vmax, const double vscl=1.0f)
 
virtual void Define (wxString &var, const wxChar *key, const wxString vdefault, const wxString vmin={}, const wxString vmax={}, const wxString vscl={})
 
virtual void DefineEnum (int &var, const wxChar *key, const int vdefault, const EnumValueSymbol strings[], size_t nStrings)
 

Public Attributes

wxString mParams
 
bool * pOptionalFlag
 
CommandParametersmpEap
 

Detailed Description

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

Definition at line 61 of file Shuttle.h.

Constructor & Destructor Documentation

◆ ShuttleParams()

ShuttleParams::ShuttleParams ( )
inline

Definition at line 67 of file Shuttle.h.

67 { mpEap = NULL; pOptionalFlag = NULL; }

◆ ~ShuttleParams()

virtual ShuttleParams::~ShuttleParams ( )
inlinevirtual

Definition at line 68 of file Shuttle.h.

68 {}

Member Function Documentation

◆ Define() [1/7]

void ShuttleParams::Define ( bool &  var,
const wxChar *  key,
const bool  vdefault,
const bool  vmin = false,
const bool  vmax = false,
const bool  vscl = false 
)
virtual

◆ Define() [2/7]

void ShuttleParams::Define ( double &  var,
const wxChar *  key,
const double  vdefault,
const double  vmin,
const double  vmax,
const double  vscl = 1.0f 
)
virtual

Reimplemented in ShuttleGetDefinition, ShuttleSetAutomation, and ShuttleGetAutomation.

Definition at line 337 of file Shuttle.cpp.

337 {;};

◆ Define() [3/7]

void ShuttleParams::Define ( double &  var,
const wxChar *  key,
const float  vdefault,
const float  vmin,
const float  vmax,
const float  vscl = 1.0f 
)
virtual

Reimplemented in ShuttleGetDefinition, ShuttleSetAutomation, and ShuttleGetAutomation.

Definition at line 336 of file Shuttle.cpp.

336 {;};

◆ Define() [4/7]

void ShuttleParams::Define ( float &  var,
const wxChar *  key,
const float  vdefault,
const float  vmin,
const float  vmax,
const float  vscl = 1.0f 
)
virtual

Reimplemented in ShuttleGetDefinition, ShuttleSetAutomation, and ShuttleGetAutomation.

Definition at line 335 of file Shuttle.cpp.

335 {;};

◆ Define() [5/7]

void ShuttleParams::Define ( int &  var,
const wxChar *  key,
const int  vdefault,
const int  vmin = 0,
const int  vmax = 100000,
const int  vscl = 1 
)
virtual

Reimplemented in ShuttleGetDefinition, ShuttleSetAutomation, and ShuttleGetAutomation.

Definition at line 334 of file Shuttle.cpp.

334 {;};

◆ Define() [6/7]

void ShuttleParams::Define ( size_t &  var,
const wxChar *  key,
const int  vdefault,
const int  vmin = 0,
const int  vmax = 100000,
const int  vscl = 1 
)
virtual

Reimplemented in ShuttleGetDefinition, ShuttleSetAutomation, and ShuttleGetAutomation.

Definition at line 333 of file Shuttle.cpp.

333 {;};

◆ Define() [7/7]

void ShuttleParams::Define ( wxString &  var,
const wxChar *  key,
const wxString  vdefault,
const wxString  vmin = {},
const wxString  vmax = {},
const wxString  vscl = {} 
)
virtual

Reimplemented in ShuttleGetDefinition, ShuttleSetAutomation, and ShuttleGetAutomation.

Definition at line 338 of file Shuttle.cpp.

338 {;};

◆ DefineEnum()

void ShuttleParams::DefineEnum ( int &  var,
const wxChar *  key,
const int  vdefault,
const EnumValueSymbol  strings[],
size_t  nStrings 
)
virtual

◆ Optional()

virtual ShuttleParams& ShuttleParams::Optional ( bool &  WXUNUSEDvar)
inlinevirtual

Definition at line 70 of file Shuttle.h.

70 { pOptionalFlag = NULL;return *this;};

◆ OptionalN()

virtual ShuttleParams& ShuttleParams::OptionalN ( bool &  var)
inlinevirtual

◆ OptionalY()

virtual ShuttleParams& ShuttleParams::OptionalY ( bool &  var)
inlinevirtual

Reimplemented in ShuttleDefaults.

Definition at line 71 of file Shuttle.h.

71 { return Optional( var );};

Referenced by DragCommand::DefineParams(), SelectTimeCommand::DefineParams(), SelectTracksCommand::DefineParams(), SetClipCommand::DefineParams(), SetEnvelopeCommand::DefineParams(), SetLabelCommand::DefineParams(), SetProjectCommand::DefineParams(), and SetTrackBase::DefineParams().

Here is the caller graph for this function:

◆ ShouldSet()

bool ShuttleParams::ShouldSet ( )

Definition at line 324 of file Shuttle.cpp.

324  {
325  if( !pOptionalFlag )
326  return true;
327  bool result = *pOptionalFlag;
328  pOptionalFlag = NULL;
329  return result;
330 }

References pOptionalFlag.

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

Here is the caller graph for this function:

Member Data Documentation

◆ mParams

wxString ShuttleParams::mParams

Definition at line 64 of file Shuttle.h.

◆ mpEap

CommandParameters* ShuttleParams::mpEap

◆ pOptionalFlag

bool* ShuttleParams::pOptionalFlag

The documentation for this class was generated from the following files:
ShuttleParams::mpEap
CommandParameters * mpEap
Definition: Shuttle.h:66
ShuttleParams::Optional
virtual ShuttleParams & Optional(bool &WXUNUSED(var))
Definition: Shuttle.h:70
ShuttleParams::pOptionalFlag
bool * pOptionalFlag
Definition: Shuttle.h:65