annotate src/vamp-plugin-sdk-2.4/rdf/generator/vamp-rdf-template-generator.cpp @ 124:e3d5853d5918

Current stable PortAudio source
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 18 Oct 2016 13:11:05 +0100
parents efb4b8187266
children
rev   line source
cannam@97 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
cannam@97 2
cannam@97 3 #include <vamp-hostsdk/PluginHostAdapter.h>
cannam@97 4 #include <vamp-hostsdk/PluginChannelAdapter.h>
cannam@97 5 #include <vamp-hostsdk/PluginInputDomainAdapter.h>
cannam@97 6 #include <vamp-hostsdk/PluginLoader.h>
cannam@97 7 #include <vamp/vamp.h>
cannam@97 8
cannam@97 9 #include <iostream>
cannam@97 10 #include <fstream>
cannam@97 11 #include <sstream>
cannam@97 12
cannam@97 13 #include <cmath>
cannam@97 14 #include <cstdlib>
cannam@97 15 #include <cstring>
cannam@97 16
cannam@97 17 #include <cstdlib>
cannam@97 18 #include <cstring>
cannam@97 19
cannam@97 20 using std::cout;
cannam@97 21 using std::cin;
cannam@97 22 using std::cerr;
cannam@97 23 using std::getline;
cannam@97 24 using std::endl;
cannam@97 25 using std::string;
cannam@97 26 using std::vector;
cannam@97 27 using std::ofstream;
cannam@97 28 using std::ios;
cannam@97 29
cannam@97 30 using Vamp::HostExt::PluginLoader;
cannam@97 31 using Vamp::Plugin;
cannam@97 32
cannam@97 33 //???
cannam@97 34 string programURI = "http://www.vamp-plugins.org/doap.rdf#template-generator";
cannam@97 35
cannam@97 36 void usage()
cannam@97 37 {
cannam@97 38 cerr << endl;
cannam@97 39 cerr << "vamp-rdf-template-generator: Create a skeleton RDF description file describing" << endl;
cannam@97 40 cerr << "a Vamp plugin library using the Vamp ontology." << endl;
cannam@97 41 cerr << endl;
cannam@97 42 cerr << "Usage:" << endl;
cannam@97 43 cerr << " vamp-rdf-template-generator -i vamp:soname[:plugin] [vamp:soname[:plugin] ...]" << endl;
cannam@97 44 cerr << " vamp-rdf-template-generator PLUGIN_BASE_URI [ -m YOUR_URI ] [vamp:]soname[:plugin] [[vamp:]soname[:plugin] ...]" << endl;
cannam@97 45 cerr << endl;
cannam@97 46 cerr << "Example:" << endl;
cannam@97 47 cerr << " vamp-rdf-template-generator http://vamp-plugins.org/rdf/plugins/ vamp-example-plugins" << endl;
cannam@97 48 cerr << endl;
cannam@97 49 exit(2);
cannam@97 50 }
cannam@97 51
cannam@97 52 template <class T>
cannam@97 53 inline string to_string (const T& t)
cannam@97 54 {
cannam@97 55 std::stringstream ss;
cannam@97 56 ss << t;
cannam@97 57 return ss.str();
cannam@97 58 }
cannam@97 59
cannam@97 60 string describe_namespaces(string pluginBundleBaseURI, string libname)
cannam@97 61 {
cannam@97 62 string res=\
cannam@97 63 "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n\
cannam@97 64 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n\
cannam@97 65 @prefix vamp: <http://purl.org/ontology/vamp/> .\n\
cannam@97 66 @prefix plugbase: <"+pluginBundleBaseURI+libname+"#> .\n\
cannam@97 67 @prefix owl: <http://www.w3.org/2002/07/owl#> .\n\
cannam@97 68 @prefix dc: <http://purl.org/dc/elements/1.1/> .\n\
cannam@97 69 @prefix af: <http://purl.org/ontology/af/> .\n\
cannam@97 70 @prefix foaf: <http://xmlns.com/foaf/0.1/> .\n\
cannam@97 71 @prefix cc: <http://web.resource.org/cc/> .\n\
cannam@97 72 @prefix : <#> .\n\n";
cannam@97 73
cannam@97 74 return res;
cannam@97 75 }
cannam@97 76
cannam@97 77 string describe_doc(string describerURI, string pluginBundleBaseURI,
cannam@97 78 string libname)
cannam@97 79 {
cannam@97 80 string res=\
cannam@97 81 "<> a vamp:PluginDescription ;\n";
cannam@97 82 if (describerURI != "") {
cannam@97 83 res += " foaf:maker <"+describerURI+"> ;\n";
cannam@97 84 }
cannam@97 85 res += "\
cannam@97 86 foaf:maker <"+programURI+"> ;\n\
cannam@97 87 foaf:primaryTopic <"+pluginBundleBaseURI+libname+"> .\n\n";
cannam@97 88 return res;
cannam@97 89 }
cannam@97 90
cannam@97 91
cannam@97 92 string describe_library(string libname, vector<Plugin *> plugins)
cannam@97 93 {
cannam@97 94 string res=\
cannam@97 95 ":"+libname+" a vamp:PluginLibrary ;\n\
cannam@97 96 vamp:identifier \""+libname+"\" ";
cannam@97 97
cannam@97 98 for (size_t i = 0; i < plugins.size(); ++i) {
cannam@97 99 res += " ; \n\
cannam@97 100 vamp:available_plugin plugbase:"+plugins[i]->getIdentifier();
cannam@97 101 }
cannam@97 102
cannam@97 103 res += " ; \n\
cannam@97 104 # foaf:page <Place more-information HTML page URL here and uncomment> ;\n\
cannam@97 105 .\n\n";
cannam@97 106 return res;
cannam@97 107 }
cannam@97 108
cannam@97 109 string describe_plugin(Plugin* plugin)
cannam@97 110 {
cannam@97 111 string res=\
cannam@97 112 "plugbase:"+plugin->getIdentifier()+" a vamp:Plugin ;\n\
cannam@97 113 dc:title \""+plugin->getName()+"\" ;\n\
cannam@97 114 vamp:name \""+plugin->getName()+"\" ;\n\
cannam@97 115 dc:description \"\"\""+plugin->getDescription()+"\"\"\" ;\n\
cannam@97 116 foaf:maker [ foaf:name \""+plugin->getMaker()+"\" ] ; # FIXME could give plugin author's URI here\n\
cannam@97 117 dc:rights \"\"\""+plugin->getCopyright()+"\"\"\" ;\n\
cannam@97 118 # cc:license <Place plugin license URI here and uncomment> ; \n\
cannam@97 119 vamp:identifier \""+plugin->getIdentifier()+"\" ;\n\
cannam@97 120 vamp:vamp_API_version vamp:api_version_"+to_string(plugin->getVampApiVersion())+" ;\n\
cannam@97 121 owl:versionInfo \""+to_string(plugin->getPluginVersion())+"\" ;\n";
cannam@97 122 if (plugin->getInputDomain() == Vamp::Plugin::FrequencyDomain)
cannam@97 123 res+=" vamp:input_domain vamp:FrequencyDomain ;\n\n";
cannam@97 124 else
cannam@97 125 res+=" vamp:input_domain vamp:TimeDomain ;\n";
cannam@97 126
cannam@97 127
cannam@97 128 Plugin::ParameterList params = plugin->getParameterDescriptors();
cannam@97 129 if (!params.empty()) res+="\n";
cannam@97 130 for (Plugin::ParameterList::const_iterator i = params.begin(); i != params.end(); i++)
cannam@97 131 res+=" vamp:parameter plugbase:"+plugin->getIdentifier()+"_param_"+(*i).identifier+" ;\n";
cannam@97 132 if (!params.empty()) res+="\n";
cannam@97 133
cannam@97 134 Plugin::OutputList outputs = plugin->getOutputDescriptors();
cannam@97 135 for (Plugin::OutputList::const_iterator i = outputs.begin(); i!= outputs.end(); i++)
cannam@97 136 res+=" vamp:output plugbase:"+plugin->getIdentifier()+"_output_"+(*i).identifier+" ;\n";
cannam@97 137 res+=" .\n";
cannam@97 138
cannam@97 139 return res;
cannam@97 140 }
cannam@97 141
cannam@97 142 string describe_param(Plugin *plugin, Plugin::ParameterDescriptor p)
cannam@97 143 {
cannam@97 144
cannam@97 145 //FIXME: dc:format and vamp:unit are the same???
cannam@97 146 //Should be a QUantizedParameter also a Parameter??
cannam@97 147 if(p.isQuantized){
cannam@97 148 string res=\
cannam@97 149 "plugbase:"+plugin->getIdentifier()+"_param_"+p.identifier+" a vamp:QuantizedParameter ;\n\
cannam@97 150 vamp:identifier \""+p.identifier+"\" ;\n\
cannam@97 151 dc:title \""+p.name+"\" ;\n\
cannam@97 152 dc:format \""+p.unit+"\" ;\n\
cannam@97 153 vamp:min_value "+to_string(p.minValue)+" ;\n\
cannam@97 154 vamp:max_value "+to_string(p.maxValue)+" ;\n\
cannam@97 155 vamp:unit \""+p.unit+"\" ;\n\
cannam@97 156 vamp:quantize_step "+to_string(p.quantizeStep)+" ;\n\
cannam@97 157 vamp:default_value "+to_string(p.defaultValue)+" ;\n\
cannam@97 158 vamp:value_names (";
cannam@97 159
cannam@97 160 unsigned int i;
cannam@97 161 for (i=0; i+1 < p.valueNames.size(); i++)
cannam@97 162 res+=" \""+p.valueNames[i]+"\"";
cannam@97 163 if (i < p.valueNames.size())
cannam@97 164 res+=" \""+p.valueNames[i]+"\"";
cannam@97 165 res+=");\n";
cannam@97 166
cannam@97 167 res+=" .\n";
cannam@97 168
cannam@97 169 return res;
cannam@97 170
cannam@97 171 }else{
cannam@97 172 string res=\
cannam@97 173 "plugbase:"+plugin->getIdentifier()+"_param_"+p.identifier+" a vamp:Parameter ;\n\
cannam@97 174 vamp:identifier \""+p.identifier+"\" ;\n\
cannam@97 175 dc:title \""+p.name+"\" ;\n\
cannam@97 176 dc:format \""+p.unit+"\" ;\n\
cannam@97 177 vamp:min_value "+to_string(p.minValue)+" ;\n\
cannam@97 178 vamp:max_value "+to_string(p.maxValue)+" ;\n\
cannam@97 179 vamp:unit \""+p.unit+"\" ;\n\
cannam@97 180 vamp:default_value "+to_string(p.defaultValue)+" ;\n\
cannam@97 181 vamp:value_names (";
cannam@97 182
cannam@97 183 unsigned int i;
cannam@97 184 for (i=0; i+1 < p.valueNames.size(); i++)
cannam@97 185 res+=" \""+p.valueNames[i]+"\"";
cannam@97 186 if (i < p.valueNames.size())
cannam@97 187 res+=" \""+p.valueNames[i]+"\"";
cannam@97 188 res+=");\n";
cannam@97 189
cannam@97 190 res+=" .\n";
cannam@97 191
cannam@97 192 return res;
cannam@97 193
cannam@97 194 }
cannam@97 195 }
cannam@97 196
cannam@97 197 string describe_output(Plugin *plugin, Plugin::OutputDescriptor o)
cannam@97 198 {
cannam@97 199
cannam@97 200 //we need to distinguish here between different output types:
cannam@97 201
cannam@97 202 //Quantize or not
cannam@97 203 //KnownExtents or not
cannam@97 204 //Data output classification:
cannam@97 205 //DenseOutput
cannam@97 206 //SparseOutput
cannam@97 207 //TrackLevelOutput
cannam@97 208
cannam@97 209
cannam@97 210 // SparseOutput: variable sample rate. Events are not evenly
cannam@97 211 // spaced so we need to record the time associated with the event
cannam@97 212 // as it its not ensured that we have an event after the next one
cannam@97 213 // (but there is not time to set the duration, it has to be
cannam@97 214 // calculated as the different between 2 different events). The
cannam@97 215 // timestamp must be read.
cannam@97 216
cannam@97 217 string res;
cannam@97 218
cannam@97 219 if (o.sampleType == Plugin::OutputDescriptor::VariableSampleRate ||
cannam@97 220 !o.hasFixedBinCount)
cannam@97 221 {
cannam@97 222
cannam@97 223 res=\
cannam@97 224 "plugbase:"+plugin->getIdentifier()+"_output_"+o.identifier+" a vamp:SparseOutput ;\n\
cannam@97 225 vamp:identifier \""+o.identifier+"\" ;\n\
cannam@97 226 dc:title \""+o.name+"\" ;\n\
cannam@97 227 dc:description \"\"\""+o.description+"\"\"\" ;\n\
cannam@97 228 vamp:fixed_bin_count \""+(o.hasFixedBinCount == 1 ? "true" : "false")+"\" ;\n\
cannam@97 229 vamp:unit \""+(o.unit)+"\" ;\n";
cannam@97 230
cannam@97 231
cannam@97 232 //another type of output
cannam@97 233 if(o.isQuantized){
cannam@97 234
cannam@97 235 res+=" a vamp:QuantizedOutput ;\n";
cannam@97 236 res+=" vamp:quantize_step "+to_string(o.quantizeStep)+" ;\n";
cannam@97 237 }
cannam@97 238
cannam@97 239 //and yet another type
cannam@97 240 if(o.hasKnownExtents){
cannam@97 241
cannam@97 242 res+=" a vamp:KnownExtentsOutput ;\n";
cannam@97 243 res+=" vamp:min_value "+to_string(o.minValue)+" ;\n";
cannam@97 244 res+=" vamp:max_value "+to_string(o.maxValue)+" ;\n";
cannam@97 245 }
cannam@97 246
cannam@97 247 // FIXME ? Bin names may vary based on plugin setup, so including them here might be misleading...
cannam@97 248 if (o.hasFixedBinCount)
cannam@97 249 {
cannam@97 250 res+=" vamp:bin_count "+to_string(o.binCount)+" ;\n";
cannam@97 251
cannam@97 252 bool haveBinNames = false;
cannam@97 253 for (unsigned int i=0; i < o.binNames.size(); i++) {
cannam@97 254 if (o.binNames[i] != "") {
cannam@97 255 haveBinNames = true;
cannam@97 256 break;
cannam@97 257 }
cannam@97 258 }
cannam@97 259
cannam@97 260 if (haveBinNames) {
cannam@97 261 res+=" vamp:bin_names (";
cannam@97 262
cannam@97 263 unsigned int i;
cannam@97 264 for (i=0; i+1 < o.binNames.size(); i++)
cannam@97 265 res+=" \""+o.binNames[i]+"\"";
cannam@97 266 if (i < o.binNames.size())
cannam@97 267 res+=" \""+o.binNames[i]+"\"";
cannam@97 268 res+=");\n";
cannam@97 269 }
cannam@97 270 }
cannam@97 271
cannam@97 272 res+=" vamp:sample_type vamp:VariableSampleRate ;\n";
cannam@97 273 if (o.sampleRate > 0.0f)
cannam@97 274 res+=" vamp:sample_rate "+to_string(o.sampleRate)+" ;\n";
cannam@97 275
cannam@97 276 }
cannam@97 277
cannam@97 278 //If we do not have SparseOutput, then we have DenseOutput. TrackLevelOutput can not be inferred from the plugin directly without actually
cannam@97 279 //running the plugin.
cannam@97 280 else{
cannam@97 281
cannam@97 282 res=\
cannam@97 283 "plugbase:"+plugin->getIdentifier()+"_output_"+o.identifier+" a vamp:DenseOutput ;\n\
cannam@97 284 vamp:identifier \""+o.identifier+"\" ;\n\
cannam@97 285 dc:title \""+o.name+"\" ;\n\
cannam@97 286 dc:description \"\"\""+o.description+"\"\"\" ;\n\
cannam@97 287 vamp:fixed_bin_count \""+(o.hasFixedBinCount == 1 ? "true" : "false")+"\" ;\n\
cannam@97 288 vamp:unit \""+(o.unit)+"\" ;\n";
cannam@97 289
cannam@97 290
cannam@97 291 //another type of output
cannam@97 292 if(o.isQuantized){
cannam@97 293
cannam@97 294 res+=" a vamp:QuantizedOutput ;\n";
cannam@97 295 res+=" vamp:quantize_step "+to_string(o.quantizeStep)+" ;\n";
cannam@97 296 }
cannam@97 297
cannam@97 298 //and yet another type
cannam@97 299 if(o.hasKnownExtents){
cannam@97 300
cannam@97 301 res+=" a vamp:KnownExtentsOutput ;\n";
cannam@97 302 res+=" vamp:min_value "+to_string(o.minValue)+" ;\n";
cannam@97 303 res+=" vamp:max_value "+to_string(o.maxValue)+" ;\n";
cannam@97 304 }
cannam@97 305
cannam@97 306 // FIXME ? Bin names may vary based on plugin setup, so including them here might be misleading...
cannam@97 307 if (o.hasFixedBinCount)
cannam@97 308 {
cannam@97 309 res+=" vamp:bin_count "+to_string(o.binCount)+" ;\n";
cannam@97 310
cannam@97 311 bool haveBinNames = false;
cannam@97 312 for (unsigned int i=0; i < o.binNames.size(); i++) {
cannam@97 313 if (o.binNames[i] != "") {
cannam@97 314 haveBinNames = true;
cannam@97 315 break;
cannam@97 316 }
cannam@97 317 }
cannam@97 318
cannam@97 319 if (haveBinNames) {
cannam@97 320 res+=" vamp:bin_names (";
cannam@97 321
cannam@97 322 unsigned int i;
cannam@97 323 for (i=0; i+1 < o.binNames.size(); i++)
cannam@97 324 res+=" \""+o.binNames[i]+"\"";
cannam@97 325 if (i < o.binNames.size())
cannam@97 326 res+=" \""+o.binNames[i]+"\"";
cannam@97 327 res+=");\n";
cannam@97 328 }
cannam@97 329 }
cannam@97 330
cannam@97 331 else if (o.sampleType == Plugin::OutputDescriptor::FixedSampleRate)
cannam@97 332 {
cannam@97 333 res+=" vamp:sample_type vamp:FixedSampleRate ;\n";
cannam@97 334 res+=" vamp:sample_rate "+to_string(o.sampleRate)+" ;\n";
cannam@97 335 }
cannam@97 336 else if (o.sampleType == Plugin::OutputDescriptor::OneSamplePerStep)
cannam@97 337 res+=" vamp:sample_type vamp:OneSamplePerStep ;\n";
cannam@97 338 else
cannam@97 339 {
cannam@97 340 cerr<<"Incomprehensible sampleType for output descriptor "+o.identifier<<" !"<<endl;
cannam@97 341 exit(1);
cannam@97 342 }
cannam@97 343 }
cannam@97 344
cannam@97 345 //There is no way to know this in advance, but we can use the km a bit for this.
cannam@97 346 res+="# vamp:computes_event_type <Place event type URI here and uncomment> ;\n";
cannam@97 347 res+="# vamp:computes_feature <Place feature attribute URI here and uncomment> ;\n";
cannam@97 348 res+="# vamp:computes_signal_type <Place signal type URI here and uncomment> ;\n";
cannam@97 349 res+=" .\n";
cannam@97 350
cannam@97 351 return res;
cannam@97 352 }
cannam@97 353
cannam@97 354 string describe(vector<Plugin *> plugins, string pluginBundleBaseURI,
cannam@97 355 string describerURI, string libname)
cannam@97 356 {
cannam@97 357 string res = describe_namespaces(pluginBundleBaseURI, libname);
cannam@97 358
cannam@97 359 res += describe_doc(describerURI, pluginBundleBaseURI, libname);
cannam@97 360
cannam@97 361 res += describe_library(libname, plugins);
cannam@97 362
cannam@97 363 for (size_t i = 0; i < plugins.size(); ++i) {
cannam@97 364
cannam@97 365 Plugin *plugin = plugins[i];
cannam@97 366
cannam@97 367 res += describe_plugin(plugin);
cannam@97 368
cannam@97 369 Plugin::ParameterList params = plugin->getParameterDescriptors();
cannam@97 370 for (Plugin::ParameterList::const_iterator i = params.begin(); i != params.end(); i++)
cannam@97 371 res += describe_param(plugin, *i);
cannam@97 372
cannam@97 373 Plugin::OutputList outputs = plugin->getOutputDescriptors();
cannam@97 374 for (Plugin::OutputList::const_iterator i = outputs.begin(); i!= outputs.end(); i++)
cannam@97 375 res += describe_output(plugin, *i);
cannam@97 376 }
cannam@97 377
cannam@97 378 return res;
cannam@97 379 }
cannam@97 380
cannam@97 381 int main(int argc, char **argv)
cannam@97 382 {
cannam@97 383 if (argc < 3) usage();
cannam@97 384
cannam@97 385 bool interactive = false;
cannam@97 386 if (!strcmp(argv[1], "-i")) interactive = true;
cannam@97 387
cannam@97 388 if (!interactive && argc < 3) usage();
cannam@97 389
cannam@97 390 string pluginBundleBaseURI, describerURI;
cannam@97 391
cannam@97 392 int argidx = 2;
cannam@97 393
cannam@97 394 if (!interactive) {
cannam@97 395 pluginBundleBaseURI = argv[1];
cannam@97 396 if (!strcmp(argv[2], "-m")) {
cannam@97 397 if (argc < 5) usage();
cannam@97 398 describerURI = argv[3];
cannam@97 399 argidx = 4;
cannam@97 400 }
cannam@97 401 } else {
cannam@97 402 cerr << "Please enter the base URI for the plugin bundle : ";
cannam@97 403 getline(cin, pluginBundleBaseURI);
cannam@97 404 cerr << "Please enter your URI (empty to omit) : ";
cannam@97 405 getline(cin, describerURI);
cannam@97 406 }
cannam@97 407
cannam@97 408 vector<Plugin *> plugins;
cannam@97 409 string libname;
cannam@97 410
cannam@97 411 PluginLoader *loader = PluginLoader::getInstance();
cannam@97 412
cannam@97 413 while (argidx < argc) {
cannam@97 414
cannam@97 415 string pluginName = argv[argidx];
cannam@97 416
cannam@97 417 if (pluginName.substr(0, 5) == "vamp:") {
cannam@97 418 pluginName = pluginName.substr(5);
cannam@97 419 }
cannam@97 420
cannam@97 421 string mylibname = pluginName.substr(0, pluginName.find(':'));
cannam@97 422
cannam@97 423 if (libname == "") libname = mylibname;
cannam@97 424 else if (libname != mylibname) {
cannam@97 425 cerr << "ERROR: All plugins specified on command line must originate in the same library" << endl;
cannam@97 426 exit(1);
cannam@97 427 }
cannam@97 428
cannam@97 429 if (mylibname == pluginName) { // pluginName is a library, not a plugin
cannam@97 430
cannam@97 431 PluginLoader::PluginKeyList list = loader->listPlugins();
cannam@97 432 for (size_t i = 0; i < list.size(); ++i) {
cannam@97 433 string thislibname = list[i].substr(0, list[i].find(':'));
cannam@97 434 if (thislibname != mylibname) continue;
cannam@97 435 Plugin *plugin = loader->loadPlugin(list[i], 44100);
cannam@97 436 if (!plugin) {
cannam@97 437 cerr << "ERROR: Plugin \"" << list[i] << "\" could not be loaded" << endl;
cannam@97 438 exit(1);
cannam@97 439 }
cannam@97 440 plugins.push_back(plugin);
cannam@97 441 }
cannam@97 442
cannam@97 443 if (plugins.empty()) {
cannam@97 444 cerr << "ERROR: Plugin library \"" << mylibname << "\" does not exist, could not be opened, or contains no plugins" << endl;
cannam@97 445 exit(1);
cannam@97 446 }
cannam@97 447
cannam@97 448 } else { // pluginName is a plugin
cannam@97 449
cannam@97 450 Plugin *plugin = loader->loadPlugin(pluginName, size_t(44100));
cannam@97 451 if (!plugin) {
cannam@97 452 cerr << "ERROR: Plugin \"" << pluginName << "\" could not be loaded" << endl;
cannam@97 453 exit(1);
cannam@97 454 }
cannam@97 455 plugins.push_back(plugin);
cannam@97 456 }
cannam@97 457
cannam@97 458 ++argidx;
cannam@97 459 }
cannam@97 460
cannam@97 461 cout << describe(plugins, pluginBundleBaseURI, describerURI, libname) << endl;
cannam@97 462
cannam@97 463 return 0;
cannam@97 464 }
cannam@97 465
cannam@97 466