A command-line program that prints information about the units of measurement used in a given SBML file.
#include <iostream>
#include <sbml/units/UnitFormulaFormatter.h>
#include <sbml/units/FormulaUnitsData.h>
int
main (int argc, char *argv[])
{
if (argc != 2)
{
cout << endl << "Usage: printUnits filename" << endl << endl;
return 1;
}
const char* filename = argv[1];
{
cerr << "Encountered the following SBML errors:" << endl;
return 1;
}
if (model == 0)
{
cout << "No model present." << endl;
return 1;
}
unsigned int i,j;
{
cout << "Species " << i << ": "
}
{
cout << "Compartment " << i << ": "
<< endl;
}
{
cout << "Parameter " << i << ": "
<< endl;
}
{
cout << "InitialAssignment " << i << ": "
cout << " undeclared units: ";
}
{
cout << "Event " << i << ": " << endl;
{
cout << "Delay: "
cout << " undeclared units: ";
}
{
cout << "EventAssignment " << j << ": "
cout << " undeclared units: ";
}
}
{
cout << "Reaction " << i << ": " << endl;
{
cout << "Kinetic Law: "
cout << " undeclared units: ";
}
{
{
cout << "Reactant stoichiometryMath" << j << ": "
cout << " undeclared units: ";
}
}
{
{
cout << "Product stoichiometryMath" << j << ": "
cout << " undeclared units: ";
}
}
}
{
cout << "Rule " << i << ": "
cout << " undeclared units: ";
}
delete document;
return 0;
}