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

Method load

plugins/debug.cpp:228–243  ·  view source on GitHub ↗

Load Filter from configuration file. Second parameter would be version number if format changes in future to include more fields. Then new fields would have to be loaded conditionally

Source from the content-addressed store, hash-verified

226 //! number if format changes in future to include more fields. Then new
227 //! fields would have to be loaded conditionally
228 void load(JsonArchive& ar, const unsigned int)
229 {
230 ar >> NVP(categoryText_)
231 >> NVP(pluginText_)
232 >> NVP(enabled_)
233 >> NVP(level_);
234 TRACE(filter) << "Loading filter cat: " << categoryText_
235 << " plug: " << pluginText_
236 << " ena " << enabled_
237 << " level: " << level_
238 << std::endl;
239 persistent_ = true;
240 matches_ = 0;
241 category_ = std::regex{categoryText_};
242 plugin_ = std::regex{pluginText_};
243 }
244
245 //! Save the Filter to json configuration file
246 void save(JsonArchive& ar, const unsigned int) const

Callers 5

update_mouse_posFunction · 0.45
loadMethod · 0.45
~ConnectedMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected