Mercurial > hg > sonic-annotator
comparison runner/FeatureWriterFactory.cpp @ 154:6ff4da31db8b labfile
Implement .lab file writer
author | Chris Cannam |
---|---|
date | Tue, 14 Oct 2014 17:30:44 +0100 |
parents | 2260947be4aa |
children | 4b19d824a213 |
comparison
equal
deleted
inserted
replaced
148:04945e74d314 | 154:6ff4da31db8b |
---|---|
15 | 15 |
16 | 16 |
17 #include "FeatureWriterFactory.h" | 17 #include "FeatureWriterFactory.h" |
18 | 18 |
19 #include "DefaultFeatureWriter.h" | 19 #include "DefaultFeatureWriter.h" |
20 | |
20 #include "rdf/RDFFeatureWriter.h" | 21 #include "rdf/RDFFeatureWriter.h" |
22 #include "transform/CSVFeatureWriter.h" | |
23 | |
21 #include "AudioDBFeatureWriter.h" | 24 #include "AudioDBFeatureWriter.h" |
22 #include "MIDIFeatureWriter.h" | 25 #include "MIDIFeatureWriter.h" |
23 #include "transform/CSVFeatureWriter.h" | 26 #include "LabFeatureWriter.h" |
24 | 27 |
25 set<string> | 28 set<string> |
26 FeatureWriterFactory::getWriterTags() | 29 FeatureWriterFactory::getWriterTags() |
27 { | 30 { |
28 set<string> tags; | 31 set<string> tags; |
29 tags.insert("default"); | 32 tags.insert("default"); |
30 tags.insert("rdf"); | 33 tags.insert("rdf"); |
31 tags.insert("audiodb"); | 34 tags.insert("audiodb"); |
32 tags.insert("csv"); | 35 tags.insert("csv"); |
36 tags.insert("lab"); | |
33 tags.insert("midi"); | 37 tags.insert("midi"); |
34 return tags; | 38 return tags; |
35 } | 39 } |
36 | 40 |
37 FeatureWriter * | 41 FeatureWriter * |
43 return new RDFFeatureWriter(); | 47 return new RDFFeatureWriter(); |
44 } else if (tag == "audiodb") { | 48 } else if (tag == "audiodb") { |
45 return new AudioDBFeatureWriter(); | 49 return new AudioDBFeatureWriter(); |
46 } else if (tag == "csv") { | 50 } else if (tag == "csv") { |
47 return new CSVFeatureWriter(); | 51 return new CSVFeatureWriter(); |
52 } else if (tag == "lab") { | |
53 return new LabFeatureWriter(); | |
48 } else if (tag == "midi") { | 54 } else if (tag == "midi") { |
49 return new MIDIFeatureWriter(); | 55 return new MIDIFeatureWriter(); |
50 } | 56 } |
51 | 57 |
52 return 0; | 58 return 0; |