22 lines
626 B
C++
22 lines
626 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
#include "workspace/WorkSpace.h"
|
|
#include "workspace/CommandExecutor.h"
|
|
|
|
class CommandManager {
|
|
public:
|
|
void Reload(WorkSpace* ws);
|
|
void Execute(WorkSpace* ws, WorkSpace::CommandWhen when);
|
|
|
|
// List parsed commands (no trigger distinction for UI consumption)
|
|
std::vector<Command> ListCommands(WorkSpace* ws);
|
|
// Execute a single command by its name (exact match)
|
|
bool ExecuteByName(WorkSpace* ws, const QString& name);
|
|
|
|
private:
|
|
std::vector<std::unique_ptr<CommandExecutor>> onCreate_;
|
|
std::vector<std::unique_ptr<CommandExecutor>> onLoad_;
|
|
}; |