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

Method WriteXML

libraries/lib-realtime-effects/RealtimeEffectState.cpp:793–828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

791}
792
793void RealtimeEffectState::WriteXML(XMLWriter &xmlFile)
794{
795 if (!mPlugin)
796 return;
797
798 xmlFile.StartTag(XMLTag());
799 const auto active = mMainSettings.settings.extra.GetActive();
800 xmlFile.WriteAttr(activeAttribute, active);
801 xmlFile.WriteAttr(idAttribute, PluginManager::GetID(mPlugin));
802 xmlFile.WriteAttr(versionAttribute, mPlugin->GetVersion());
803
804 CommandParameters cmdParms;
805 if (mPlugin->SaveSettings(mMainSettings.settings, cmdParms)) {
806 xmlFile.StartTag(parametersAttribute);
807
808 wxString entryName;
809 long entryIndex;
810 bool entryKeepGoing;
811
812 entryKeepGoing = cmdParms.GetFirstEntry(entryName, entryIndex);
813 while (entryKeepGoing) {
814 wxString entryValue = cmdParms.Read(entryName, "");
815
816 xmlFile.StartTag(parameterAttribute);
817 xmlFile.WriteAttr(nameAttribute, entryName);
818 xmlFile.WriteAttr(valueAttribute, entryValue);
819 xmlFile.EndTag(parameterAttribute);
820
821 entryKeepGoing = cmdParms.GetNextEntry(entryName, entryIndex);
822 }
823
824 xmlFile.EndTag(parametersAttribute);
825 }
826
827 xmlFile.EndTag(XMLTag());
828}
829
830std::shared_ptr<EffectSettingsAccess> RealtimeEffectState::GetAccess()
831{

Callers

nothing calls this directly

Calls 7

GetIDFunction · 0.85
StartTagMethod · 0.45
WriteAttrMethod · 0.45
GetVersionMethod · 0.45
SaveSettingsMethod · 0.45
ReadMethod · 0.45
EndTagMethod · 0.45

Tested by

no test coverage detected