Model flattening example.
#include <iostream>
#include <sstream>
#ifdef LIBSBML_HAS_PACKAGE_COMP
#endif
const string usage = "Usage: flattenModel [-p] inputFile outputFile\n"
" -p : list unused ports";
int main(int argc,char** argv)
{
bool leavePorts = false;
if (argc < 3)
{
cout << usage << endl;
return 1;
}
else if (argc == 3)
{
if ( string("-p") == string(argv[1]) )
{
cout << usage << endl;
return 1;
}
}
int argIndex = 1;
if ( string("-p") == string(argv[1]) )
{
leavePorts = true;
++argIndex;
}
{
cerr << "The version of libsbml being used does not have the comp"
<< " package code enabled" << endl;
return 1;
}
const char* inputFile = argv[argIndex];
const char* outputFile = argv[argIndex+1];
{
cerr << "Encountered the following SBML errors:" << endl;
return 1;
}
{
cerr << "Conversion failed\n";
}
delete converter;
delete document;
}