| 16 | } |
| 17 | |
| 18 | void StringWriter::write(std::string path) const |
| 19 | { |
| 20 | std::ofstream out(path.c_str(), std::ofstream::out); |
| 21 | if (!out) |
| 22 | { |
| 23 | throw std::runtime_error("Unable to write file: " + path); |
| 24 | } |
| 25 | this->Write(out); |
| 26 | out.close(); |
| 27 | } |
| 28 | |
| 29 | void StringWriter::Write(std::ostream& out) const |
| 30 | { |