allow peeking the type of next replay action

This commit is contained in:
2024-07-03 22:15:25 -06:00
committed by Celtic Minstrel
parent acd7bb4080
commit b81974d915
2 changed files with 7 additions and 0 deletions

View File

@@ -83,6 +83,12 @@ bool has_next_action() {
return root->FirstChildElement(false) != NULL;
}
std::string next_action_type() {
Element* root = log_document.FirstChildElement();
Element* next_action = root->FirstChildElement();
return next_action->Value();
}
Element* pop_next_action(std::string expected_action_type) {
Element* root = log_document.FirstChildElement();
Element* next_action = root->FirstChildElement();

View File

@@ -17,6 +17,7 @@ extern bool init_action_log(std::string command, std::string file);
extern void record_action(std::string action_type, std::string inner_text);
extern void record_action(std::string action_type, std::map<std::string,std::string> info);
extern bool has_next_action();
extern std::string next_action_type();
extern Element* pop_next_action(std::string expected_action_type="");
extern std::string encode_file(fs::path file);
extern void decode_file(std::string data, fs::path file);