Mercurial > hg > svcore
diff rdf/RDFTransformFactory.cpp @ 508:1b8c748fd7ea
* Support recording the summary type in transform
author | Chris Cannam |
---|---|
date | Fri, 05 Dec 2008 16:18:04 +0000 |
parents | 3176aade1a03 |
children | 18488253a3f4 |
line wrap: on
line diff
--- a/rdf/RDFTransformFactory.cpp Fri Dec 05 14:19:04 2008 +0000 +++ b/rdf/RDFTransformFactory.cpp Fri Dec 05 16:18:04 2008 +0000 @@ -220,6 +220,7 @@ static const char *optionals[] = { "output", "program", + "summary_type", "step_size", "block_size", "window_type", @@ -262,6 +263,9 @@ if (optional == "program") { transform.setProgram(v.value); + } else if (optional == "summary_type") { + transform.setSummaryType + (transform.stringToSummaryType(v.value)); } else if (optional == "step_size") { transform.setStepSize(v.value.toUInt()); } else if (optional == "block_size") { @@ -430,11 +434,15 @@ } QString program = transform.getProgram(); - if (program != "") { s << " vamp:program \"\"\"" << program << "\"\"\" ;" << endl; } + QString summary = transform.summaryTypeToString(transform.getSummaryType()); + if (summary != "") { + s << " vamp:summary_type \"" << summary << "\" ;" << endl; + } + Transform::ParameterMap parameters = transform.getParameters(); for (Transform::ParameterMap::const_iterator i = parameters.begin(); i != parameters.end(); ++i) {