| 171 | } |
| 172 | |
| 173 | std::string State::toString() const { |
| 174 | std::string ret("{state: " + std::to_string(this->hash()) + "\n widgets: \n"); |
| 175 | for (auto const &widget: this->_widgets) { |
| 176 | ret += " " + widget->toString() + "\n"; |
| 177 | } |
| 178 | ret += ("action: \n"); |
| 179 | for (auto const &action: this->_actions) { |
| 180 | ret += " " + action->toString() + "\n"; |
| 181 | } |
| 182 | return ret + "\n}"; |
| 183 | } |
| 184 | |
| 185 | |
| 186 | // for algorithm |