more convenient has_next_action()
This commit is contained in:
@@ -121,8 +121,11 @@ void record_field_input(cKey key) {
|
||||
record_action("field_input", info);
|
||||
}
|
||||
|
||||
bool has_next_action() {
|
||||
return next_action != nullptr;
|
||||
bool has_next_action(std::string type) {
|
||||
if(type.empty())
|
||||
return next_action != nullptr;
|
||||
else
|
||||
return has_next_action() && next_action_type() == type;
|
||||
}
|
||||
|
||||
std::string next_action_type() {
|
||||
|
@@ -22,7 +22,7 @@ extern bool init_action_log(std::string command, std::string file);
|
||||
extern void record_action(std::string action_type, std::string inner_text, bool cdata = false);
|
||||
extern void record_action(std::string action_type, std::map<std::string,std::string> info);
|
||||
extern void record_field_input(cKey key);
|
||||
extern bool has_next_action();
|
||||
extern bool has_next_action(std::string type = "");
|
||||
extern std::string next_action_type();
|
||||
extern Element& pop_next_action(std::string expected_action_type="");
|
||||
extern std::map<std::string,std::string> info_from_action(Element& action);
|
||||
|
Reference in New Issue
Block a user