Mercurial > hg > sonic-annotator
comparison runner/DefaultFeatureWriter.cpp @ 326:0a56cf975768
Tie these down to try to avoid confusion from MSVC17
author | Chris Cannam |
---|---|
date | Fri, 18 May 2018 12:42:08 +0100 |
parents | b3d73c08b6ce |
children |
comparison
equal
deleted
inserted
replaced
324:ef03350baec7 | 326:0a56cf975768 |
---|---|
13 COPYING included with this distribution for more information. | 13 COPYING included with this distribution for more information. |
14 */ | 14 */ |
15 | 15 |
16 #include <iostream> | 16 #include <iostream> |
17 #include <map> | 17 #include <map> |
18 | |
19 using namespace std; | |
20 | 18 |
21 #include "DefaultFeatureWriter.h" | 19 #include "DefaultFeatureWriter.h" |
22 | 20 |
23 string | 21 string |
24 DefaultFeatureWriter::getDescription() const | 22 DefaultFeatureWriter::getDescription() const |
46 */ | 44 */ |
47 | 45 |
48 for (int i = 0; i < (int)featureList.size(); ++i) { | 46 for (int i = 0; i < (int)featureList.size(); ++i) { |
49 | 47 |
50 if (summaryType == "") { | 48 if (summaryType == "") { |
51 cout << "<feature>" << endl; | 49 std::cout << "<feature>" << std::endl; |
52 } else { | 50 } else { |
53 cout << "<summary type=\"" << summaryType << "\">" << endl; | 51 std::cout << "<summary type=\"" << summaryType << "\">" << std::endl; |
54 } | 52 } |
55 cout << "\t<name>" << output.name << "</name>" << endl; | 53 std::cout << "\t<name>" << output.name << "</name>" << std::endl; |
56 if (featureList[i].hasTimestamp) { | 54 if (featureList[i].hasTimestamp) { |
57 cout << "\t<timestamp>" << featureList[i].timestamp << "</timestamp>" << endl; | 55 std::cout << "\t<timestamp>" << featureList[i].timestamp << "</timestamp>" << std::endl; |
58 } | 56 } |
59 if (featureList[i].hasDuration) { | 57 if (featureList[i].hasDuration) { |
60 cout << "\t<duration>" << featureList[i].duration << "</duration>" << endl; | 58 std::cout << "\t<duration>" << featureList[i].duration << "</duration>" << std::endl; |
61 } | 59 } |
62 if (featureList[i].values.size() > 0) | 60 if (featureList[i].values.size() > 0) |
63 { | 61 { |
64 cout << "\t<values>"; | 62 std::cout << "\t<values>"; |
65 for (int j = 0; j < (int)featureList[i].values.size(); ++j) { | 63 for (int j = 0; j < (int)featureList[i].values.size(); ++j) { |
66 if (j > 0) | 64 if (j > 0) |
67 cout << " "; | 65 std::cout << " "; |
68 if (output.binNames.size() > 0) | 66 if (output.binNames.size() > 0) |
69 cout << output.binNames[j] << ":"; | 67 std::cout << output.binNames[j] << ":"; |
70 cout << featureList[i].values[j]; | 68 std::cout << featureList[i].values[j]; |
71 } | 69 } |
72 cout << "</values>" << endl; | 70 std::cout << "</values>" << std::endl; |
73 } | 71 } |
74 if (featureList[i].label.length() > 0) | 72 if (featureList[i].label.length() > 0) |
75 cout << "\t<label>" << featureList[i].label << "</label>" << endl; | 73 std::cout << "\t<label>" << featureList[i].label << "</label>" << std::endl; |
76 if (summaryType == "") { | 74 if (summaryType == "") { |
77 cout << "</feature>" << endl; | 75 std::cout << "</feature>" << std::endl; |
78 } else { | 76 } else { |
79 cout << "</summary>" << endl; | 77 std::cout << "</summary>" << std::endl; |
80 } | 78 } |
81 } | 79 } |
82 } | 80 } |