MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / clearAll

Method clearAll

pj_runtime/src/CatalogModel.cpp:688–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

686}
687
688void CatalogModel::clearAll(bool tombstone) {
689 if (impl_->items.empty()) {
690 return;
691 }
692 // Tombstone only when the underlying engine data is NOT being erased: the tombstone
693 // hides data that lingers in the engine. A real "delete all" erases the engine too,
694 // so there is nothing to hide (tombstone=false) and no soft-delete state accumulates.
695 if (tombstone) {
696 for (const auto& kv : impl_->items) {
697 impl_->removed_datasets.insert(kv.second.dataset_id);
698 }
699 }
700 impl_->items.clear();
701 impl_->removed_names_per_dataset.clear();
702 emit cleared();
703}
704
705void CatalogModel::resetRemovalState() {
706 if (impl_->removed_datasets.empty() && impl_->removed_names_per_dataset.empty()) {

Callers 4

TESTFunction · 0.80
TESTFunction · 0.80
MainWindowMethod · 0.80

Calls 3

emptyMethod · 0.45
insertMethod · 0.45
clearMethod · 0.45

Tested by 2

TESTFunction · 0.64
TESTFunction · 0.64