File indexing completed on 2024-12-08 10:16:03
0001 /* 0002 SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org> 0003 SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 #ifndef OSM_ABSTRACTWRITER_H 0007 #define OSM_ABSTRACTWRITER_H 0008 0009 #include "kosm_export.h" 0010 0011 class QIODevice; 0012 0013 namespace OSM { 0014 0015 class DataSet; 0016 0017 /** Abstract base class for OSM file format writers. */ 0018 class KOSM_EXPORT AbstractWriter 0019 { 0020 public: 0021 virtual ~AbstractWriter(); 0022 0023 /** Write the given data set into @p io. 0024 * @param io has to be open. 0025 */ 0026 void write(const OSM::DataSet &dataSet, QIODevice *io); 0027 0028 protected: 0029 virtual void writeToIODevice(const OSM::DataSet &dataSet, QIODevice *io) = 0; 0030 }; 0031 0032 } 0033 0034 #endif // OSM_ABSTRACTWRITER_H