| 164 | } |
| 165 | |
| 166 | Result Model::load(std::istream& in, Model& out) { |
| 167 | if (!in.good()) { |
| 168 | return Result(ResultType::UNABLE_TO_OPEN_FILE, |
| 169 | "unable to open file for read"); |
| 170 | } |
| 171 | |
| 172 | |
| 173 | Result r = loadSpecification(*(out.m_spec), in); |
| 174 | if (!r.good()) { return r; } |
| 175 | // validate on load |
| 176 | |
| 177 | r = out.validate(); |
| 178 | |
| 179 | return r; |
| 180 | } |
| 181 | |
| 182 | Result Model::load(const std::string& path, Model& out) { |
| 183 | std::ifstream in(path, std::ios::binary); |
nothing calls this directly
no test coverage detected