| 44 | } // namespace |
| 45 | |
| 46 | bool registerReaderFactory(std::shared_ptr<ReaderFactory> factory) { |
| 47 | bool ok = readerFactories().insert({factory->fileFormat(), factory}).second; |
| 48 | // NOTE: re-enable this check after Prestissimo has updated dwrf registration. |
| 49 | #if 0 |
| 50 | BOLT_CHECK( |
| 51 | ok, |
| 52 | "ReaderFactory is already registered for format {}", |
| 53 | toString(factory->fileFormat())); |
| 54 | #endif |
| 55 | return true; |
| 56 | } |
| 57 | |
| 58 | bool unregisterReaderFactory(FileFormat format) { |
| 59 | auto count = readerFactories().erase(format); |
no test coverage detected