mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-20 09:31:15 +02:00
Use type aliases RegistryPath, RegistryPaths...
... for wxString and vector thereof, holding strings that key into wxConfigBase; to be replaced later with different types
This commit is contained in:
@@ -42,6 +42,8 @@
|
||||
#ifndef __AUDACITY_CONFIGINTERFACE_H__
|
||||
#define __AUDACITY_CONFIGINTERFACE_H__
|
||||
|
||||
#include "audacity/Types.h"
|
||||
|
||||
/*************************************************************************************//**
|
||||
|
||||
\class ConfigClientInterface
|
||||
@@ -56,41 +58,41 @@ class AUDACITY_DLL_API ConfigClientInterface /* not final */
|
||||
public:
|
||||
virtual ~ConfigClientInterface() {};
|
||||
|
||||
virtual bool HasSharedConfigGroup(const wxString & group) = 0;
|
||||
virtual bool GetSharedConfigSubgroups(const wxString & group, wxArrayString & subgroups) = 0;
|
||||
virtual bool HasSharedConfigGroup(const RegistryPath & group) = 0;
|
||||
virtual bool GetSharedConfigSubgroups(const RegistryPath & group, RegistryPaths & subgroups) = 0;
|
||||
|
||||
virtual bool GetSharedConfig(const wxString & group, const wxString & key, wxString & value, const wxString & defval) = 0;
|
||||
virtual bool GetSharedConfig(const wxString & group, const wxString & key, int & value, int defval) = 0;
|
||||
virtual bool GetSharedConfig(const wxString & group, const wxString & key, bool & value, bool defval) = 0;
|
||||
virtual bool GetSharedConfig(const wxString & group, const wxString & key, float & value, float defval) = 0;
|
||||
virtual bool GetSharedConfig(const wxString & group, const wxString & key, double & value, double defval) = 0;
|
||||
virtual bool GetSharedConfig(const RegistryPath & group, const RegistryPath & key, wxString & value, const wxString & defval) = 0;
|
||||
virtual bool GetSharedConfig(const RegistryPath & group, const RegistryPath & key, int & value, int defval) = 0;
|
||||
virtual bool GetSharedConfig(const RegistryPath & group, const RegistryPath & key, bool & value, bool defval) = 0;
|
||||
virtual bool GetSharedConfig(const RegistryPath & group, const RegistryPath & key, float & value, float defval) = 0;
|
||||
virtual bool GetSharedConfig(const RegistryPath & group, const RegistryPath & key, double & value, double defval) = 0;
|
||||
|
||||
virtual bool SetSharedConfig(const wxString & group, const wxString & key, const wxString & value) = 0;
|
||||
virtual bool SetSharedConfig(const wxString & group, const wxString & key, const int & value) = 0;
|
||||
virtual bool SetSharedConfig(const wxString & group, const wxString & key, const bool & value) = 0;
|
||||
virtual bool SetSharedConfig(const wxString & group, const wxString & key, const float & value) = 0;
|
||||
virtual bool SetSharedConfig(const wxString & group, const wxString & key, const double & value) = 0;
|
||||
virtual bool SetSharedConfig(const RegistryPath & group, const RegistryPath & key, const wxString & value) = 0;
|
||||
virtual bool SetSharedConfig(const RegistryPath & group, const RegistryPath & key, const int & value) = 0;
|
||||
virtual bool SetSharedConfig(const RegistryPath & group, const RegistryPath & key, const bool & value) = 0;
|
||||
virtual bool SetSharedConfig(const RegistryPath & group, const RegistryPath & key, const float & value) = 0;
|
||||
virtual bool SetSharedConfig(const RegistryPath & group, const RegistryPath & key, const double & value) = 0;
|
||||
|
||||
virtual bool RemoveSharedConfigSubgroup(const wxString & group) = 0;
|
||||
virtual bool RemoveSharedConfig(const wxString & group, const wxString & key) = 0;
|
||||
virtual bool RemoveSharedConfigSubgroup(const RegistryPath & group) = 0;
|
||||
virtual bool RemoveSharedConfig(const RegistryPath & group, const RegistryPath & key) = 0;
|
||||
|
||||
virtual bool HasPrivateConfigGroup(const wxString & group) = 0;
|
||||
virtual bool GetPrivateConfigSubgroups(const wxString & group, wxArrayString & subgroups) = 0;
|
||||
virtual bool HasPrivateConfigGroup(const RegistryPath & group) = 0;
|
||||
virtual bool GetPrivateConfigSubgroups(const RegistryPath & group, RegistryPaths &subgroups) = 0;
|
||||
|
||||
virtual bool GetPrivateConfig(const wxString & group, const wxString & key, wxString & value, const wxString & defval) = 0;
|
||||
virtual bool GetPrivateConfig(const wxString & group, const wxString & key, int & value, int defval) = 0;
|
||||
virtual bool GetPrivateConfig(const wxString & group, const wxString & key, bool & value, bool defval) = 0;
|
||||
virtual bool GetPrivateConfig(const wxString & group, const wxString & key, float & value, float defval) = 0;
|
||||
virtual bool GetPrivateConfig(const wxString & group, const wxString & key, double & value, double defval) = 0;
|
||||
virtual bool GetPrivateConfig(const RegistryPath & group, const RegistryPath & key, wxString & value, const wxString & defval) = 0;
|
||||
virtual bool GetPrivateConfig(const RegistryPath & group, const RegistryPath & key, int & value, int defval) = 0;
|
||||
virtual bool GetPrivateConfig(const RegistryPath & group, const RegistryPath & key, bool & value, bool defval) = 0;
|
||||
virtual bool GetPrivateConfig(const RegistryPath & group, const RegistryPath & key, float & value, float defval) = 0;
|
||||
virtual bool GetPrivateConfig(const RegistryPath & group, const RegistryPath & key, double & value, double defval) = 0;
|
||||
|
||||
virtual bool SetPrivateConfig(const wxString & group, const wxString & key, const wxString & value) = 0;
|
||||
virtual bool SetPrivateConfig(const wxString & group, const wxString & key, const int & value) = 0;
|
||||
virtual bool SetPrivateConfig(const wxString & group, const wxString & key, const bool & value) = 0;
|
||||
virtual bool SetPrivateConfig(const wxString & group, const wxString & key, const float & value) = 0;
|
||||
virtual bool SetPrivateConfig(const wxString & group, const wxString & key, const double & value) = 0;
|
||||
virtual bool SetPrivateConfig(const RegistryPath & group, const RegistryPath & key, const wxString & value) = 0;
|
||||
virtual bool SetPrivateConfig(const RegistryPath & group, const RegistryPath & key, const int & value) = 0;
|
||||
virtual bool SetPrivateConfig(const RegistryPath & group, const RegistryPath & key, const bool & value) = 0;
|
||||
virtual bool SetPrivateConfig(const RegistryPath & group, const RegistryPath & key, const float & value) = 0;
|
||||
virtual bool SetPrivateConfig(const RegistryPath & group, const RegistryPath & key, const double & value) = 0;
|
||||
|
||||
virtual bool RemovePrivateConfigSubgroup(const wxString & group) = 0;
|
||||
virtual bool RemovePrivateConfig(const wxString & group, const wxString & key) = 0;
|
||||
virtual bool RemovePrivateConfigSubgroup(const RegistryPath & group) = 0;
|
||||
virtual bool RemovePrivateConfig(const RegistryPath & group, const RegistryPath & key) = 0;
|
||||
};
|
||||
|
||||
#if 0
|
||||
|
@@ -128,9 +128,9 @@ public:
|
||||
virtual wxDialog *CreateUI(wxWindow *parent, EffectUIClientInterface *client) = 0;
|
||||
|
||||
// Preset handling
|
||||
virtual wxString GetUserPresetsGroup(const wxString & name) = 0;
|
||||
virtual wxString GetCurrentSettingsGroup() = 0;
|
||||
virtual wxString GetFactoryDefaultsGroup() = 0;
|
||||
virtual RegistryPath GetUserPresetsGroup(const RegistryPath & name) = 0;
|
||||
virtual RegistryPath GetCurrentSettingsGroup() = 0;
|
||||
virtual RegistryPath GetFactoryDefaultsGroup() = 0;
|
||||
};
|
||||
|
||||
/*************************************************************************************//**
|
||||
@@ -187,10 +187,10 @@ public:
|
||||
virtual bool GetAutomationParameters(CommandParameters & parms) = 0;
|
||||
virtual bool SetAutomationParameters(CommandParameters & parms) = 0;
|
||||
|
||||
virtual bool LoadUserPreset(const wxString & name) = 0;
|
||||
virtual bool SaveUserPreset(const wxString & name) = 0;
|
||||
virtual bool LoadUserPreset(const RegistryPath & name) = 0;
|
||||
virtual bool SaveUserPreset(const RegistryPath & name) = 0;
|
||||
|
||||
virtual wxArrayString GetFactoryPresets() = 0;
|
||||
virtual RegistryPaths GetFactoryPresets() = 0;
|
||||
virtual bool LoadFactoryPreset(int id) = 0;
|
||||
virtual bool LoadFactoryDefaults() = 0;
|
||||
};
|
||||
|
@@ -72,39 +72,39 @@ public:
|
||||
wxArrayString & files,
|
||||
bool directories = false) = 0;
|
||||
|
||||
virtual bool GetSharedConfigSubgroups(const PluginID & ID, const wxString & group, wxArrayString & subgroups) = 0;
|
||||
virtual bool GetSharedConfigSubgroups(const PluginID & ID, const RegistryPath & group, RegistryPaths & subgroups) = 0;
|
||||
|
||||
virtual bool GetSharedConfig(const PluginID & ID, const wxString & group, const wxString & key, wxString & value, const wxString & defval = wxString()) = 0;
|
||||
virtual bool GetSharedConfig(const PluginID & ID, const wxString & group, const wxString & key, int & value, int defval = 0) = 0;
|
||||
virtual bool GetSharedConfig(const PluginID & ID, const wxString & group, const wxString & key, bool & value, bool defval = false) = 0;
|
||||
virtual bool GetSharedConfig(const PluginID & ID, const wxString & group, const wxString & key, float & value, float defval = 0.0) = 0;
|
||||
virtual bool GetSharedConfig(const PluginID & ID, const wxString & group, const wxString & key, double & value, double defval = 0.0) = 0;
|
||||
virtual bool GetSharedConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, wxString & value, const wxString & defval = wxString()) = 0;
|
||||
virtual bool GetSharedConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, int & value, int defval = 0) = 0;
|
||||
virtual bool GetSharedConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, bool & value, bool defval = false) = 0;
|
||||
virtual bool GetSharedConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, float & value, float defval = 0.0) = 0;
|
||||
virtual bool GetSharedConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, double & value, double defval = 0.0) = 0;
|
||||
|
||||
virtual bool SetSharedConfig(const PluginID & ID, const wxString & group, const wxString & key, const wxString & value) = 0;
|
||||
virtual bool SetSharedConfig(const PluginID & ID, const wxString & group, const wxString & key, const int & value) = 0;
|
||||
virtual bool SetSharedConfig(const PluginID & ID, const wxString & group, const wxString & key, const bool & value) = 0;
|
||||
virtual bool SetSharedConfig(const PluginID & ID, const wxString & group, const wxString & key, const float & value) = 0;
|
||||
virtual bool SetSharedConfig(const PluginID & ID, const wxString & group, const wxString & key, const double & value) = 0;
|
||||
virtual bool SetSharedConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, const wxString & value) = 0;
|
||||
virtual bool SetSharedConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, const int & value) = 0;
|
||||
virtual bool SetSharedConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, const bool & value) = 0;
|
||||
virtual bool SetSharedConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, const float & value) = 0;
|
||||
virtual bool SetSharedConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, const double & value) = 0;
|
||||
|
||||
virtual bool RemoveSharedConfigSubgroup(const PluginID & ID, const wxString & group) = 0;
|
||||
virtual bool RemoveSharedConfig(const PluginID & ID, const wxString & group, const wxString & key) = 0;
|
||||
virtual bool RemoveSharedConfigSubgroup(const PluginID & ID, const RegistryPath & group) = 0;
|
||||
virtual bool RemoveSharedConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key) = 0;
|
||||
|
||||
virtual bool GetPrivateConfigSubgroups(const PluginID & ID, const wxString & group, wxArrayString & subgroups) = 0;
|
||||
virtual bool GetPrivateConfigSubgroups(const PluginID & ID, const RegistryPath & group, RegistryPaths & subgroups) = 0;
|
||||
|
||||
virtual bool GetPrivateConfig(const PluginID & ID, const wxString & group, const wxString & key, wxString & value, const wxString & defval = wxString()) = 0;
|
||||
virtual bool GetPrivateConfig(const PluginID & ID, const wxString & group, const wxString & key, int & value, int defval = 0) = 0;
|
||||
virtual bool GetPrivateConfig(const PluginID & ID, const wxString & group, const wxString & key, bool & value, bool defval = false) = 0;
|
||||
virtual bool GetPrivateConfig(const PluginID & ID, const wxString & group, const wxString & key, float & value, float defval = 0.0) = 0;
|
||||
virtual bool GetPrivateConfig(const PluginID & ID, const wxString & group, const wxString & key, double & value, double defval = 0.0) = 0;
|
||||
virtual bool GetPrivateConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, wxString & value, const wxString & defval = wxString()) = 0;
|
||||
virtual bool GetPrivateConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, int & value, int defval = 0) = 0;
|
||||
virtual bool GetPrivateConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, bool & value, bool defval = false) = 0;
|
||||
virtual bool GetPrivateConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, float & value, float defval = 0.0) = 0;
|
||||
virtual bool GetPrivateConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, double & value, double defval = 0.0) = 0;
|
||||
|
||||
virtual bool SetPrivateConfig(const PluginID & ID, const wxString & group, const wxString & key, const wxString & value) = 0;
|
||||
virtual bool SetPrivateConfig(const PluginID & ID, const wxString & group, const wxString & key, const int & value) = 0;
|
||||
virtual bool SetPrivateConfig(const PluginID & ID, const wxString & group, const wxString & key, const bool & value) = 0;
|
||||
virtual bool SetPrivateConfig(const PluginID & ID, const wxString & group, const wxString & key, const float & value) = 0;
|
||||
virtual bool SetPrivateConfig(const PluginID & ID, const wxString & group, const wxString & key, const double & value) = 0;
|
||||
virtual bool SetPrivateConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, const wxString & value) = 0;
|
||||
virtual bool SetPrivateConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, const int & value) = 0;
|
||||
virtual bool SetPrivateConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, const bool & value) = 0;
|
||||
virtual bool SetPrivateConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, const float & value) = 0;
|
||||
virtual bool SetPrivateConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key, const double & value) = 0;
|
||||
|
||||
virtual bool RemovePrivateConfigSubgroup(const PluginID & ID, const wxString & group) = 0;
|
||||
virtual bool RemovePrivateConfig(const PluginID & ID, const wxString & group, const wxString & key) = 0;
|
||||
virtual bool RemovePrivateConfigSubgroup(const PluginID & ID, const RegistryPath & group) = 0;
|
||||
virtual bool RemovePrivateConfig(const PluginID & ID, const RegistryPath & group, const RegistryPath & key) = 0;
|
||||
};
|
||||
|
||||
#endif // __AUDACITY_PLUGININTERFACE_H__
|
||||
|
@@ -63,6 +63,10 @@ file system path
|
||||
using PluginPath = wxString;
|
||||
using PluginPaths = std::vector< PluginPath >;
|
||||
|
||||
// A key to be passed to wxConfigBase
|
||||
using RegistryPath = wxString;
|
||||
using RegistryPaths = std::vector< RegistryPath >;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// A native 64-bit integer...used when referring to any number of samples
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user