Mercurial > hg > sonic-annotator
comparison runner/FeatureWriterFactory.cpp @ 145:3921e0c1f4dd jams
Start to sketch out JAMS writer
author | Chris Cannam |
---|---|
date | Mon, 13 Oct 2014 16:58:30 +0100 |
parents | 2260947be4aa |
children | 4b19d824a213 |
comparison
equal
deleted
inserted
replaced
144:b3d73c08b6ce | 145:3921e0c1f4dd |
---|---|
18 | 18 |
19 #include "DefaultFeatureWriter.h" | 19 #include "DefaultFeatureWriter.h" |
20 #include "rdf/RDFFeatureWriter.h" | 20 #include "rdf/RDFFeatureWriter.h" |
21 #include "AudioDBFeatureWriter.h" | 21 #include "AudioDBFeatureWriter.h" |
22 #include "MIDIFeatureWriter.h" | 22 #include "MIDIFeatureWriter.h" |
23 #include "JAMSFeatureWriter.h" | |
23 #include "transform/CSVFeatureWriter.h" | 24 #include "transform/CSVFeatureWriter.h" |
24 | 25 |
25 set<string> | 26 set<string> |
26 FeatureWriterFactory::getWriterTags() | 27 FeatureWriterFactory::getWriterTags() |
27 { | 28 { |
29 tags.insert("default"); | 30 tags.insert("default"); |
30 tags.insert("rdf"); | 31 tags.insert("rdf"); |
31 tags.insert("audiodb"); | 32 tags.insert("audiodb"); |
32 tags.insert("csv"); | 33 tags.insert("csv"); |
33 tags.insert("midi"); | 34 tags.insert("midi"); |
35 tags.insert("json"); | |
34 return tags; | 36 return tags; |
35 } | 37 } |
36 | 38 |
37 FeatureWriter * | 39 FeatureWriter * |
38 FeatureWriterFactory::createWriter(string tag) | 40 FeatureWriterFactory::createWriter(string tag) |
45 return new AudioDBFeatureWriter(); | 47 return new AudioDBFeatureWriter(); |
46 } else if (tag == "csv") { | 48 } else if (tag == "csv") { |
47 return new CSVFeatureWriter(); | 49 return new CSVFeatureWriter(); |
48 } else if (tag == "midi") { | 50 } else if (tag == "midi") { |
49 return new MIDIFeatureWriter(); | 51 return new MIDIFeatureWriter(); |
52 } else if (tag == "json") { | |
53 return new JAMSFeatureWriter(); | |
50 } | 54 } |
51 | 55 |
52 return 0; | 56 return 0; |
53 } | 57 } |