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

Method Advance

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

Source from the content-addressed store, hash-verified

1056}
1057
1058void PluginManager::Iterator::Advance(bool incrementing)
1059{
1060 const auto end = mPm.mRegisteredPlugins.end();
1061 if (incrementing && mIterator != end)
1062 ++mIterator;
1063 bool all = mPluginType == PluginTypeNone && mEffectType == EffectTypeNone;
1064 for (; mIterator != end; ++mIterator) {
1065 auto &plug = mIterator->second;
1066 if (!all && !(plug.IsValid() && plug.IsEnabled()))
1067 continue;
1068 auto plugType = plug.GetPluginType();
1069 if ((mPluginType == PluginTypeNone || (plugType & mPluginType)) &&
1070 (mEffectType == EffectTypeNone || plug.GetEffectType() == mEffectType) &&
1071 (mFilter == nullptr || mFilter(plug))) {
1072 if (!all && (plugType & PluginTypeEffect)) {
1073 // This preference may be written by EffectsPrefs
1074 auto setting = mPm.GetPluginEnabledSetting( plug );
1075 if (!(setting.empty() || gPrefs->Read( setting, true )))
1076 continue;
1077 }
1078 // Pause iteration at this match
1079 break;
1080 }
1081 }
1082}
1083
1084PluginManager::Iterator::Iterator(PluginManager &manager)
1085: mPm{ manager }

Callers 2

AcquireMethod · 0.45

Calls 8

GetPluginTypeMethod · 0.80
GetEffectTypeMethod · 0.80
endMethod · 0.45
IsValidMethod · 0.45
IsEnabledMethod · 0.45
emptyMethod · 0.45
ReadMethod · 0.45

Tested by

no test coverage detected