Audacity 3.2.0
Typedefs | Enumerations | Functions
PluginSettings Namespace Reference

Typedefs

using ConfigValueTypes = TypeList::List< wxString, int, bool, float, double >
 Supported types for settings. More...
 
using ConfigReference = TypeListVisitor::VariantOfReferences_t< false, ConfigValueTypes >
 Define a reference to a variable of one of the types in ConfigValueTypes. More...
 
using ConfigConstReference = TypeListVisitor::VariantOfReferences_t< true, ConfigValueTypes >
 

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, const Value &var, const Value &defval)=delete
 
template<typename Value , typename ConvertibleToValue >
bool GetConfig (const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, const Value &var, ConvertibleToValue defval)=delete
 
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 72 of file PluginInterface.h.

◆ ConfigReference

Define a reference to a variable of one of the types in ConfigValueTypes.

Definition at line 70 of file PluginInterface.h.

◆ ConfigValueTypes

using PluginSettings::ConfigValueTypes = typedef TypeList::List< wxString , int , bool , float , double >

Supported types for settings.

Definition at line 61 of file PluginInterface.h.

Enumeration Type Documentation

◆ ConfigurationType

Enumerator
Shared 
Private 

Definition at line 56 of file PluginInterface.h.

56 : unsigned {
58};

Function Documentation

◆ GetConfig() [1/5]

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

◆ GetConfig() [2/5]

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

◆ GetConfig() [3/5]

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

Definition at line 99 of file ConfigInterface.h.

102{
103 return GetConfig(ident, type, group, key, var, Value{});
104}
static CommandHandlerObject & ident(AudacityProject &project)
static const AudacityProject::AttachedObjects::RegisteredFactory key
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() [4/5]

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(), EqualizationParameters::EqualizationParameters(), GetConfig(), anonymous_namespace{LV2Preferences.cpp}::GetSetting(), anonymous_namespace{EffectManager.cpp}::InitializePreset(), LadspaEffectBase::LoadParameters(), LV2EffectBase::LoadParameters(), AudioUnitWrapper::LoadPreset(), LadspaInstance::LoadUseLatency(), VST3Wrapper::LoadUserPreset(), VSTEffectBase::LoadUserPreset(), AudioUnitEffectBase::MakeInstance(), VSTEffectBase::MakeInstance(), AudioUnitEffectBase::MigrateOldConfigFile(), EffectChangeSpeed::PopulateOrExchange(), AudioUnitEffect::PopulateUI(), VSTEffect::PopulateUI(), VST3Effect::PopulateUI(), VST3Instance::ReloadUserOptions(), EffectNoiseReduction::TrackProgress(), and EffectChangeSpeed::Update_Vinyl().

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

◆ GetConfig() [5/5]

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 AudioUnitEffectBase::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 111 of file ConfigInterface.h.

114{
115 return SetConfigValue(ident, type, group, key, std::cref(value));
116}
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(), AudioUnitEffectOptionsDialog::OnOk(), VSTEffectOptionsDialog::OnOk(), VST3OptionsDialog::OnOk(), AudioUnitEffectBase::SaveBlobToConfig(), EqualizationParameters::SaveConfig(), LadspaEffectBase::SaveParameters(), LV2EffectBase::SaveParameters(), LadspaInstance::SaveUseLatency(), VST3Wrapper::SaveUserPreset(), Effect::SaveUserPreset(), VSTEffectBase::SaveUserPreset(), anonymous_namespace{LV2Preferences.cpp}::SetSetting(), EffectUIHost::TransferDataFromWindow(), and EffectChangeSpeed::TransferDataFromWindow().

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: