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

Method getAll

library/modules/Persistence.cpp:385–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385void Persistence::getAll(std::vector<PersistentDataItem> &vec, int entity_id) {
386 vec.clear();
387
388 if (!is_good_entity_id(entity_id) || !Core::getInstance().isWorldLoaded())
389 return;
390
391 CoreSuspender suspend;
392
393 if (!store.contains(entity_id))
394 return;
395
396 for (auto & entries : store[entity_id])
397 vec.emplace_back(entries.second);
398}
399
400void Persistence::getAllByKeyRange(std::vector<PersistentDataItem> &vec, int entity_id,
401 const std::string &min, const std::string &max) {

Callers

nothing calls this directly

Calls 3

is_good_entity_idFunction · 0.85
containsMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected