MCPcopy Create free account
hub / github.com/DFHack/dfhack / save

Method save

plugins/debug.cpp:414–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412 }
413
414 void save(JsonArchive& ar) const
415 {
416 JsonArchive children{Json::objectValue};
417 for (const auto& filterPair: *this) {
418 if (!filterPair.second.persistent())
419 continue;
420 std::stringstream ss;
421 ss << filterPair.first;
422 filterPair.second.save(children[ss.str()], configVersion);
423 }
424 auto configVersion = FilterManager::configVersion;
425 ar << NVP(configVersion)
426 << NVP(nextId_);
427 ar["filters"] = children;
428 }
429
430private:
431 FilterManager() = default;

Callers

nothing calls this directly

Calls 3

persistentMethod · 0.80
saveMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected