File indexing completed on 2024-05-05 04:42:56

0001 /*
0002     SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
0003     SPDX-License-Identifier: LGPL-2.0-or-later
0004 */
0005 
0006 #ifndef OSM_IO_H
0007 #define OSM_IO_H
0008 
0009 #include "kosm_export.h"
0010 #include "abstractreader.h"
0011 #include "abstractwriter.h"
0012 
0013 class QStringView;
0014 
0015 #include <memory>
0016 
0017 namespace OSM {
0018 
0019 class DataSet;
0020 
0021 /** Access to OSM file/data readers. */
0022 namespace IO
0023 {
0024 
0025 /** Returns a suitable reader for the given file name. */
0026 KOSM_EXPORT std::unique_ptr<AbstractReader> readerForFileName(QStringView fileName, OSM::DataSet *dataSet);
0027 /** Returns a suitable reader for the given MIME type. */
0028 KOSM_EXPORT std::unique_ptr<AbstractReader> readerForMimeType(QStringView mimeType, OSM::DataSet *dataSet);
0029 
0030 /** Returns a suitable writer for the given file name. */
0031 KOSM_EXPORT std::unique_ptr<AbstractWriter> writerForFileName(QStringView fileName);
0032 /** Returns a suitable writer for the given MIME type. */
0033 KOSM_EXPORT std::unique_ptr<AbstractWriter> writerForMimeType(QStringView mimeType);
0034 
0035 }
0036 
0037 }
0038 
0039 #endif // OSM_IO_H