Skip to content

ConfigMigrationRunner

#include <mrx/core/config/ConfigMigrationRunner.hpp>
class mrx::core::ConfigMigrationRunner

Orchestrates an ordered sequence of ConfigMigrationStep instances.

Steps are appended with addStep() and executed in insertion order by run(). The runner processes each step through its detect, precheck, migrate, and postcheck lifecycle hooks. Execution stops at the first hook that returns false.

ReturnNameDescription
ConfigMigrationRunnerConstructs an empty runner with no registered steps.
booladdStepAppends a step to the end of the ordered pipeline.
boolrunExecutes all registered steps in insertion order.

ConfigMigrationRunner()

Constructs an empty runner with no registered steps.


bool addStep(ConfigMigrationStep* newStep)

Appends a step to the end of the ordered pipeline.

Duplicate detection is pointer-based: the same raw pointer is never added twice.

true if the step was appended; false if it was already present and ignored.

NameTypeDescription
newStepConfigMigrationStep*Pointer to the step to append. The runner does not take ownership.

bool run()

Executes all registered steps in insertion order.

For each step the runner calls detect(), precheck(), migrate(), and postcheck() in sequence. A false return from detect() skips the remaining hooks for that step without failing the pipeline. A false return from any other hook stops the pipeline and returns false.

true if every step completed successfully; false if the pipeline was aborted by a failed hook.