| 165 | StockpileSerializer::~StockpileSerializer() { } |
| 166 | |
| 167 | bool StockpileSettingsSerializer::serialize_to_ostream(color_ostream& out, std::ostream* output, uint32_t includedElements) { |
| 168 | if (output->fail()) |
| 169 | return false; |
| 170 | mBuffer.Clear(); |
| 171 | write(out, includedElements); |
| 172 | { |
| 173 | io::OstreamOutputStream zero_copy_output(output); |
| 174 | if (!mBuffer.SerializeToZeroCopyStream(&zero_copy_output)) |
| 175 | return false; |
| 176 | } |
| 177 | return output->good(); |
| 178 | } |
| 179 | |
| 180 | bool StockpileSettingsSerializer::serialize_to_file(color_ostream& out, const string& file, uint32_t includedElements) { |
| 181 | std::fstream output(file, std::ios::out | std::ios::binary | std::ios::trunc); |
nothing calls this directly
no test coverage detected