commands::MoveByTimeRange
commands::MoveByTimeRange
#include <MoveByTimeRange.hpp>
Inherits from commands::ICommand
Public Functions
| Name | |
|---|---|
| MoveByTimeRange(MoveByTimeRangeParams p) | |
| virtual std::string | commandName() const override Return the human-readable command name. |
| virtual std::string | toJson() const override Serialize command parameters to JSON. |
| virtual bool | isUndoable() const override Report whether this command supports undo. |
| virtual CommandResult | execute(CommandContext const & ctx) override Execute the command against the DataManager in ctx. |
| virtual CommandResult | undo(CommandContext const & ctx) override Revert the effects of a prior execute() call. |
Additional inherited members
Public Functions inherited from commands::ICommand
| Name | |
|---|---|
| virtual | ~ICommand() =default |
| virtual int | mergeId() const Return an identifier used for undo merging. |
| virtual bool | mergeWith(ICommand const & other) Attempt to merge this command with a subsequent command of the same type. |
Public Functions Documentation
function MoveByTimeRange
explicit MoveByTimeRange(
MoveByTimeRangeParams p
)function commandName
virtual std::string commandName() const overrideReturn the human-readable command name.
Return: Stable command name string.
Reimplements: commands::ICommand::commandName
Used for journal entries and UI display. Must match the name registered in CommandRegistry.
function toJson
virtual std::string toJson() const overrideSerialize command parameters to JSON.
Return: JSON string representing the command parameters.
Reimplements: commands::ICommand::toJson
Typically implemented via rfl::json::write on the command’s params struct.
function isUndoable
virtual bool isUndoable() const overrideReport whether this command supports undo.
Return: True if undo() is implemented; false by default.
Reimplements: commands::ICommand::isUndoable
function execute
virtual CommandResult execute(
CommandContext const & ctx
) overrideExecute the command against the DataManager in ctx.
Parameters:
- ctx Runtime execution context (DataManager, time controller, etc.).
Return: Success or failure result, including affected data keys on success.
Reimplements: commands::ICommand::execute
function undo
virtual CommandResult undo(
CommandContext const & ctx
) overrideRevert the effects of a prior execute() call.
Parameters:
- ctx Runtime execution context (DataManager, time controller, etc.).
Return: Success or failure result. Default implementation returns an error indicating undo is not supported.
Reimplements: commands::ICommand::undo
Updated on 2026-11-13 at 20:25:42 +0000