1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 06:01:13 +02:00

Create ComponentInterface

It combines the old IdentInterface with the ParamsInterface, providing an identifier and parameters (if needed).
The main purpose of the change is to make the class hierarchy (as viewed via doxygen) much easier to follow.
This commit is contained in:
James Crook
2018-11-02 15:31:44 +00:00
parent c63dcbd3ca
commit 466e9c179e
161 changed files with 875 additions and 597 deletions

View File

@@ -12,9 +12,9 @@
#define __AUDACITY_SHUTTLE__
#include "commands/CommandTargets.h"
#include "../include/audacity/IdentInterface.h"
#include "../include/audacity/ComponentInterface.h"
class IdentInterfaceSymbol;
class ComponentInterfaceSymbol;
class WrappedType;
class Shuttle /* not final */ {
@@ -78,7 +78,7 @@ public:
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 IdentInterfaceSymbol strings[], size_t nStrings );
const ComponentInterfaceSymbol strings[], size_t nStrings );
};
/**************************************************************************//**
@@ -96,7 +96,7 @@ public:
void Define( double & var, const wxChar * key, const double vdefault, const double vmin, const double vmax, const double vscl ) override;
void Define( wxString &var, const wxChar * key, const wxString vdefault, const wxString vmin, const wxString vmax, const wxString vscl ) override;
void DefineEnum( int &var, const wxChar * key, const int vdefault,
const IdentInterfaceSymbol strings[], size_t nStrings ) override;
const ComponentInterfaceSymbol strings[], size_t nStrings ) override;
};
/**************************************************************************//**
@@ -120,7 +120,7 @@ public:
void Define( double & var, const wxChar * key, const double vdefault, const double vmin, const double vmax, const double vscl ) override;
void Define( wxString &var, const wxChar * key, const wxString vdefault, const wxString vmin, const wxString vmax, const wxString vscl ) override;
void DefineEnum( int &var, const wxChar * key, const int vdefault,
const IdentInterfaceSymbol strings[], size_t nStrings ) override;
const ComponentInterfaceSymbol strings[], size_t nStrings ) override;
};
/**************************************************************************//**
@@ -141,7 +141,7 @@ public:
void Define( double & var, const wxChar * key, const double vdefault, const double vmin, const double vmax, const double vscl ) override;
void Define( wxString &var, const wxChar * key, const wxString vdefault, const wxString vmin, const wxString vmax, const wxString vscl ) override;
void DefineEnum( int &var, const wxChar * key, const int vdefault,
const IdentInterfaceSymbol strings[], size_t nStrings ) override;
const ComponentInterfaceSymbol strings[], size_t nStrings ) override;
};
@@ -178,7 +178,7 @@ public:
const wxString WXUNUSED(vmin), const wxString WXUNUSED(vmax), const wxString WXUNUSED(vscl) )
override { var = vdefault;};
void DefineEnum( int &var, const wxChar * WXUNUSED(key), const int vdefault,
const IdentInterfaceSymbol WXUNUSED(strings) [], size_t WXUNUSED( nStrings ) )
const ComponentInterfaceSymbol WXUNUSED(strings) [], size_t WXUNUSED( nStrings ) )
override { var = vdefault;};
};