Audacity  3.0.3
ConfigInterface.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  @file ConfigInterface.cpp
6 
7 **********************************************************************/
8 #include "ConfigInterface.h"
9 
10 #include "PluginManager.h"
11 
12 namespace PluginSettings {
13 
16  const RegistryPath & group)
17 {
18  auto &pluginManager = PluginManager::Get();
19  const auto &id = pluginManager.GetID(&ident);
20  return pluginManager.HasConfigGroup(type, id, group);
21 }
22 
25  const RegistryPath & group, RegistryPaths &subgroups)
26 {
27  auto &pluginManager = PluginManager::Get();
28  const auto &id = pluginManager.GetID(&ident);
29  return pluginManager.GetConfigSubgroups(
30  type, id, group, subgroups);
31 }
32 
35  const RegistryPath & group, const RegistryPath & key,
37 {
38  auto &pluginManager = PluginManager::Get();
39  const auto &id = pluginManager.GetID(&ident);
40  return pluginManager.GetConfigValue(type, id, group, key, var, defval);
41 }
42 
45  const RegistryPath & group, const RegistryPath & key,
47 {
48  auto &pluginManager = PluginManager::Get();
49  const auto &id = pluginManager.GetID(&ident);
50  return pluginManager.SetConfigValue(type, id, group, key, value);
51 }
52 
55  const RegistryPath & group)
56 {
57  auto &pluginManager = PluginManager::Get();
58  const auto &id = pluginManager.GetID(&ident);
59  return pluginManager.RemoveConfigSubgroup(type, id, group);
60 }
61 
64  const RegistryPath & group, const RegistryPath & key)
65 {
66  auto &pluginManager = PluginManager::Get();
67  const auto &id = pluginManager.GetID(&ident);
68  return pluginManager.RemoveConfig(type, id, group, key);
69 }
70 
71 }
ident
static CommandHandlerObject & ident(AudacityProject &project)
Definition: ModNullCallback.cpp:65
RegistryPaths
std::vector< RegistryPath > RegistryPaths
Definition: Identifier.h:219
PluginSettings::GetConfigSubgroups
bool GetConfigSubgroups(EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, RegistryPaths &subgroups)
Definition: ConfigInterface.cpp:23
PluginSettings
Definition: ConfigInterface.cpp:12
PluginManager.h
RegistryPath
wxString RegistryPath
Definition: Identifier.h:218
PluginSettings::GetConfigValue
bool GetConfigValue(EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, const RegistryPath &key, ConfigReference var, ConfigConstReference defval)
Definition: ConfigInterface.cpp:33
ConfigInterface.h
PluginSettings::HasConfigGroup
bool HasConfigGroup(EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group)
Definition: ConfigInterface.cpp:14
PluginManager::Get
static PluginManager & Get()
Definition: PluginManager.cpp:581
PluginSettings::ConfigConstReference
ConfigReferenceGenerator< true, ConfigValueTypes >::type ConfigConstReference
Definition: PluginInterface.h:79
EffectDefinitionInterface
EffectDefinitionInterface is a ComponentInterface that additionally tracks flag-functions for interac...
Definition: EffectInterface.h:73
key
static const AudacityProject::AttachedObjects::RegisteredFactory key
Definition: CommandManager.cpp:201
PluginSettings::SetConfigValue
bool SetConfigValue(EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, const RegistryPath &key, ConfigConstReference value)
Definition: ConfigInterface.cpp:43
PluginSettings::RemoveConfig
bool RemoveConfig(EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, const RegistryPath &key)
Definition: ConfigInterface.cpp:62
PluginSettings::ConfigurationType
ConfigurationType
Definition: PluginInterface.h:55
PluginSettings::ConfigReference
ConfigReferenceGenerator< false, ConfigValueTypes >::type ConfigReference
Definition: PluginInterface.h:77
PluginSettings::RemoveConfigSubgroup
bool RemoveConfigSubgroup(EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group)
Definition: ConfigInterface.cpp:53