| 150 | } |
| 151 | |
| 152 | bool WorkflowJSON_Impl::checkForUpdates() { |
| 153 | std::string h1 = hash(); |
| 154 | std::string h2 = computeHash(); |
| 155 | bool result = (h1 != h2); |
| 156 | if (result) { |
| 157 | onUpdate(); |
| 158 | h2 = computeHash(); // recompute hash after updating timestamps in onUpdate |
| 159 | m_value["hash"] = h2; |
| 160 | } |
| 161 | return result; |
| 162 | } |
| 163 | |
| 164 | bool WorkflowJSON_Impl::save() const { |
| 165 | boost::optional<openstudio::path> p = oswPath(); |