| 119 | } |
| 120 | |
| 121 | std::unique_ptr<GraphDumper> GraphDumper::make( |
| 122 | std::unique_ptr<OutputFile> file, GraphDumpFormat format, int version) { |
| 123 | switch (format) { |
| 124 | case GraphDumpFormat::FLATBUFFERS: |
| 125 | #if MGB_ENABLE_FBS_SERIALIZATION |
| 126 | return make_fbs_dumper(std::move(file)); |
| 127 | #endif |
| 128 | MGB_FALLTHRU |
| 129 | case GraphDumpFormat::FLATBUFFERS_V2: |
| 130 | #if MGB_ENABLE_FBS_SERIALIZATION |
| 131 | return make_fbs_v2_dumper(std::move(file), version); |
| 132 | #endif |
| 133 | MGB_FALLTHRU |
| 134 | default: |
| 135 | mgb_throw(SerializationError, "unsupported serialization format requested"); |
| 136 | } |
| 137 | mgb_assert(false, "unreachable"); |
| 138 | } |
| 139 | |
| 140 | std::unique_ptr<GraphLoader> GraphLoader::make( |
| 141 | std::unique_ptr<InputFile> file, GraphDumpFormat format) { |
no test coverage detected