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

Function CopyEntriesRecursive

libraries/lib-preferences/Prefs.cpp:208–232  ·  view source on GitHub ↗

Recursive routine to copy all groups and entries from one wxConfig object to another

Source from the content-addressed store, hash-verified

206
207// Recursive routine to copy all groups and entries from one wxConfig object to another
208static void CopyEntriesRecursive(wxString path, wxConfigBase *src, wxConfigBase *dst)
209{
210 wxString entryName;
211 long entryIndex;
212 bool entryKeepGoing;
213
214 entryKeepGoing = src->GetFirstEntry(entryName, entryIndex);
215 while (entryKeepGoing) {
216 CopyEntry(path, src, dst, entryName);
217 entryKeepGoing = src->GetNextEntry(entryName, entryIndex);
218 }
219
220 wxString groupName;
221 long groupIndex;
222 bool groupKeepGoing;
223
224 groupKeepGoing = src->GetFirstGroup(groupName, groupIndex);
225 while (groupKeepGoing) {
226 wxString subPath = path+groupName+wxT("/");
227 src->SetPath(subPath);
228 CopyEntriesRecursive(subPath, src, dst);
229 src->SetPath(path);
230 groupKeepGoing = src->GetNextGroup(groupName, groupIndex);
231 }
232}
233#endif
234
235void InitPreferences( std::unique_ptr<audacity::BasicSettings> uPrefs )

Callers

nothing calls this directly

Calls 2

CopyEntryFunction · 0.85
SetPathMethod · 0.45

Tested by

no test coverage detected