SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
BatchDeleteCommand Class Reference

Undoable bulk deletion (perf-plan Phase A2): one engine swmm_*_delete_many call per kind instead of K per-object deletes. More...

#include <mapundostack.h>

Inheritance diagram for BatchDeleteCommand:
Collaboration diagram for BatchDeleteCommand:

Classes

struct  Target
 

Public Member Functions

 BatchDeleteCommand (SWMMModelLayer *layer, const QList< Target > &targets, MapCanvas *canvas, const QString &text)
 
void redo () override
 
- Public Member Functions inherited from BulkEditCommand
 BulkEditCommand (SWMMModelLayer *layer, const QString &text, QUndoCommand *parent=nullptr)
 
void redo () override
 
void undo () override
 

Detailed Description

Undoable bulk deletion (perf-plan Phase A2): one engine swmm_*_delete_many call per kind instead of K per-object deletes.

The constructor creates one snapshot-only DeleteObjectCommand child per target — every snapshot is taken BEFORE anything is deleted, while all indices are still pre-batch — with setEngineAppliedByBatch(true) so the children's redo() are no-ops. redo() performs the whole deletion through SWMMModelLayer::applyDeleteMany inside the inherited BulkEdit scope; undo() is inherited: children restore per-object in reverse order (the rare direction — documented as O(K·N)).

Constructor & Destructor Documentation

◆ BatchDeleteCommand()

BatchDeleteCommand::BatchDeleteCommand ( SWMMModelLayer layer,
const QList< Target > &  targets,
MapCanvas canvas,
const QString &  text 
)
Here is the call graph for this function:

Member Function Documentation

◆ redo()

void BatchDeleteCommand::redo ( )
override

The documentation for this class was generated from the following files: