32 enum class EPlayMode { Sequential, StepByStep };
40 bool loadScript(
const std::string& filePath);
41 bool loadJson(
const std::string& jsonStr);
44 void play(EPlayMode mode = EPlayMode::Sequential);
49 bool isPlaying()
const {
return running_; }
52 int currentStep()
const {
return currentIndex_; }
53 int totalSteps()
const {
return static_cast<int>(steps_.size()); }
54 const std::string& lastError()
const {
return lastError_; }
55 std::string progress()
const;
58 void stepStarted(
int index,
const std::string& description);
59 void stepCompleted(
int index,
const std::string& result);
60 void stepFailed(
int index,
const std::string& error);
61 void playbackFinished();
62 void playbackPaused();
65 void executeNextStep();
66 void executeStep(
int index);
67 void retryStep(
int index,
int maxRetries = 2);
68 void continuePlayback();
71 std::vector<RecordStep> steps_{};
72 int currentIndex_ = -1;
73 bool running_ =
false;
75 std::string lastError_{};