Load Json::Value into this object
| 282 | |
| 283 | // Load Json::Value into this object |
| 284 | void ChunkReader::SetJsonValue(const Json::Value root) { |
| 285 | |
| 286 | // Set parent data |
| 287 | ReaderBase::SetJsonValue(root); |
| 288 | |
| 289 | // Set data from Json (if key is found) |
| 290 | if (!root["path"].isNull()) |
| 291 | path = root["path"].asString(); |
| 292 | if (!root["chunk_size"].isNull()) |
| 293 | chunk_size = std::stoll(root["chunk_size"].asString()); |
| 294 | if (!root["chunk_version"].isNull()) |
| 295 | version = (ChunkVersion) root["chunk_version"].asInt(); |
| 296 | |
| 297 | // Re-Open path, and re-init everything (if needed) |
| 298 | if (is_open) |
| 299 | { |
| 300 | Close(); |
| 301 | Open(); |
| 302 | } |
| 303 | } |
nothing calls this directly
no outgoing calls
no test coverage detected