Prints the rule, reaction, and event formulas in a given SBML document.
#include <iostream>
void
{
char* formula;
{
cout <<
"FunctionDefinition " << n <<
", " << fd->
getId();
{
{
cout <<
", " << ( math->
getChild(n) )->getName();
}
}
cout <<") := ";
{
cout << "(no body defined)";
}
else
{
cout << formula << endl;
free(formula);
}
}
}
void
printRuleMath (
unsigned int n,
const Rule* r)
{
char* formula;
{
{
cout << "Rule " << n << ", formula: "
}
else
{
cout << "Rule " << n << ", formula: "
<< formula << " = 0" << endl;
}
free(formula);
}
}
void
printReactionMath (
unsigned int n,
const Reaction* r)
{
char* formula;
{
{
cout << "Reaction " << n << ", formula: " << formula << endl;
free(formula);
}
}
}
void
{
std::string variable;
char* formula;
{
cout <<" EventAssignment " << n
<< ", trigger: " << variable << " = " << formula << endl;
free(formula);
}
}
void
printEventMath (
unsigned int n,
const Event* e)
{
char* formula;
unsigned int i;
{
cout << "Event " << n << " delay: " << formula << endl;
free(formula);
}
{
cout << "Event " << n << " trigger: " << formula << endl;
free(formula);
}
{
}
cout << endl;
}
void
printMath (
const Model* m)
{
unsigned int n;
{
}
{
printRuleMath(n + 1, m->
getRule(n));
}
cout << endl;
{
}
cout << endl;
{
}
}
int
main (int argc, char* argv[])
{
if (argc != 2)
{
cout << endl << "Usage: printMath 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;
}
printMath(model);
cout << endl;
delete document;
return 0;
}