MCPcopy Create free account
hub / github.com/audacity/audacity / SaveGroup

Method SaveGroup

libraries/lib-module-manager/PluginManager.cpp:924–1005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

922}
923
924void PluginManager::SaveGroup(audacity::BasicSettings *pRegistry, PluginType type)
925{
926 wxString group = GetPluginTypeString(type);
927 for (auto &pair : mRegisteredPlugins) {
928 auto & plug = pair.second;
929
930 if (plug.GetPluginType() != type)
931 {
932 continue;
933 }
934
935 const auto pluginGroup = pRegistry->BeginGroup(REGROOT + group + wxCONFIG_PATH_SEPARATOR + ConvertID(plug.GetID()));
936
937 pRegistry->Write(KEY_PATH, plug.GetPath());
938
939 // See comments with the corresponding load-time call to SetSymbol().
940 pRegistry->Write(KEY_SYMBOL, plug.GetSymbol().Internal());
941
942 // PRL: Writing KEY_NAME which is no longer read, but older Audacity
943 // versions expect to find it.
944 pRegistry->Write(KEY_NAME, plug.GetSymbol().Msgid().MSGID());
945
946 pRegistry->Write(KEY_VERSION, plug.GetUntranslatedVersion());
947 pRegistry->Write(KEY_VENDOR, plug.GetVendor());
948 // Write a blank -- see comments in LoadGroup:
949 pRegistry->Write(KEY_DESCRIPTION, wxString{});
950 pRegistry->Write(KEY_PROVIDERID, plug.GetProviderID());
951 pRegistry->Write(KEY_ENABLED, plug.IsEnabled());
952 pRegistry->Write(KEY_VALID, plug.IsValid());
953
954 switch (type)
955 {
956 case PluginTypeModule:
957 break;
958
959 case PluginTypeEffect:
960 {
961 EffectType etype = plug.GetEffectType();
962 wxString stype;
963 if (etype == EffectTypeNone)
964 stype = KEY_EFFECTTYPE_NONE;
965 else if (etype == EffectTypeAnalyze)
966 stype = KEY_EFFECTTYPE_ANALYZE;
967 else if (etype == EffectTypeGenerate)
968 stype = KEY_EFFECTTYPE_GENERATE;
969 else if (etype == EffectTypeProcess)
970 stype = KEY_EFFECTTYPE_PROCESS;
971 else if (etype == EffectTypeTool)
972 stype = KEY_EFFECTTYPE_TOOL;
973 else if (etype == EffectTypeHidden)
974 stype = KEY_EFFECTTYPE_HIDDEN;
975
976 pRegistry->Write(KEY_EFFECTTYPE, stype);
977 pRegistry->Write(KEY_EFFECTFAMILY, plug.GetEffectFamily());
978 pRegistry->Write(KEY_EFFECTDEFAULT, plug.IsEffectDefault());
979 pRegistry->Write(KEY_EFFECTINTERACTIVE, plug.IsEffectInteractive());
980 pRegistry->Write(KEY_EFFECTREALTIME, plug.SerializeRealtimeSupport());
981 pRegistry->Write(KEY_EFFECTAUTOMATABLE, plug.IsEffectAutomatable());

Callers

nothing calls this directly

Calls 15

GetPluginTypeMethod · 0.80
MSGIDMethod · 0.80
GetEffectTypeMethod · 0.80
GetEffectFamilyMethod · 0.80
IsEffectDefaultMethod · 0.80
IsEffectInteractiveMethod · 0.80
IsEffectAutomatableMethod · 0.80
BeginGroupMethod · 0.45
GetIDMethod · 0.45
WriteMethod · 0.45
GetPathMethod · 0.45

Tested by

no test coverage detected