comparison transform/FileFeatureWriter.h @ 1035:d74ebd2d2c49

Require (and provide) text codec for output stream -- fixing #1153 (wrong codec used when writing RDF)
author Chris Cannam
date Mon, 02 Mar 2015 17:17:59 +0000
parents 694301cc71cc
children c01cbe41aeb5
comparison
equal deleted inserted replaced
1025:88b54a185a0a 1035:d74ebd2d2c49
30 using std::map; 30 using std::map;
31 using std::set; 31 using std::set;
32 using std::pair; 32 using std::pair;
33 33
34 class QTextStream; 34 class QTextStream;
35 class QTextCodec;
35 class QFile; 36 class QFile;
36 37
37 class FileFeatureWriter : public FeatureWriter 38 class FileFeatureWriter : public FeatureWriter
38 { 39 {
39 public: 40 public:
53 SupportOneFileTotal = 4, 54 SupportOneFileTotal = 4,
54 SupportStdOut = 8 55 SupportStdOut = 8
55 }; 56 };
56 57
57 FileFeatureWriter(int support, QString extension); 58 FileFeatureWriter(int support, QString extension);
58 QTextStream *getOutputStream(QString, TransformId); 59 QTextStream *getOutputStream(QString, TransformId, QTextCodec *);
59 60
60 typedef pair<QString, TransformId> TrackTransformPair; 61 typedef pair<QString, TransformId> TrackTransformPair;
61 typedef map<TrackTransformPair, QString> FileNameMap; 62 typedef map<TrackTransformPair, QString> FileNameMap;
62 typedef map<TrackTransformPair, QFile *> FileMap; 63 typedef map<TrackTransformPair, QFile *> FileMap;
63 typedef map<QFile *, QTextStream *> FileStreamMap; 64 typedef map<QFile *, QTextStream *> FileStreamMap;