allow peeking the type of next replay action
This commit is contained in:
@@ -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();
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user