Audacity 3.2.0
Classes | Typedefs | Enumerations | Functions
PluginSettings Namespace Reference

Classes

struct  ConfigReferenceGenerator
 Define a reference to a variable of one of the types in ConfigValueTypes. More...
 
struct  ConfigReferenceGenerator< is_const, std::tuple< Types... > >
 

Typedefs

using ConfigValueTypes = std::tuple< wxString, int, bool, float, double >
 Supported types for settings. More...
 
using ConfigReference = ConfigReferenceGenerator< false, ConfigValueTypes >::type
 
using ConfigConstReference = ConfigReferenceGenerator< true, ConfigValueTypes >::type
 

Enumerations

enum  ConfigurationType : unsigned { Shared , Private }
 

Functions

bool HasConfigGroup (const EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group)
 
bool GetConfigSubgroups (const EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, RegistryPaths &subgroups)
 
bool HasConfigValue (const EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, const RegistryPath &key)
 
bool GetConfigValue (const EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, const RegistryPath &key, ConfigReference var, ConfigConstReference defval)
 
bool SetConfigValue (const EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, const RegistryPath &key, ConfigConstReference value)
 
bool RemoveConfigSubgroup (const EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group)
 
bool RemoveConfig (const EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, const RegistryPath &key)
 
template<typename Value >
bool GetConfig (const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, const Value &defval)
 
template<typename Value , typename ConvertibleToValue >
bool GetConfig (const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, ConvertibleToValue defval)
 
template<typename Value >
bool GetConfig (const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var)
 
template<typename Value >
bool SetConfig (const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, const Value &value)
 

Typedef Documentation

◆ ConfigConstReference

Definition at line 78 of file PluginInterface.h.

◆ ConfigReference

Definition at line 76 of file PluginInterface.h.

◆ ConfigValueTypes

using PluginSettings::ConfigValueTypes = typedef std::tuple< wxString , int , bool , float , double >

Supported types for settings.

Definition at line 60 of file PluginInterface.h.

Enumeration Type Documentation

◆ ConfigurationType

Enumerator
Shared 
Private 

Definition at line 55 of file PluginInterface.h.

55 : unsigned {
57};

Function Documentation

◆ GetConfig() [1/3]

template<typename Value >
bool PluginSettings::GetConfig ( const EffectDefinitionInterface ident,
ConfigurationType  type,
const RegistryPath group,
const RegistryPath key,
Value &  var 
)
inline

Definition at line 88 of file ConfigInterface.h.

91{
92 return GetConfig(ident, type, group, key, var, Value{});
93}
static const AudacityProject::AttachedObjects::RegisteredFactory key
static CommandHandlerObject & ident(AudacityProject &project)
bool GetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var)

References GetConfig(), ident(), and key.

Here is the call graph for this function:

◆ GetConfig() [2/3]

template<typename Value >
bool PluginSettings::GetConfig ( const EffectDefinitionInterface ident,
ConfigurationType  type,
const RegistryPath group,
const RegistryPath key,
Value &  var,
const Value &  defval 
)
inline

Definition at line 73 of file ConfigInterface.h.

76{ return GetConfigValue(ident, type, group, key,
77 std::ref(var), std::cref(defval)); }
bool GetConfigValue(const EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, const RegistryPath &key, ConfigReference var, ConfigConstReference defval)

References GetConfigValue(), ident(), and key.

Referenced by EffectBase::DoEffect(), VSTEffect::DoMakeInstance(), AudioUnitEffect::FullyInitializePlugin(), GetConfig(), anonymous_namespace{LV2Preferences.cpp}::GetSetting(), anonymous_namespace{EffectManager.cpp}::InitializePreset(), LadspaEffect::LoadParameters(), LV2Effect::LoadParameters(), AudioUnitWrapper::LoadPreset(), LadspaEffect::LoadUseLatency(), VST3Wrapper::LoadUserPreset(), Effect::LoadUserPreset(), VSTEffect::LoadUserPreset(), AudioUnitEffect::MigrateOldConfigFile(), EffectChangeSpeed::PopulateOrExchange(), VSTEffect::PopulateUI(), VST3Effect::PopulateUI(), VST3Instance::ReloadUserOptions(), VSTEffect::ShowOptions(), and EffectChangeSpeed::Update_Vinyl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetConfig() [3/3]

template<typename Value , typename ConvertibleToValue >
bool PluginSettings::GetConfig ( const EffectDefinitionInterface ident,
ConfigurationType  type,
const RegistryPath group,
const RegistryPath key,
Value &  var,
ConvertibleToValue  defval 
)
inline

Definition at line 81 of file ConfigInterface.h.

84{ return GetConfig(ident, type, group, key, var, static_cast<Value>(defval)); }

References GetConfig(), ident(), and key.

Here is the call graph for this function:

◆ GetConfigSubgroups()

MODULE_MANAGER_API bool PluginSettings::GetConfigSubgroups ( const EffectDefinitionInterface ident,
PluginSettings::ConfigurationType  type,
const RegistryPath group,
RegistryPaths subgroups 
)

Definition at line 27 of file ConfigInterface.cpp.

30{
31 auto &pluginManager = PluginManager::Get();
32 const auto &id = pluginManager.GetID(&ident);
33 if (pluginManager.GetConfigSubgroups(
34 type, id, group, subgroups))
35 return true;
36 if (auto id2 = pluginManager.OldGetID(&ident); id != id2)
37 return pluginManager.GetConfigSubgroups(type, id2, group, subgroups);
38 return false;
39}
static PluginManager & Get()

References PluginManager::Get(), and ident().

Referenced by GetUserPresets(), and EffectUIHost::LoadUserPresets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetConfigValue()

MODULE_MANAGER_API bool PluginSettings::GetConfigValue ( const EffectDefinitionInterface ident,
PluginSettings::ConfigurationType  type,
const RegistryPath group,
const RegistryPath key,
ConfigReference  var,
ConfigConstReference  defval 
)

Definition at line 54 of file ConfigInterface.cpp.

58{
59 auto &pluginManager = PluginManager::Get();
60 const auto &id = pluginManager.GetID(&ident);
61 if (pluginManager.GetConfigValue(type, id, group, key, var, defval))
62 return true;
63 if (auto id2 = pluginManager.OldGetID(&ident); id != id2)
64 return pluginManager.GetConfigValue(type, id2, group, key, var, defval);
65 return false;
66}

References PluginManager::Get(), ident(), and key.

Referenced by GetConfig().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasConfigGroup()

MODULE_MANAGER_API bool PluginSettings::HasConfigGroup ( const EffectDefinitionInterface ident,
PluginSettings::ConfigurationType  type,
const RegistryPath group 
)

Definition at line 14 of file ConfigInterface.cpp.

17{
18 auto &pluginManager = PluginManager::Get();
19 const auto &id = pluginManager.GetID(&ident);
20 if (pluginManager.HasConfigGroup(type, id, group))
21 return true;
22 if (auto id2 = pluginManager.OldGetID(&ident); id != id2)
23 return pluginManager.HasConfigGroup(type, id2, group);
24 return false;
25}

References PluginManager::Get(), and ident().

Referenced by HasCurrentSettings(), and HasFactoryDefaults().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasConfigValue()

MODULE_MANAGER_API bool PluginSettings::HasConfigValue ( const EffectDefinitionInterface ident,
PluginSettings::ConfigurationType  type,
const RegistryPath group,
const RegistryPath key 
)

Definition at line 41 of file ConfigInterface.cpp.

44{
45 auto &pluginManager = PluginManager::Get();
46 const auto &id = pluginManager.GetID(&ident);
47 if (pluginManager.HasConfigValue(type, id, group, key))
48 return true;
49 if (auto id2 = pluginManager.OldGetID(&ident); id != id2)
50 return pluginManager.HasConfigValue(type, id2, group, key);
51 return false;
52}

References PluginManager::Get(), ident(), and key.

Here is the call graph for this function:

◆ RemoveConfig()

MODULE_MANAGER_API bool PluginSettings::RemoveConfig ( const EffectDefinitionInterface ident,
PluginSettings::ConfigurationType  type,
const RegistryPath group,
const RegistryPath key 
)

Definition at line 89 of file ConfigInterface.cpp.

92{
93 auto &pluginManager = PluginManager::Get();
94 const auto &id = pluginManager.GetID(&ident);
95 const auto &id2 = pluginManager.OldGetID(&ident);
96 return pluginManager.RemoveConfig(type, id, group, key)
97 || (id2 != id && pluginManager.RemoveConfig(type, id2, group, key));
98}

References PluginManager::Get(), ident(), and key.

Referenced by AudioUnitEffect::MigrateOldConfigFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveConfigSubgroup()

MODULE_MANAGER_API bool PluginSettings::RemoveConfigSubgroup ( const EffectDefinitionInterface ident,
PluginSettings::ConfigurationType  type,
const RegistryPath group 
)

Definition at line 78 of file ConfigInterface.cpp.

81{
82 auto &pluginManager = PluginManager::Get();
83 const auto &id = pluginManager.GetID(&ident);
84 const auto &id2 = pluginManager.OldGetID(&ident);
85 return pluginManager.RemoveConfigSubgroup(type, id, group)
86 || (id2 != id && pluginManager.RemoveConfigSubgroup(type, id2, group));
87}

References PluginManager::Get(), and ident().

Referenced by EffectUIHost::OnDeletePreset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetConfig()

template<typename Value >
bool PluginSettings::SetConfig ( const EffectDefinitionInterface ident,
ConfigurationType  type,
const RegistryPath group,
const RegistryPath key,
const Value &  value 
)
inline

Definition at line 100 of file ConfigInterface.h.

103{
104 return SetConfigValue(ident, type, group, key, std::cref(value));
105}
bool SetConfigValue(const EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, const RegistryPath &key, ConfigConstReference value)

References ident(), key, and SetConfigValue().

Referenced by anonymous_namespace{EffectManager.cpp}::InitializePreset(), EffectChangeSpeed::OnChoice_Vinyl(), VSTEffectOptionsDialog::OnOk(), VST3OptionsDialog::OnOk(), AudioUnitEffect::SaveBlobToConfig(), LadspaEffect::SaveParameters(), LV2Effect::SaveParameters(), LadspaEffect::SaveUseLatency(), VST3Wrapper::SaveUserPreset(), Effect::SaveUserPreset(), VSTEffect::SaveUserPreset(), anonymous_namespace{LV2Preferences.cpp}::SetSetting(), AudioUnitEffect::ShowOptions(), EffectChangeSpeed::TransferDataFromWindow(), and EffectEqualization::ValidateUI().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetConfigValue()

MODULE_MANAGER_API bool PluginSettings::SetConfigValue ( const EffectDefinitionInterface ident,
PluginSettings::ConfigurationType  type,
const RegistryPath group,
const RegistryPath key,
ConfigConstReference  value 
)

Definition at line 68 of file ConfigInterface.cpp.

72{
73 auto &pluginManager = PluginManager::Get();
74 const auto &id = pluginManager.GetID(&ident);
75 return pluginManager.SetConfigValue(type, id, group, key, value);
76}

References PluginManager::Get(), ident(), and key.

Referenced by SetConfig().

Here is the call graph for this function:
Here is the caller graph for this function: